Reputation: 7219
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?
Upvotes: 1
Views: 574
Reputation: 5784
You will need to perform an ExternalInterface call from the flash back to the containing page.
Once you are back in the javascript you can use the javascript library that google provides to send custom events and page views back to google analytics.
It's important to distinguish between tracking events (typically a file download, a video being played, etc...) and pageviews. If you want to track navigation within a flash movie between different "pages" of flash content then you will probably want to use:
var pageTracker = _gat._getTracker('UA-XXXXX-X');
pageTracker._trackPageview('/flash/my_first_page');
Note that this will contribute to your overall page views count.
From google:http://code.google.com/apis/analytics/docs/tracking/asyncMigrationExamples.html
Use the _trackPageview() method along with a URL you fabricate in order to track clicks from users that do not lead to actual website pages on your site. In general, we recommend you use Event Tracking for tracking downloads, outbound links, PDFs or similar kinds of user interactions. This is because virtual pageviews will add to your total pageview count. However, if you want to configure goals based on clicks to PDFs or downloads, you need to use this method (but be aware that these clicks will be tallied as part of your overall pageview count).
Upvotes: 0
Reputation: 3639
Depending on what you are trying to track, why not just have the flash call home. Posting some variables to a script that loads them in a database?
var counter:LoadVars = new LoadVars();
counter.gamename = gametitle; //set variables here
counter.sendAndLoad("http://your script", result_lv, "POST");
Upvotes: 0
Reputation: 7219
Cay That should work but how would you pass your custom account ID?
ie If using the GATracker object
var myTacker=GATracker(containerdisplayObject,'customaccountID','Bridge',false)
Upvotes: 0
Reputation: 12085
I don't believe there is a lite version, similarly i don't believe google analytics intended its service be used for ad tracking. That being said, you should try compressing your swf. You can often shave off a big chunk of the file size especially from text source files.
http://www.compress-swf.com/
http://www.softpedia.com/get/Internet/WEB-Design/Flash/swf-compressor.shtml
Upvotes: 0
Reputation: 3794
How about using directly the javascript functions? say:
ExternalInterface.call("pageTracker._trackPageview", "section/subsection");
ExternalInterface.call("pageTracker._trackEvent", "event", "cat", "label", "value");
Upvotes: 2