1

我正在尝试记录每个博客网站作者的点击量。

ga('send', 'pageview'); (in the header with the ga code to track each page)
ga('send', 'pageview', { 'dimension1': 'William' }); (only on blog pages, I want to record the hits of each author)

不幸的是,由于网站的模板,我不能只使用ga set然后发送综合浏览量。

我是否会在每次页面加载时获得 2 次点击,从而在 Google Analytics(分析)中显示不正确的数据?

4

1 回答 1

1

是的,您将获得不正确的双页浏览量。但是,您可以将代码置于 if else 模式吗?

if(currentPage != 'blogpage') //put your conditions identifying if it's blog or not
{
     ga('send', 'pageview'); (in the header with the ga code to track each page)
}else
{
    ga('send', 'pageview', { 'dimension1': 'William' }); (only on blog pages, I want to record the hits of each author)
}
于 2014-05-06T09:26:53.543 回答