通过 Google Analytics 跟踪 Ajax Popover 中的页面

发布于 2024-07-15 03:35:50 字数 507 浏览 4 评论 0原文

我希望跟踪论坛打开时出现的弹出页面 提交于:

http://www.xebra.com/salesAssistance.html

我尝试添加urchin/google 分析代码添加到弹出窗口中显示的页面,但每当我这样做时,状态栏都会显示“Read http://www.google-analytics.com/" 并且整个表单页面变为空白。

跟踪弹出窗口中的页面非常重要,因为该页面是转化目标(我们试图将人们引导至的页面)。

如何阻止 Google Analytics 破坏我的窗口,同时仍跟踪用户是否曾访问过该窗口?


谢谢你,
安德鲁·J·利尔

I am looking to track a Pop-Over page that appears when the forum is
submitted at:

http://www.xebra.com/salesAssistance.html

I tried adding the urchin/google analytics code to the page that is displayed in the pop-over window, but whenever I do so the status bar displays "Read http://www.google-analytics.com/" and the entire form page goes blank.

It is important to track the page in the popover because that page is the conversion goal (the page we are trying to direct people to).

How do I stop Google Analytics from destroying my window, while still tracking that a user has been there?

Thank you,
Andrew J. Leer

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

灵芸 2024-07-22 03:35:50

您可以将谷歌分析代码分成两部分:

一个位于页面顶部:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." :"http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
    var pageTracker = _gat._getTracker("#########");
} catch(err) {}
</script>

另一个位于“end body”标记之前

<script>
   pageTracker._trackPageview();
</script>

,并调用 pageTracker._trackPageview(); 方法“弹出”窗口的 ajaxComplete 回调。

You could separate your google analytics code into two bits:

one that goes on top of the page:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." :"http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
    var pageTracker = _gat._getTracker("#########");
} catch(err) {}
</script>

and the other just before the "end body" tag

<script>
   pageTracker._trackPageview();
</script>

And the call the pageTracker._trackPageview(); method in the ajaxComplete callback of the "pop-up" window.

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