Advertising Features

This guide describes how to use the advertising features plugin for analytics.js.

Overview

Google Analytics advertising features (including Remarketing Lists for Search Ads) can be enabled in Google Analytics from Property Settings > Data Collection. The advertising features plugin for analytics.js can be used to programmatically enable advertising features, as well as to override and disable all advertising reporting and remarketing features established in the Google Analytics UI.

Note: It's important that you require the plugin after
creating the tracker and before sending the pageview.

The plugin sends a request to stats.g.doubleclick.net that is used to enable advertising features. The plugin creates a new cookie named _gat that has a one minute timeout. This cookie does not store any user information; it's just used to limit the number of requests that have to be made to doubleclick.net.

Change the Cookie Name

The default cookie name is _gat. You can change it by setting
the cookieName option when you require the plugin:

When set to true (the default value), allowAdFeatures allows the displayfeatures plugin and the advertising features settings in Google Analytics to function. This field does not itself turn on these features.

Set allowAdFeatures to false to disable beacons for Google Analytics advertising features, whether they have been enabled via the displayfeatures plugin or from within Google Analytics.