21286 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1047 Views |
-
Google Analytics

20 May 2011 at 4:33am
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?
-
Re: Google Analytics

20 May 2011 at 8:51am Last edited: 20 May 2011 8:52am
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.
-
Re: Google Analytics

20 May 2011 at 8:57am
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.
| 1047 Views | ||
|
Page:
1
|
Go to Top |


