User Tracking/Reporting and maybe #url history as a bonus?

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post August 31st, 2009, 8:06 am

Well things have changed quite a bit since this topic was originally written. Google now provides a Flash API that's intended to make the process of tracking pages even easier. Basically, you track an event not content in Flash. So in your button code you make the analytics call and pass in a text string. Google then shows the text string as a page instead of an actual page.

If you decide not to use the Google API you can always use the Flash External Interface to call the tracker javascript embedded in the page. In either case you still track a piece of text instead of an actual page.

Here's some info
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 31st, 2009, 8:06 am

  • studioinlieu
  • Born
  • Born
  • No Avatar
  • Joined: Aug 30, 2009
  • Posts: 3
  • Status: Offline

Post August 31st, 2009, 12:32 pm

I thought the Google Flash API was only good for actionscript 3. I need to get it working in as2. Which method out there do you suggest I investigate further and try to implement? Thanks.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post August 31st, 2009, 1:26 pm

Well the absolute easiest way regardless of the version of AS your using is to simply call do a getURL pointed at some javascript as described http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55520here.

Code: [ Select ]
btnName.onRelease = function(){
getURL("javascript:pageTracker._trackPageview('/folder/file.html');");
}
  1. btnName.onRelease = function(){
  2. getURL("javascript:pageTracker._trackPageview('/folder/file.html');");
  3. }


A more elegant way is to use the Flash External Interface to call the same script. Example Here
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com

Post Information

  • Total Posts in this topic: 18 posts
  • Users browsing this forum: No registered users and 69 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.