Google Analytics by Yoast
Extra slashes in source code (1 post)

  1. tokolosheee
    Posted 1 year ago #

    I've been trying a few plugins trying to get GA to work with my site. I finally see that this one is actually adding some code but it's coming out strange.

    The source code from my site shows the google analytics tracking code like this

    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push([\'_setAccount\', \'UA-xxxxxxxx-x\']);
      (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);

    I can see that the problem is all the extra slashes, how do I prevent those from occurring?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics by Yoast
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.