Mobile app version of vmapp.org
Login or Join
Sherry384

: How to enable Google Analytics in uBlock Origin? I have recently switched from using AdBlock Plus to uBlock Origin Ad blocker in Firefox as it requires less memory (https://github.com/gorhill/uBlock/wiki/uBlock-vs.-ABP:-efficien

@Sherry384

Posted in: #Adblock #GoogleAnalytics

I have recently switched from using AdBlock Plus to uBlock Origin Ad blocker in Firefox as it requires less memory (https://github.com/gorhill/uBlock/wiki/uBlock-vs.-ABP:-efficiency-compared).

Although uBlock Origin presents itself not only as an Ad blocker, but a wide-spectrum blocker (https://github.com/gorhill/uBlock), I would like to enable Google Analytics tracking on all websites (still having other tracking systems disabled) to be able to debug my Google Analytics settings.

Google Analytics is present in a lot of filters uBlock Origin uses, so I believe the easiest solution would be to whitelist the domains Google Analytics uses:


analytics.google.com
google-analytics.com
googletagmanager.com


To do that I have enabled Advanced User settings which should enable Dynamic Filtering (https://github.com/gorhill/uBlock/wiki/Dynamic-filtering).

Then in My Rules I have added these rules:

* analytics.google.com * allow
* google-analytics.com * allow
* googletagmanager.com * allow


And I have made them Permanent.

But the Google Analytics is still blocked when looking into the Real-Time overview on one of my websites. What am I doing wrong?



EDIT: After changing the domain to the correct google-analytics.com as @R .Hill suggested in the comment it works!

I have corrected the domain also in the original answer for everyone else to not be misled.

One more question. When looking into the Network panel displaying activity for a blank HTML page with only Google Analytics installed, there is also a request to stats.g.doubleclick.net. What is this request used for? Do I need to enable also this domain to be able to fully debug the Google Analytics settings?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sherry384

1 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn148

R. Hill says: "The domain for Google Analytics is google-analytics.com, not googleanalytics.com.

You had a typo in your rules. They should be:

* analytics.google.com * allow
* google-analytics.com * allow
* googletagmanager.com * allow


As for stats.g.doubleclick.net: That domain is used by Google for re-marketing tracking. It tracks sites you have visited for the purpose of showing you ads for those sites when you later visit other sites. It shouldn't effect your Google Analytics tracking.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme