Support » Plugin: Google Analytics » Why old GA code?

  • I would like to use the new Google Analytics (asynchronous) code, and use that for events tracking etc as well, but this plugin still puts in the old GA code.

    Will this be updated? The last plugin update was just a few weeks ago. Is it being held back? Maybe lots of people’s analytics will stop working if the plugin switches to using the new code?

    This seems like a problem to me. I also saw another plugin, Easy Google Analytics for WordPress, also still uses the old code. Perhaps we just need a new plugin, exact same but with the new code. That would prevent us that have modified the code ourselves to have to worry about future updates switching us back to the old Analytics code.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Howdy,
    Is this the function where I need to replace the code and after replacing the code will it look like this?


    function googleanalytics() {
    $web_property_id = get_option(‘web_property_id’);


    function googleanalytics()
    (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; ?>’, ‘<?php echo str_replace(‘www.’,”,$_SERVER[‘SERVER_NAME’]); ?>’);
    ga(‘send’, ‘pageview’);


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Why old GA code?’ is closed to new replies.