Reputation: 3126
Im completely new to Flash and ActionScript2 but what I need is to add Google analytics code to track clicks from "button"
Bellow is a part of my function
this.onRelease = function(){
getURL("http://www.mysite.co.uk/someulr.html","_self");
getURL("javascript:pageTracker._trackPageview('/flash_site.html');","_self");
}
Because there are two links browser on click opens two windows. how can I prevent from this. I obviously need to open just someurl.html
Thank you for your help in advanvce
Upvotes: 2
Views: 499
Reputation: 3963
You could create a generic javascript funcion that would take care of registering the user's click to google and then open the appropriate webpage. I named the function '_trackPageviewAndNavigateTo':
getURL("javascript:pageTracker._trackPageviewAndNavigateTo('/flash_site.html', 'http://www.mysite.co.uk/someulr.html');","_self")
Upvotes: 1
Reputation: 6322
if you can upgrade to as3 then there is a library built by google
http://code.google.com/p/gaforflash/
otherwise this blog post may help
http://blog.circlecube.com/2008/01/28/integrate-google-analytics-with-flash-tutorial/
Upvotes: 0