Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 谷歌分析推荐不正确_Php_Google Analytics_Referrals - Fatal编程技术网

Php 谷歌分析推荐不正确

Php 谷歌分析推荐不正确,php,google-analytics,referrals,Php,Google Analytics,Referrals,各位早上好 今天我查看了我在分析中的引用,这似乎是错误的 好的,这就是我正在做的。 我在主页上的zuidwolde.nl上做了一些横幅(我计算了在横幅上的点击次数,当点击时,它会将页面转发到添加的域的url) 访问者在domain2的分析中似乎是正确的,但来自domain1的引用是不正确的 如何转发用户: 主页添加: echo '<a href="http://www.zuidwolde.nl?ond=go&id='.$row->websiteID.'&href='.

各位早上好

今天我查看了我在分析中的引用,这似乎是错误的

好的,这就是我正在做的。 我在主页上的zuidwolde.nl上做了一些横幅(我计算了在横幅上的点击次数,当点击时,它会将页面转发到添加的域的url)

访问者在domain2的分析中似乎是正确的,但来自domain1的引用是不正确的

如何转发用户:

主页添加:

echo '<a href="http://www.zuidwolde.nl?ond=go&id='.$row->websiteID.'&href='.urlencode($row->url).'"><img width="166" src="http://www.zuidwolde.nl/'.$row->foto.'"></a>';
echo';
Go.php

Update::hits(intval($_GET['id']));
echo '<h1>You're getting redirected, wait a second.</h1>';
echo '<meta http-equiv="refresh" content="0;URL=http://'.$_GET['href'].'" />';
exit();
Update::hits(intval($\u GET['id']);
echo‘你被重定向了,等一下’;
回声';
退出();
我想元刷新会在domain2上产生一个新的访问者,对吗

有什么问题吗

亲切问候,


Jordy

除了元刷新之外,还有几个可能的问题

如果在两个不同的域上都有GA跟踪,则必须确保:

(1)为跨域跟踪正确配置跟踪代码,以便正确配置推荐人信息。每个不同的域都应该相应地配置
\u setDomainName
功能

此外,为了保持访问者在不同站点之间的连续性,应在页面跟踪中添加
\u setAllowLinker
功能

 _gaq.push(['_setDomainName', 'domain_here']);
 _gaq.push(['_setAllowLinker', true]);
(2)然后对所有横幅链接应用GA
\u link
功能,例如:

<a href="www.blog-hosting-service.com/myBlog"
onclick="_gaq.push(['_link', 'www.blog-hosting-service.com/myBlog']); return false;">View My Blog</a>

有关更多详情,请访问:


如果您没有对同一GA帐户下的所有不同域进行跟踪,并且您希望跟踪与目标域不同域上的横幅链接的引用数据,则可以对横幅链接的URL应用活动标记约定

例如,您可以将
source
活动查询参数设置为承载横幅链接的第一个域的URI

在GA报告UI中,数据将显示在活动下的流量源报告下