Google Analytics


(Peter Kroman) #1

Hi,

I am working to implement Google Analytics to my site http://genealogiskforum.dk.

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.


(Rob Beattie) #2

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.

Rob


(Peter Kroman) #3

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?


(Mark Sealey) #4

Just the JavaScript as supplied by GA… no PHP


(Peter Kroman) #5

Thanks @MarkSealey

That helped :slight_smile:


(Mark Sealey) #6

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

<script>
… … …
</script>

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: