您请求访问的页面目前没有您的语言版本。您可以从页面底部选择其他语言,或使用 Google Chrome 的内置翻译功能将网页内容即时翻译成您选择的语言。

Modify your ga.js tracking code to enable Remarketing and Advertising Reporting Features for Standard Analytics [Legacy]

You are viewing a legacy article about Universal Analytics. Learn more about Google Analytics 4 replacing Universal Analytics.

If you're still using ga.js, you can enable Remarketing and Advertising Reporting Features for Standard Analytics by replacing the bold text in this example:

Standard tracking code

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxx-y']);
_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);
})();
</script>

 

with the bold text in the example below:

Code modified to enable these features

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxx-y']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;


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

var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
To revert the change, simply modify your tracking code to match the standard tracking code example in this section.

For ga.js, you can override the property settings to turn off Advertising Reporting Features by adding
_gaq.push(['_set', 'displayFeatures', false]);
after the create command, and before the hit is sent.

If you're using Google Tag Manager, follow these instructions to edit the Analytics tag.

该内容对您有帮助吗?

您有什么改进建议?
false
选择适合您的学习路线

请访问 google.com/analytics/learn,这是一项新资源,有助于您充分利用 Google Analytics(分析)4。这个新网站包含各种关于 Google Analytics(分析)的视频、文章和引导式流程,还提供了指向 Discord、博客、YouTube 频道和 GitHub 代码库的相关链接。

立即开始学习!

Search
Clear search
Close search
Main menu
5598546194562252220
true
搜索支持中心
false
true
true
true
true
true
69256
false
false
false
false
false
⌂ 换网址