WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics for WordPress
Extra slashes in source code (1 post)

  1. tokolosheee
    Member
    Posted 8 months 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\']);
      _gaq.push([\'_trackPageview\']);
    
      (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?

    http://wordpress.org/plugins/google-analytics-for-wordpress/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.