1

I am using the following code, unlike old GA codes(which are different too), the following code is blocked by my own browser uBlock Origin plugin. My other GA codes are not blocked despite of Ad Blocker is there, I tried to to use Old code for new ID but that did not work either

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-50334670-6"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());

        gtag('config', 'UA-xxxxxxx-6');
    </script>

I tried to put code both in <head> and <body> but no use.

  • 1
    Your snippet is served from googletagmanager.com which then further loads JavaScript from google-analytics.com. If your ad blocker blocks either of those two origins you will have problems. – Stephen Ostermiller Oct 23 '18 at 11:34
  • @StephenOstermiller my concern is not my browser but my site visitors. – Volatil3 Oct 23 '18 at 15:12
  • "my concern is not my browser but my site visitors" If you are concerned about site visitors, why not drop the creepy third-party tracking and just review server logs? You can use something like GoAccess if you need graphs or weekly reports to look at. – Tom Brossman Oct 25 '18 at 7:16
1

Ive used this plugin in the past and in the plugin dashboard you have a 3rd party filters tab.

one of the Privacy filters is blocking the analytics, check which filter is and deactivate it.

Update: Try to deactivate the:uBlock filters - Privacy

Here is a list from quontable with adblocks:

picture from quontable.com

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.