# How To Disable DoubleClick In Google Analytics

> The doubleclick code can load on your site without you even realizing it. Here are two ways to disable DoubleClick in Google Analytics.

- Author: [Bhagwad Park](https://www.namehero.com/blog/author/bhagwad-park/)
- Published: 2018-12-11
- Updated: 2018-12-11
- Category: [Website Performance](https://www.namehero.com/blog/category/website-performance/)
- Web page: https://www.namehero.com/blog/how-to-disable-doubleclick-in-google-analytics/

In our series of articles on [how to improve page speed](https://www.namehero.com/blog/tag/page-speed/), a constant theme is culling as many external resources as possible. Google fonts, CSS and Javascript. Every additional script or CSS file that loads slows things down. Yes, we can defer the loading, and make sure that the viewer can start interacting with the content earlier. But the fact remains that the “Page Load” metric takes into account ALL resources, and the clock keeps ticking until everything is loaded.

Sometimes, extra stuff can download onto your page without you being fully aware of it. For example, most people have Google Analytics installed on their webpage – it’s a staple of tracking, is free, and has more raw functionality than any other tool. Some of us add it directly to our sites, while others use the Google Tag Manager.

## Extra “DoubleClick” Scripts Loaded onto the Site

If you run your website through a tool like webpagetest.org, you will often see something like this in the report showing the number of domains that your page requests:

[![Stats DoubleClick in Google Analytics](https://www.namehero.com/blog/wp-content/uploads/2018/12/Stats-DoubleClick-in-Google-Analytics.png)](https://www.namehero.com/blog/wp-content/uploads/2018/12/Stats-DoubleClick-in-Google-Analytics.png)

Along with the expected resource from google-analytics.com, we also see the following:

*stats.g.doubleclick.net*

This is an additional script that collects specific demographic information about your visitors. You’ve probably enabled it without thinking in Google Analytics because it seemed like a good idea. But you might want to disable it for the following reasons:

## Why Disable DoubleClick in Google Analytics?

The first reason of course, is speed. Every additional domain requires a DNS lookup, connection time, negotiation of SSL etc, and downloading the content. Then the JS needs to run, causing further delays. Every little bit matters!

The second reason is one of privacy. These days, every site is required to have data collection policies in the form of an explicit “Privacy” section. In that, you can provide some differentiation to your site by letting users know that you don’t collect any additional demographic information in addition to the regular Google Analytics code.

The second reason might not matter so much to you, but the first is at least a concrete one!

## Method 1: Disabling DoubleClick from Within Google Analytics

The first method to disable DoubleClick is from inside the Google Analytics page itself. Navigate to your reports and click the “Admin” section at the bottom of the page.

This will present you with three columns, the middle one being called “Property”. Here, click the link called “Tracking Info” and in the drop-down list, click “Data Collection”.

This opens up a pane on the right-hand side. Turn the button to “Off”, and you’re done. You can see the position of the button from within the Analytics interface here:

[![Disable Through Google Analytics](https://www.namehero.com/blog/wp-content/uploads/2018/12/Disable-Through-Google-Analytics.png)](https://www.namehero.com/blog/wp-content/uploads/2018/12/Disable-Through-Google-Analytics.png)

The other is from Google Tag Manager:

## Method 2: Disabling DoubleClick from Google Tag Manager

If you’re using the “Universal Analytics” built-in code from Google tag manager, then you can disable DoubleClick in a much more nuanced manner. You can do so only on specific pages, or you can set other custom rules like when it should be enabled etc.

To do this, go to your Google Analytics tag inside the Tag Manager and click on the “Edit” button. Enable the checkbox labeled “Enable overriding settings in this tag”. Now click the “More Settings” drop-down list and in the “Fields to Set”, use the following as the field name:

```
allowAdFeatures
```

And in the value box, set it to “false”.

This can be easily explained with an image like this:

[![Disable from Google Tag Manager](https://www.namehero.com/blog/wp-content/uploads/2018/12/Disable-from-Google-Tag-Manager.png)](https://www.namehero.com/blog/wp-content/uploads/2018/12/Disable-from-Google-Tag-Manager.png)

Save your tag, publish your changes, and you’re done.

## Result: No More DoubleClick Code

After making one of the above two changes, you can run your page test again. This time you will see that the “stats.g.doubleclick.net” domain is missing as shown here:

[![DoubleClick Code Vanished](https://www.namehero.com/blog/wp-content/uploads/2018/12/DoubleClick-Code-Vanished.png)](https://www.namehero.com/blog/wp-content/uploads/2018/12/DoubleClick-Code-Vanished.png)

This will improve your page speed times and strengthen your privacy policy as well!

## Related posts

- [Google Analytics “Site Speed” Alternatives?](https://www.namehero.com/blog/google-analytics-site-speed-alternatives/)
- [Google To Force Google Analytics 4 Down Our Throats](https://www.namehero.com/blog/google-to-force-google-analytics-4-down-our-throats/)
- [How To Create Custom Events In Google Analytics 4 (GA4)](https://www.namehero.com/blog/how-to-create-custom-events-in-google-analytics-4-ga4/)
- [Fake Traffic In Google Analytics – Don’t Freak Out!](https://www.namehero.com/blog/fake-traffic-in-google-analytics-dont-freak-out/)
