undefined
undefined

Reputation: 5328

Why does calling Google Analytics event tracking from Flash and calling getURL (_blank) stop __utm.gif being returned?

I have set up a way to track events in google analytics from my Flash AS2 swfs. I use the external interface to call

_global.ga_track_event = function(_category:String, _action:String, _label:String, _value:Number) {
     if(ExternalInterface.available) {
        ExternalInterface.call("_gaq.push",['_trackEvent', _category, _action, _label, _value]);
    }   
}

This works great for most of my events and I can see that the __utm.gif is returned in firebug!

However one event I want to call is triggered by user clicking a button which calls a getURL() to open a link in a blank window. When this happens I can see (in firebug) that the __utm.gif is requested (with the correct params for my event) but the gif never seems to be returned. It just hangs with the spinning 'please wait' animation and the ? in the size colum. Does this matter? has the event still been recorded in google analytics? Why would opening the link in blank window cause this to fail. I tried commenting out the getURL line and clicking the button and the __utm.gif is returned ok so I know it is something to do with the getURL.

any ideas?

Upvotes: 0

Views: 407

Answers (1)

Open SEO
Open SEO

Reputation: 1712

Sometimes, you need to figure if the debugging tools you use aren't giving wrong indications, either because they are not appropriate, either buggy, or either too smart to give you the raw data for example.

Here, I would bet the following: Firebug is a page oriented tool (like web browsers), while you are looking at an event occurring when launching a new window.

You could use HttpFox or Fiddler2 to monitor the HTTP stream independently of this change of page, and you would probably see that it works OK.

Another approach to testing, slower but always valid, it to fire data with very specific values, into a GA profile dedicated to development, and check a few hours later that your data has came in.

Upvotes: 2

Related Questions