SSL Labs ScoreHSTS Preloaded

Log in to participate

There is no cost to join RicheyWeb, and membership is a requirement to submit bug reports and participate in the support forums.

× Extension Discussions

Send Ad Blocker events to Google Analytics

3 years 2 months ago #1131 by michael
Add this code to your System - Ad...

A good way to learn if your anti-adblock messages are working is to track the adblock status in Google Analytics. This small bit of javascript will send change notifications to an already installed and enabled Google Universal Analytics.

Add this code to your System - Ad Block Reactor plugin, in a new "Change Action" item.

var label = Joomla.getOptions('plg_system_adblockreactor').lastreport===null?'detected':'changed';
var value = window.adblockreactor.vars.lastreport?'enabled':'disabled';
ga('send', 'event', 'adBlocker', label, value);

You should see something like this when you're done:


After your users have a chance to react to your requests to turn off their ad blockers, you should see some data like this in Google Analytics:


Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Powered by Kunena Forum