Disable Advertising Features

Because advertising features can be enabled through your Google Analytics admin settings, there may be cases where you need to disable them programmatically. If you’ve configured Connected Site Tags, you’ll need to follow these instructions if you wish this signal to propagate to your Connected Site Tags.

Disable all advertising features

These configurations give you the ability to disable advertising, reporting, and remarketing features, and overrides any property settings established in the Google Analytics user interface.

To disable all advertising features with gtag.js, set allow_google_signals to false:

gtag('set', 'allow_google_signals', false );

To disable advertising features with gtag.js on a specific property, edit the config command for the given GA_MEASUREMENT_ID and set allow_google_signals to false:

gtag('config', 'GA_MEASUREMENT_ID', { 'allow_google_signals': false });

Disable advertising personalization

These configurations give you the ability to disable advertising personalization features.

To disable all advertising personalization with gtag.js, set allow_ad_personalization_signals to false:

gtag('set', 'allow_ad_personalization_signals', false );

To disable advertising personalization with gtag.js on a specific property, edit the config command for the given GA_MEASUREMENT_ID and set allow_ad_personalization_signals to false:

gtag('config', 'GA_MEASUREMENT_ID', { 'allow_ad_personalization_signals': false });

You can also control whether data collected from end users for any property may be used for ads personalization via the ads personalization setting which can be found in Google Analytics’ Property settings.