ActionScript2 中 Google Analitycs 的跟踪代码
我对 Flash 和 ActionScript2 完全陌生,但我需要的是添加 Google 分析代码来跟踪“按钮”的点击,
波纹管是我功能的一部分,
this.onRelease = function(){
getURL("http://www.mysite.co.uk/someulr.html","_self");
getURL("javascript:pageTracker._trackPageview('/flash_site.html');","_self");
}
因为有两个链接,点击浏览器会打开两个窗口。我该如何防止这种情况。我显然只需要打开 someurl.html
谢谢您的帮助
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以创建一个通用的 JavaScript 函数,负责将用户的点击注册到 google,然后打开相应的网页。我将函数命名为“_trackPageviewAndNavigateTo”:
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':
如果您可以升级到as3,那么有一个由google构建的库
http://code.google.com /p/gaforflash/
否则这篇博文可能会有所帮助
http://blog.circlecube.com/2008/01/28/integrate-google-analytics-with-flash-tutorial/
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/