如何知道外部链接被点击的频率?

发布于 2024-11-01 07:51:23 字数 378 浏览 0 评论 0原文

此页面:http://funds.ft.com/CityofLondon/investmentmanagement/HCEWUR 包含“年度报告和概况介绍”部分下的许多链接。这些链接指向的内容托管在第三方供应商fundslibrary.co.uk 上。

我们有什么办法可以跟踪这些链接的点击频率吗?我们无权访问第三方网络服务器日志。

我想到的一种方法是每次单击链接时发布一条指令以使用 jQuery 增加计数,但这意味着我们必须维护计数。

Google Analytics 中是否有任何功能可以为我们提供此信息?

This page: http://funds.ft.com/CityofLondon/investmentmanagement/HCEWUR contains a number of links under the section "Annual Reports & Factsheets". The content these links point at is hosted at fundslibrary.co.uk, a 3rd party supplier.

Is there any way for us to track how often these links are clicked? We don't have access to the 3rd party web server logs.

One way I'm thinking is to POST an instruction to increment a count with jQuery every time the link is clicked, but that would mean us having to maintain the count.

Is there any functionality in Google Analytics that could give us this info?

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

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

发布评论

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

评论(4

神经大条 2024-11-08 07:51:23

如果您使用 点击链接,您可以使用 jQuery 向 Google Analytics 发送事件a href="http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html" rel="nofollow">Google Analytics 异步跟踪代码段。
类似于:

$(document).ready(function(){
  $("a").click(function(){
     _gaq.push(['_trackEvent', 'Links', 'Followed', $(this).attr("href")]);
     return true;
  });
});

这里是使用 Google Analytics(分析)跟踪事件的指南。

You could use jQuery to send an event to Google Analytics when a link is clicked upon if you are using the Google Analytics asynchronous tracking snippet.
Something like:

$(document).ready(function(){
  $("a").click(function(){
     _gaq.push(['_trackEvent', 'Links', 'Followed', $(this).attr("href")]);
     return true;
  });
});

Here is the guide to tracking events with Google Analytics.

圈圈圆圆圈圈 2024-11-08 07:51:23

谷歌分析会告诉您在给定时间段内某个页面有多少次退出。但它无法告诉您他们去了哪里,除非是您网站中的另一个页面。如果您想记录他们当时去了哪里,那么您可能需要执行一些 JavaScript 以便在单击时将信息发送回服务器。

您可以通过网站上的页面提供所有外部链接,将 url 放入查询字符串中,然后处理添加到跟踪表中的请求,然后将它们重定向到他们想要去的地方,但随后您必须更改您想要跟踪的每个链接。

Google analytics will tell you how many exits for a page in a given time period. It cannot tell you where they went to though unless it was to another page in your site. If you want to log where they went when that then you probably would need to do some javascript to send the information back to the server on the click.

You could feed all your outside links though a page on your site, put the url in the query string, then you process the request add to your tracking tables, and then redirect them to where they wanted to go, but then you would have to change every link you want to track.

如此安好 2024-11-08 07:51:23

我可以看到您正在使用旧版本的 GA 跟踪脚本(不是较新的异步版本),并且您正在新窗口中打开链接(使用 target="_blank" 标签)。鉴于此,您只需添加代码以在单击链接时注册页面视图:

onClick="pageTracker._trackPageview('page_name');"

这将针对将出现在报告中的名为 page_name 的页面注册页面视图。这种类型的页面视图称为“虚拟页面视图”。当然,您应该根据链接的去向选择合适的名称放入报告中。您可以从链接的 href 中提取名称。

请注意,执行此操作的另一种方法是使用事件跟踪而不是虚拟页面视图,但基本思想保持不变(在 onClick 事件中调用它)。不同的人对使用哪一种有不同的看法,因此您应该仔细阅读以决定哪种对您的情况更有用。

另请注意,如果您没有为链接打开新窗口/选项卡,则需要使用超时来延迟新页面的加载几毫秒,直到传输跟踪信标。

I can see that you're using the old version of the GA tracking script (not the newer asynchronous version) and that you're opening the links an a new window (using target="_blank" in the <a> tag). Given this you just need to add code to register a page view when the link is clicked:

onClick="pageTracker._trackPageview('page_name');"

This will register a page view against a page called page_name that will appear in reports. This type of page view is called a "virtual Page View". You should, of course, choose suitable names to put into the reports based on where the links are going. You could possibly extract the names from the href of the link.

Note that another way of doing this would be to use event tracking instead of virtual page views but the basic idea would remain the same (call it in the onClick event). Different people have different opinions about which one to use so you should read up on it to decide what's more useful for your situation.

Also note that if you weren't opening a new window/tab for the link then you would need to use a timeout to delay loading of the new page for a few milliseconds until the tracking beacon had been transmitted.

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