Jump to:

10930 Posts in 2613 Topics by 1810 members

All other Modules

SilverStripe Forums » All other Modules » Analytics code changes from New to Legacy Urchin Format

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1360 Views
  • Gringa
    Avatar
    Community Member
    11 Posts

    Analytics code changes from New to Legacy Urchin Format Link to this post

    Does anyone else have this problem? I'm copying/pasting the New Google Analytics Code (ga.js) but when I hit "Save", the code automatically changes to the Legacy Urchin format. I'm using Analytics, not Urchin. Is it possible for the program to insert the new format instead?

    Code pasted:

    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    try {
    var pageTracker = _gat._getTracker("UA-5974966-6");
    pageTracker._trackPageview();
    } catch(err) {}</script>

    Upon Hitting Save code changes to the Urchin format, but with the next-to-last line of code missing :

    <script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script>
    <script type='text/javascript'>
    _uacct = "UA-5974966-6";
    urchinTracker();
    /*code missing: "} catch(err) {}" */
    </script>

  • BuddhaSource
    Avatar
    Community Member
    57 Posts

    Re: Analytics code changes from New to Legacy Urchin Format Link to this post

    Is Page.SS the right place this code ?

    Its better to hardcode it rather than copy pasting to each page from admin.

  • Gringa
    Avatar
    Community Member
    11 Posts

    Re: Analytics code changes from New to Legacy Urchin Format Link to this post

    Thanks for your response. I'm not sure I follow your response.

    Using the Google Analytics module, I did copy/paste the code from Google Analytics. Google gives two versions of the code: Analytics and Urchin. I pasted in the Analytics version. When I hit "save", it changed to the Urchin version automatically.

    Since this is happening, I will copy/paste the code into the html. It would be nice if the extension worked.

    Thanks!

    1360 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.