1

If I have 3 links on a page that point to the same URL, Google Analytics doesn't seem to differentiate between them. It will tell me the overall percentage of clicks to that URL but not the percentages unique to each of the links.

How do I get GA to tell me which links are most clicked even though they share the same URL?

4

2 回答 2

0

最好的办法是使用事件跟踪,在链接上使用不同的标签来区分它们。

一个问题——_trackEvent通过向 Google 请求跟踪像素来工作。如果您在请求有机会完成之前离开页面,则可能不会记录该事件。如果链接未在新窗口中打开,则以下代码通过将链接延迟少量(150 毫秒)来工作

<script type="text/javascript">
function trackIt(link, label) {
    _gaq.push(['_trackEvent', 'Link', link.href, label]);
    if (link.target == '_blank') return true
    setTimeout('document.location = "' + link.href + '"', 150);
    return false;
}
</script>
<a href="someURL" onclick="return trackIt(this, 'label1');">link 1</a>
<a href="someURL" onclick="return trackIt(this, 'label2');">link 2</a>
于 2012-04-19T15:21:58.040 回答
0

这个问题的答案可能在被问到之后发生了变化,而且由于这篇文章在搜索结果中的排名很高,如果我不提供这个答案,我就会失职。

Analytics 有一项称为增强链接归因的功能,它可以分离出页面上具有相同目的地的链接的跟踪统计信息。这解决了这个问题的确切问题。

上面链接的文档很清楚,但简而言之:

  • 在您的资源的管理员设置中启用使用增强的链接归因功能
  • 为您的链接添加id属性以将它们彼此区分开来
  • 将以下行添加到您的跟踪代码中:
    • ga('require', 'linkid');

请注意,根据文章,启用此功能可能会导致报告生成速度变慢,并且数据存在一些细微差别,但可以随时禁用它。

于 2016-08-31T04:13:33.703 回答