gpt4 book ai didi

google-analytics - 在Universal Analytics中启用受众特征和兴趣报告

转载 作者:行者123 更新时间:2023-12-03 11:55:27 25 4
gpt4 key购买 nike

我想使用Universal Analytics跟踪代码启用受众特征和兴趣报告。

为我的网站生成的跟踪代码如下所示:

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-999999999-9', 'whatever.com');
ga('send', 'pageview');

</script>

在“展示广告客户功能”下,有一个选项:

Demographics and Interest Reports make Age, Gender, and Interest data available so you can better understand who your visitors are. To see this data, you need to make a small change to your tracking code. Learn more about how to make these tracking code changes.



链接到: https://support.google.com/analytics/answer/2444872?hl=en&utm_id=ad

基本上告诉我要替换:
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') 
+ '.google-analytics.com/ga.js';

带有:
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://')
+ 'stats.g.doubleclick.net/dc.js';

但这似乎是针对不同版本的Google Analytics(分析)(经典Analytics(分析)跟踪代码,而我正在使用新的Universal Analytics)...

我应该替换为:
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

有东西吗(例如。)
})(window,document,'script','//stats.g.doubleclick.net/analytics.js','dc');

另外,我是否真的需要启用广告商功能才能跟踪访问者的年龄和性别?我目前无意使用AdSense。

最佳答案

据我所知,该功能直到阶段3才可用于Universal Analytics。

此链接包含有关通用模式的更多信息:
https://developers.google.com/analytics/devguides/collection/upgrade/

有关在经典模式下执行此操作的更多信息,请参阅下面的文章。
http://online-behavior.com/analytics/demographics

升级页面在“Important Considerations”部分(强调hjpotter92)下具有以下内容:

Data integrations related to the dc.js JavaScript library aren’t supported, but are coming soon.

The dc.js JavaScript library isn't supported in Universal Analytics, but will be in the coming year. If you rely on dc.js related features, such as Remarketing, Google Display Network Impression Reporting, DoubleClick Campaign Manager Integration, or Google Analytics Demographics and Interests Reports, do not upgrade to Universal Analytics yet. Wait until you see an announcement about dc.js in Universal Analytics, and upgrade then.

关于google-analytics - 在Universal Analytics中启用受众特征和兴趣报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19968210/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com