Google AdSense and Google Analytics Remover
Analytics not removed (1 post)

  1. Stufo76
    Posted 3 years ago #

    Hi all,

    my adsense is substituted by placeholder, but analytics don't.

    I suspect regexp used is not updated:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    $buffer = preg_replace("/<script(?:(?!<\/script>|_gaq)[\s\S])+_gaq(?:(?!<\/script>)[\s\S])+<\/script>/i", "", $buffer);				// Remove Google Analytics code

    Here is my analytics tracking code:

    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-12345678-1']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

    Can you help me?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google AdSense and Google Analytics Remover
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.