Skip to content

Instantly share code, notes, and snippets.

@maxbanton
Last active August 29, 2015 14:00
Show Gist options
  • Save maxbanton/11099552 to your computer and use it in GitHub Desktop.
Save maxbanton/11099552 to your computer and use it in GitHub Desktop.
JavaScript code intended for track that adsense advertising was blocked for display
$(window).load(function () {
if ($("ins.adsbygoogle iframe").height() == null) {
ga('send', 'event', 'adsense', 'blocked');
}
else {
ga('send', 'event', 'adsense', 'shown');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment