开发者

Google Analytics Flash(ActionScript 2) track GETURL #anchor

I'm trying to track a #anchor for example (mysite.com/#about) the anchor is being called by Flash AS2. how can i tell GA to track hits on this page?

I tried the GETURL method in flash:

getURL("javascript:_gaq.push('www.dropusinit.com/#s开发者_如何转开发witzland');");

which apprently used to work, but since they've made changes this doesn't... during tests firefox navigated to a page with the url javascript:_gaq.push('www.dropusinit.com/#switzland'); was strange.

Do I need to even use flash to ask GA to track the anchor? Is there a way i can point GA to track all anchors that are part of my page?


It seems FireFox / Flash has an issue with this newer tracking could be the .push part of it.

How I have gotten around this, is to have another function in the HTML callGoogleAnalytics(); and call that function from the Flash. If needed you can pass the function a param as well.

HTML

function callGoogleAnalytics(){
   _gaq.push(['trackPageview', '/#switzland']);
}

Flash

getURL("javascript: callGoogleAnalytics();");


try this instead:

getURL("javascript:_gaq.push(['_trackPageview','/#switzland']);");

Of course the page underneath should have Google Analytcs Tracking Code already installed and using the async syntax.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜