It's a cool tool for Flash/Flex developers, but they know they already were able to track user events without that ;) |
Does somebody know, how Google Analytics should be handled in AJAX applications (like Google Maps or sth similar)? |
Grega, from your JavaScript you can use calls to the Google Analytics API, like this:
if (pageTracker) { pageTracker._trackPageview('/analytics_api/foobar/'); }
... provided you included the Analytics tracker snippet in your HTML page. Something like the following (but copy it from Google Analytics):
<script type="text/javascript"> [snip] </script> <script type="text/javascript"> pageTracker = _gat._getTracker("UA-..."); pageTracker._initData(); pageTracker._trackPageview(); </script>
You'll then see the stats for these calls in the Analytics content-by-path box, in this case, the path would be "/analytics_api/foobar/". |
Philipp, thank you for that.
Grega |
Phillip,
I thought you may want to feature this on your blog: http://www.deanhunt.com/googlespoof.html
If google pagerank could sing ;-) |
See also this add-on to Google tracking code for Flex. The add-on will perform tracking automatically saving you from writing trackPageView() calls manually:
riatest.com/products/targetstat-flex-analytics.html
[Unlinked – Tony] |