Jump to:

23380 Posts in 18311 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Google Analytics

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 1778 Views
  • StevenL
    Avatar
    Community Member
    3 Posts

    Google Analytics Link to this post

    Hello,

    I've just signed up for Google Analytics to proivide me with data about the company website. I have the script I need to put on each page I want to track, but when I click "view HTML" in the CMS and paste the script, it doesn't seem to add it to the page. Also, this is not a *full* HTML, as all it displays is "<p> content </p>, and I can't see any headers or other information I might want to manipulate.

    How can I add this Google Analytics script to my site?

  • moloko_man
    Avatar
    Community Member
    72 Posts

    Re: Google Analytics Link to this post

    I guess I should ask, are you only trying to track one page or every page?

    With silverstripe you can't just add google's code to a page through the CMS. The headers that you will need to work in are in the php files (i.e. page.php) and/or the ss files.

    There is one or two google analytics modules out there,
    http://www.silverstripe.org/modules/

    or there is a tutorial on how to put it in yourself here: http://www.ssbits.com/tutorials/2010/quick-and-easy-google-analytics-with-siteconfig/.

    I used the SSBits tutorial so I could do some custom stuff, it also helped me learn more about how modules work and are built.

  • StevenL
    Avatar
    Community Member
    3 Posts

    Re: Google Analytics Link to this post

    Ideally I'd track every page, but it's not necessary to track them all. At any rate, I'll be tracking multiple pages. Thanks for the links, I'll check those out and see what I can do.

    1778 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.