Flash Making Extra Omniture Tracking Calls



Omniture tracking can be very tricky inside of Flash.  Omniture's introduction of ActionSource has made it easier to implement the tracking calls but there is still a number of issues that happens if not explained correctly.  One common mistake is extra tracking calls.  A lot of times when users click on different trackable components inside Flash the Omniture call gets triggered more than once.  This is becasue the Omniture call variables are not being nulled out after it is being fired.

When implementing Omniture on normal web pages each link click usually sends the user to a new http page.  Since the user is being sent to a new http page the Omniture variables are automatically refreshed because of the new http headers.  In Flash you have to refresh them on your own.

The example below shows an Omniture call in Flash via ActionSource that is not getting refreshed after the call is executed.  Since the variables are not being reset after the call, it is being saved in the ActionSource object and is being sent again on each of the next calls.

s.campaign = "Campaign Name";
s.pageName = "About Us";
s.eVar17 = "value";
s.track();


Since campaign, pageName and eVar17 have not been nulled out after s.track() was called, everytime s.track() gets called in the future it will continue to pass campaign, pageName and eVar17.  This will give you incorrect stats.  You may think you have gotten more hits related to that campaign or eVar than  you really did.

Solution:

s.campaign = "Campaign Name";
s.pageName = "About Us";
s.eVar17 = "value";
s.track();
s.campaign = null;
s.pageName = null;
s.eVar17 = null;


That is it.  Just null out the vars after you make a tracking call and you are good to go.

Let me know.

 

What did you think of this article?




Trackbacks
  • No trackbacks exist for this post.
Comments

  • 8/12/2010 8:12 AM Bhushan wrote:
    I have downloaded ActionSource.xmp and installed. I did successful implementation with AS2.
    but unable to do it with AS3. It's not hitting siteCatalyst. Just showing values in debugger mode. Can you please guide me.
    Reply to this
Leave a comment

Submitted comments are subject to moderation before being displayed.

 Name

 Email (will not be published)

 Website

Your comment is 0 characters limited to 3000 characters.