• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero® Blog

NameHero® Blog

Web Hosting Tips & Resources From NameHero

  • Hosting
    • Web Hosting
    • VPS Hosting
    • WordPress Hosting
    • WooCommerce Hosting
  • Reseller
  • Enterprise
  • Domains
  • Account
  • Blog Home
  • Categories
  • Authors

How To Disable DoubleClick In Google Analytics

Bhagwad Park

Published on: December 11, 2018

Categories: Website Performance 1

In our series of articles on how to improve 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

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

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

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

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

Bhagwad Park Profile Picture
Bhagwad Park

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!

Related Posts

Use Cloudflare Cache Rules Instead Of Page Rules

These days, Cloudflare is putting a lot of effort into revamping its cache system. The other day, I wrote about the new Cloudflare Cache Reserve system that had infinite retention using R2 storage.  Now Cloudflare is splitting its well-known “Page Rules” system into different streams, with one stream dedicated solely to caching. Here’s how it […]

QUIC.cloud Has New Security Features

I'm a big fan of QUIC.cloud, and view it as a competitor to Cloudflare. It's recent security options make it even more attractive.

How To Fix ERR_ADDRESS_UNREACHABLE in Google Chrome (2023)

Follow these simple steps in order to solve the ERR_ADDRESS_UNREACHABLE error in Google Chrome and get back online!

How To Use Cloudflare Bulk Redirects Instead of Page Rules

I like using Cloudflare to process the redirection of my affiliate links. It spares my origin server the extra traffic and results in a faster redirect experience for my visitors. I’d used Page Rules to achieve these redirects for a long time. But the recent tool from Cloudflare called Bulk Redirects offers a better alternative. […]

Reader Interactions

Comments

  1. draadlozeoortjes.com says

    June 1, 2020 at 5:26 am

    Thanks! I Had these settings already, but still a request to doubleclick was made. not sure if I fixed it now, but I saw a new option in Google Analytics withing the Data Collection settings. It’s called “Advanced Settings to Allow for Ads Personalization”. Looks like this will exclude some countries from this setting.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!

Most Popular Posts

NameHero’s Recommended WordPress Plugin and Theme Setup (2023)

WordPress Hosting vs. Web Hosting – What’s The Difference?

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • WordPress Tutorials
  • Enterprise Hosting
  • WooCommerce
  • Web Hosting
  • Resellers
  • Website Security
  • Website Development
  • Website Performance
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero® proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • Domains
Help & Support
  • NameHero Blog
  • Support
  • Help Center
  • Migrations
  • Affiliates
  • Call 1-855-984-6263
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2023 Name Hero, LLC. All rights reserved.
NameHero® is a registered trademark.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA