会员登录 | 会员注册 | 意见建议 | 网站地图

站长资源综合门户

当前位置:首页 > 站长学院 > 建站经验 > 没有网站也能玩转谷歌 Analytics

没有网站也能玩转谷歌 Analytics

时间:2012-06-27 19:48:09   作者:   来源:   点击:

httpd.conf文件年夜概470行左右(不合机械可能稍有不合)找到以下位置:

# Virtual hosts

# Include conf/extra/httpd-vhosts.conf

去失落"# Include conf/extra/httpd-vhosts.conf"前面的"#"如下:

# Virtual hosts

Include conf/extra/httpd-vhosts.conf

(4)修改Apache配置文件httpd-vhosts.conf

httpd-vhosts.conf文件位置:C:Program FilesApache Software FoundationApache2.2confextra

在httpd-vhosts.conf文件中追加以下信息:

<VirtualHost *:80> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/from" ServerName from ErrorLog "logs/from-error.log" CustomLog "logs/from-access.log" common

</VirtualHost>

<VirtualHost *:80> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/to" ServerName to ErrorLog "logs/to-error.log" CustomLog "logs/to-access.log" common

</VirtualHost>

<VirtualHost *:80> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/yourdomain" ServerName yourdomain ErrorLog "logs/yourdomain-error.log" CustomLog "logs/yourdomain-access.log" common

</VirtualHost>

(5)重新启动Apache

点击任务栏"Apache Service Monitor"图标(如果没有可以在"起头→所有法度→Apache HTTP Server 2.2"中找到):

呈现以下界面:

点击"Restart"按钮重新启动Apache。

步调四:拜候测试网页,进入谷歌 Analytics确认跨域跟踪数据

(1)拜候yourdomain

(2)点击链接:Multi-domain test

(3)点击链接:Link To Site to

(4)点击链接:Link To Site from

(5)此时可以在谷歌 Analytics的实时拜候述说中发现数据已经发送成功:

文章来历:数码林网站阐发博客,欢迎转载,但转载请注明出处。

分享到:

网友评论

热门建站经验