Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adblocker blocks my Angular website (Google Analytics)

I have been informed by a company that they cannot visit my Angular-powered website since I am relying on Google Analytics. It is their policy to block Trackers and Ads.

Since my website is fully made in Angular and one of the dependencies is actually Google Analytics, I was wondering whether I could implement somehow a fallback for visitors that have this type of Adblocker turned on.

Moreover, could I somehow disable the dependency injection when the user blocks it. The core of the problem are the dependencies angulartics

My app.js looks as follows:

angular.module('mywebsite', [
  'angulartics', 'angulartics.google.analytics',
  ]
)

and my index.html

<script src="/bower_components/angulartics/dist/angulartics.min.js"></script>
<script src="/bower_components/angulartics-google-analytics/dist/angulartics-google-analytics.min.js"></script>

Can I rewrite is such that if these scripts get blocked that they get removed as a dependency?

like image 787
JohnAndrews Avatar asked Nov 30 '15 10:11

JohnAndrews


People also ask

Does Adblocker block Google Analytics?

The majority of ad blockers have options to block Google Analytics (GA) and block attempts from the GA JavaScript library to send or retrieve data from analytics servers. Some blockers even block Google Analytics by default.

How do I prevent analytics from blocking my ad blockers?

One of the best ways to prevent Google Analytics blocking is moving the GA tag to the Google Tag Manager Server container. I'm saying “best” because, with Server-Side tagging, you will have many other benefits, not only adblockers and ITP prevention.

Does Adblocker block Google Tag Manager?

The default setup of the adblockers won't hurt Google Analytics or Google Tag Manager. They will block only ads on the page that the user visits. But users can adjust settings and ask adblockers to remove any tracking scripts. In this case, Google Tag Manager won't work.

Can Google Analytics be blocked?

Google Analytics and Google Tag Manager calls are blocked by many adblockers too. This makes site owners wonder whether Google Analytics is still useful and whether its stats are accurate. The level of Google Analytics blockage varies by industry, audience, the device used and the individual website.


1 Answers

Try renaming angulartics-google-analytics.min.js to angulartics-ga.min.js , it may help you.

like image 99
Shota Avatar answered Sep 19 '22 07:09

Shota