ActionScript2 中 Google Analitycs 的跟踪代码

发布于 2024-08-19 09:34:01 字数 365 浏览 2 评论 0原文

我对 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

半边脸i 2024-08-26 09:34:01

您可以创建一个通用的 JavaScript 函数,负责将用户的点击注册到 google,然后打开相应的网页。我将函数命名为“_trackPageviewAndNavigateTo”:

getURL("javascript:pageTracker._trackPageviewAndNavigateTo('/flash_site.html', 'http://www.mysite.co.uk/someulr.html');","_self")

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")
在风中等你 2024-08-26 09:34:01

如果您可以升级到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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文