Javascript :: Google Analytics Track Event Causing Page To Change?
Feb 24, 2012
I have a flash file and am using google's suggested method for as2 event tracking like so:
getURL("javascript:pageTracker._trackEvent('Refferal', 'Join', 'Benefits for HCAs/APs');");
The problem is that instead of silently communicating, pageTracker._trackEvent() appears to return a boolean value. Every time I click the button which this is located on I leave the page I was on and end up on a page that just contains the word "true".how to get around this? It makes the flash unusable.
I'm trying to track a #anchor for example [URL] the anchor is being called by Flash AS2. how can i tell GA to track hits on this page? I tried the GETURL method in flash:
[Code]....
which apprently used to work, but since they've made changes this doesn't... during tests firefox navigated to a page with the url javascript:_gaq.push [URL] was strange. Do I need to even use flash to ask GA to track the anchor? Is there a way i can point GA to track all anchors that are part of my page?
I got this code to use google analytics to track activity on my flash site but I am not exactly sure on how to use it. Do I place the code on all the buttons I would like to track or is there a way to embed this code into to HTML document that my flash site is embedded in. I figured because of the onRelease action that it needs to be on a button,but I was hoping that there my be a better way. (My flash site has a lot of buttons.)
I use google analytics to track viewed content on my site using tags like this... Code: getURL("javascript:pageTracker._trackPageview('/MAIN/WORK/SEARCH-ENTER.html');"); Im wondering how i can however track search queries using a similar method. Conceptually, im looking for a way to do this
I would like to know how to track my pages with google analytics to see which pages are getting the most clicks. My site is XML / Flash the menu is xml. Could I put the tracking code on each of the menu items in the xml file?
The user is downloading the .swf file (an e-brochure) from a link in an email. I'm trying to track the users interaction on the offline .swf. Is this possible?
I'm soon to be launching an Adobe AIR desktop app. To make the best out of future updates I need to get analytics of which features get used the most and which not. How to track what the user clicks?
I would like to add Google Analytics to my flash file. The flash file is contained in a HTML file, which I already added the script provided by Google Analytics. At the moment, when a user visits my site, regardless which page is visited, only the homepage is counted.
What as3 do I add to the flash file to keep track of each page that is being visited? I've tried a few codes provide on Google Analytics page and other tutorials, but none worked. The as3 for the menu buttons is displayed below.
So I would like to include pageTracker code in the iFrames that is being called.However the iFrames in this case are called from Flex. We are building a pop up and calling the iframes within the pop up.
In this scenario, what is the best way to include the pageTracker code to track and trasnfer the visitor and campaign cookies from one domain to the next?
I want to use Google Analytics on my Vkontakte application (written with Flex). Vkontakte does not support naturally in Google Analytics (not as Facebook) which means I can't even put the Google Analytics JS at the bottom of the page (or even use JS for that matter). What I can use is the AS3 library of Google Analytics, but for some reason it reports of failed gif requests every time I use it to report on an event. Is it even possible to use Google Analytics on the described environment? If so, what could be the reason of the failed gif requests? Is it debugable?
I am trying to push in the Google Analytics library into my As3 widget. I plan to use the EventTracking feature in addition to the regular HTML-like pageview tracking that it provides. I plan to use the library in As3 mode (not the Bridge mode) since the widget is embedded on a lot of external domains.
Using the SWC to add the component to my project adds about 50k in file size. And my widget in itself is a very painstakingly achieved 120kb. I cannot afford the 50k overhead and every KB trimmed takes me closer to actually using GA with my player.
I got the code down from [URL].. and am trying to figure out any libraries that I can weed out to save file size, yet retain core functionality.
I'm using Google analytics in my flash app. It works perfectly, but the time to publich the app came and I'm using an external swf. as preloader, which only consists in an small progress bar and summons my Flash app once it's completely loaded.Now i'm getting this error:Error #1009: Error #1009: Cannot access a property or method of a null object
at com.google.analytics.core::IdleTimer() at com.google.analytics::GATracker/_trackerFactory() at com.google.analytics::GATracker/_factory()
I've got an AS2 flash movie that I need to add Google Analytics tracking into. The only classes I can find are for AS3, do you know of any class method to track in AS2?
I would like to add Google Analytics to my flash file. The flash file is contained in a HTML file, which I already added the script provided by Google Analytics. At the moment, when a user visits my site, regardless which page is visited, only the homepage is counted.What as3 do I add to the flash file to keep track of each page that is being visited? I've tried a few codes provide on Google Analytics page and other tutorials, but none worked. The as3 for the menu buttons is displayed below.[code]
I'm using the asdoc.exe program that came with Flex Builder 3 to generate documentation for FlashMOG. I want to put in my google analytics javascript before the closing body tag of each file. Is there some way to get asdoc to do this?
I am looking for code, examples, library, components for using google analytics event tracking with my Actionscript 2 Flash movies. I can find info about AS3 on the google code site but not AS2. What is the best resource for tutorials and examples about tagging my Flash files to use the asynch google analytics code. I have found some old information about the old google analytics code.
I make a site in pure as3, i make a swf file. Use swfobject, go to my html doc and make a simple version of the site with html and css as my alternate content. Add my javascript code provided by google analytics. Are the results from google analytics a combination of my html and flash enabled users, or only the html users.
I have an as2 site that calls different swfs to the stage from movieclips.The buttons are movieclips and the content that is pulled in is a different swf for each button.How would I go about integrating SWFaddress in here and being able to get analytics functionality out of it?
I am trying to set up google analytics for a full flash site.
I added code to the html page and I think it's working properly - to see who is going to my site. But...for more advanced tracking, I think I need to add code to the flash file too.
I'm have some videos and I would like to add analytics so I can track how many times they were played. Although it sounds like a simple task, I can't seem to find much on the subject.
40k of compiled code seems like a lot to me to be making some straightforward flash-javascript calls and makes GA unsuitable for banner ad work as well.
Does anyone know if there is a 'lite' version of Google Analytics for Flash?
Im completely new to Flash and ActionScript2 but what I need is to add Google analytics code to track clicks from "button" Bellow is a part of my function
I am attempting to add google analytics tracking to an Adobe Air app created with HTML and javascript.I have tried adding the ga.js file and using it like I would in a webpage:
But this doesn't seem to register anything on the analytics dashboard.Have also tried using the GA for flash actionscript library but I can't seem to create an instance of the GATracker as it needs a DisplayObject?
EDIT :using the information from grapefrukt I tried the following:
air.Sprite = window.runtime.flash.display.Sprite; air.GATracker = window.runtime.com.google.analytics.GATracker; var tracker = new air.GATracker( new air.Sprite(), "UA-XXXXXXX-X", "AS3", false );
but I get the following error:TypeError: Error #1009: Cannot access a property or method of a null object reference
I have a flash site that calls a JavaScript function to track events inside of the application, the _gaq is already implemented in the section of the html and it works perfectly fine with one account:
function customTracker(clickEventName) { _gaq.push (["_trackPageview", clickEventName]); }
but now my customer wants to include special events from 3rd party companies and needs these to track into a different GA account. Before I try this out on the live server I wanted to ask if this would work:
function customTracker(clickEventName) { _gaq.push(["_setAccount", "UA-XXXXXXXXX-X"]); // the regular account _gaq.push (["_trackPageview", clickEventName]);
So I think this question is dumb, and I think I may know the answer already but, I think I may also be very confused, so hear goes. I have a website It is made up of an entire flash site, all in pure AS3, I have the flash component for google analytics, I have events set up all over the file to tell me when things are downloaded, using trackEvent, then all the navigation is all set with trackPageview, so thats all good. If I turn on the debug command and test the file, it tells me what is going on, the only event that fires automatically, is if the user watched the entire intro, it will wait for the intro to finish and track that as an event.
The next part of this site uses swfObject, to allow me to use alternate content. The html side of this site is almost the same as the flash side, it uses all the same event tracking, but no pageview tracking, as from my understanding this is tracked automatically when the user goes from section to section, the analytics code is within the head section. So my question is this. If a user has flash and goes to my site, it should only use the analytical stuff that is in the swf file, correct, however because the analytical data from the html file is in the head of that document, it should also track that at the same time, right. so would this chalk up in my analytics as 1 page visit or 2.
I have been running it this way for a month and the reason I am even questioning it is because, in October 2010 before this was all in place, I only had the analytics set up for the html side, and even that set up did not include any event tracking at all, at this point my analytics was averaging 2500 visits a month with an 83% bounce rate. This was obviously untrue as almost everything was counting as a bounce. Now in January my analytical data is looking very different, my visits are sitting on 5600 and my bounce rate is 39%, I think this is looking much better however I am still concerned because I do not know if I really am getting double the visits, or if the html is adding 1 and the flash is adding another simultaneously.
We're building a player with the ultimate goal of allowing others to embed our projects (viewed via this player) on their blogs, etc. Currently, I'm adding long-overdue tracking code to the player so we can track people's usage of it.Since Google Analytics tracking requires a javascript function to be embedded on the page along with the swf, and is accessed via an AS ExternalInterface command, what's the best way to handle this when it comes to letting others embed our swf, but still wanting to track?