We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28554
    • 201 Posts
    Hi guys,

    I just noticed that Google’s new Analytics-code has double brackets in it, resulting in MODx seeing it as modx-tags.

    		var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']];
    


    Can anyone tell me how I can escape those double brackets?

    Thanks!
      • 28215
      • 4,149 Posts
      Space them out:

      var _gaq = [ ['_setAccount', 'UA-XXXXX-X'], ['_trackPageview'] ];
      


      JS doesn’t care about spaces in between the brackets; this will make MODx ignore them.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 28554
        • 201 Posts
        Quote from: splittingred at Oct 13, 2010, 08:27 PM

        Space them out:

        var _gaq = [ ['_setAccount', 'UA-XXXXX-X'], ['_trackPageview'] ];
        


        JS doesn’t care about spaces in between the brackets; this will make MODx ignore them.

        Shoulda thought about that. Thanks!