简体   繁体   English

如何在Wordpress中的不同页面上使用不同的Google Analytics(分析)代码

[英]How to use different google analytics code for different pages in wordpress

I am already using one analytics code for my website. 我已经为我的网站使用了一个分析代码。 But now I want to separately use one more analytics code for specific pages. 但是,现在我想针对特定页面单独使用一个分析代码。 I am using Plugin named "Google Analytics" for integrating analytics code in my website. 我正在使用名为“ Google Analytics(分析)”的插件将分析代码集成到我的网站中。 So is there any way to implement this. 那么有什么方法可以实现这一点。 Thanks in advance... 提前致谢...

So you're probably referring to https://support.google.com/analytics/answer/1032400?hl=en correct? 因此,您可能指的是https://support.google.com/analytics/answer/1032400?hl=zh_CN正确吗?

In this case the plugin you're using won't help. 在这种情况下,您使用的插件将无济于事。 You'll need something like Head & Footer Code plugin and insert codes manually on per post/page basis. 您将需要诸如Head&Footer Code插件之类的东西,并在每个帖子/页面的基础上手动插入代码。

With that, in Tools → Head & Footer Code you'll put your global GA code, but then you can override it with a different code via post/page metabox for individual posts/pages/CPTs. 这样,在“工具”→“页眉和页脚代码”中,您将放置全局GA代码,但随后您可以通过单独的帖子/页面/ CPT的帖子/页面元框使用其他代码覆盖它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM