Google Analytics


#1

Where do I paste the Google Analytics javascript tracking code? in index.php?


#2

Danny, I was wondering the same thing but believe I have resolved the issue.

I logged into my google analytics account: admin/new account/create/follow the steps till you are presented with the code to copy.

Google then provides you with the code to paste into your website. Within that code there is a property ID along the lines of “UA-3403xxxx-y”. Copy that I.D. then click "save in google analytics.

Paste the ID into the ushahidi admin: http://yoursite.com/admin/settings/site/ then paste into the google analytics box.

After I did this I noticed that the page source on my deployment (all the pages) now contains the analytics code so presume it’s working and racking the whole site. I only did this about an hour ago (hence the research and came across your post) so not sure it’s collecting data but am pretty confident that that should be it now.

Hope this helps

Doug


#3

Hi Doug, just checking back to see if this is working well. Would you be interested in adding a wiki page to document how to best use Google Analytics in a deployment?  Anyone can add a wiki page. It can go here: https://wiki.ushahidi.com/display/WIKI/Ushahidi+User+Guide

Heather


#4

Hi Heather

Actually, after submitting this post the Google Analytics tool was not working. This is because, within the Google Analytics snippet of code there was a string: “ga.async = TRUE;” . The “TRUE” must be lowercase (ga.async = true;)  in order to work. I changed this and is working fine. Also, I have since for other reasons re-installed Ushahidi and noticed that the issue corrected itself - it seems to have been a temporary bug that someone updated.

Before adding a wiki page (Which apear to be more confident in their answers and guidance than the forums) I wanted to check if this issue was familiar to you?

Let me know, if not then I’ll presume it was a one off and will add a wiki page

Thanks Heather!