Ready to get started?Download WordPress


Google Analytics
How to manually update this plugin (1 post)

  1. Sim2K
    Posted 7 months ago #

    Go to ..


    Find "Google Analytics" and click "Edit"

    Make sure it says ...
    "Editing googleanalytics/googleanalytics.php (active)"

    Look for this code ...

    <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', '<?php echo $web_property_id ?>']);
    (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);

    If you want to use the latest tracking code from Google swap it for this ...

      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      ga('create', '<?php echo $web_property_id ?>', 'XXX-Enter your website address here with out the http://-XXX');
      ga('send', 'pageview');

    Swap "XXX-Enter your website address here with out the http://-XXX" for your website address.

    If you want to stop the the code working for the admin and just for your visitors use this code. It checks to see if you are admin. If you are, it does not run the analytic script and stops you adding counts to your website.

    Before script ..

    if ( !is_super_admin() ) {

    and after the analytics script...


    This will all be lost on the next update. Lets hope he adds it into the next update.

    Let me know if this helped.



You must log in to post.

About this Plugin

About this Topic


No tags yet.