如何使用 Google Analytics 跟踪我的 WordPress 点击率?
我正在使用 ANALYTICACTOR 插件来跟踪我的页面点击率,它似乎完全按照需要执行的操作,它将其代码放置在每个页面上。我想知道的是,下面的代码是否有问题,或者我的帐户设置是否错误,因为它要么必须是此代码,要么我的帐户设置不正确。谷歌曾一度追踪到我网站的八次点击,但现在我不知道为什么它不再这样做了。任何帮助将不胜感激,如果一切顺利,我会通过电子邮件给您发送原始剧本,如果您只是尝试,我什至会通过电子邮件给您发送剧本,因为我不会写代码。
我的网站包含完整的 html 代码,位于 http://www.knowledgenation.us
var analyticsFileTypes = [''];
var analyticsEventTracking = 'enabled';
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-21764875-1']);
pub-4733510614502996
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
I am using the ANALYTICACTOR plug in to track my page hits and it seems to do exactly what it needs to be doing, it places its code on every page. What I want to know is , is there something wrong with the code below or could I have my account set up wrong because it either has to be this code or my account settings are not correct. Google did track eight hits to my website at one point and now I do not know why it has stopped doing so. Any help would be appreciated and I will email you an original screenplay if things go well, ill even email you a screenplay if you just try becuse I write i cant code.
my website with the fully html code is at http://www.knowledgenation.us
var analyticsFileTypes = [''];
var analyticsEventTracking = 'enabled';
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-21764875-1']);
pub-4733510614502996
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的页面实际上有两次对 Google Analytics 的调用。页面底部还有另一个将数据发送到
UA-23607774-1
帐户的操作。它工作正常并发送数据,但您上面发布的代码片段报告错误并且无法正确跟踪。带有pub-4733510614502996
的行是问题所在,需要删除。我猜它位于 Google 分析器设置的附加跟踪代码(跟踪器初始化之前)
字段中。Your page actually has two calls to Google Analytics. There's another one at the bottom of the page that sends data to the
UA-23607774-1
account. That's working correctly and sending data but the code snippet you've posted above is reporting an error and not tracking properly. The line withpub-4733510614502996
is the problem and needs to be removed. I'm guessing it's located in theAdditional tracking code (before tracker initialization)
field of the Google Analyticator settings.