Google Analytics


I am working to implement Google Analytics to my site

The site is built in RW6, Stacks3 and Foundation, and I am using Sitelok as user and acces security.

Well now Google Analytics i asking me to add some code on my pages, and I am not sure just where and how to add this code.

Google Analytics is showing me this site (it is in danish but I hope it makes sense anyway). IN the section “PHP Implementation” it says that I should create a file and name it “analyticstracking.php” with the code above and add it to every single php template page. And it says that I should add the line below to every single template page just after the starting tag.

Can anybody help me with where and how to add the code.

In Edit mode, click the spanner icon (top left) to show the list of Settings.

Click Stats

You can insert the code in there.

You only have to insert it once.


Thanks @robbeattie

And is it only the code in the box I need to insert. The one that starts with script

Or should I include the php include-once code in the Code section same place, in the Prefix section?

Just the JavaScript as supplied by GA… no PHP

Thanks @MarkSealey

That helped :slight_smile:

You’re welcome, Peter - just the code between (but including) the <script></script> tags, thus:

… … …

GA has got a lot faster these days: you used to have to wait 24 hours to see any results.

Once you’ve got the code in and published you ought to see results within a few minutes! Good luck :slight_smile: