2

I've been playing with the new google analytics feature:

https://jira.sakaiproject.org/browse/SAK-25634

...and can happily report it definitely does work, albeit with one caveat, I can't get the real time dashboard to work. I know sometimes with new google analytics accounts it can take time for both the data to filter through and the real time to start to work, however, I have had my account for many weeks now and data is indeed filtering through but the real time dashboard stubbornly refuses to work.

My hunch is it's a timezone problem and the reason why it's not showing is because the timestamps on the analytics data from my sakai instance differs from my timezone set on the dashboard (therefore the data is sent but the real time dashboard does not display the data as it sees it being 6-7 hours in the future/past, for example) but I haven't played with this yet. Does anyone know how to fix this problem?

p.s. +1 for universal analytics! https://jira.sakaiproject.org/browse/SAK-28052

EDIT: I discovered there's a timezone setting in the preferences of the sakai app (accessed using your browser), as well as a "server" time displayed in the footer, both are using the correct time, so perhaps it's not that??

andmar8
  • 331
  • 3
  • 14

1 Answers1

2

I set this up anayltics to test on https://qa10.longsight.com and with the sample properties on that jira it didn't work. I changed the domain to just the domain and I did get realtime stats.

For example the following did NOT work portal.google.analytics_domain=https://qa10.longsight.com

But this did portal.google.analytics_domain=qa10.longsight.com

This is the result from viewing it in two browsers.

Real Time Stats Image

jonespm
  • 382
  • 2
  • 17
  • This appears to be one half of the problem, if I change the domain it does indeed start to work _"IF"_ you hand feed into chrome's console debug the example universal analytics code and do a ga('send','pageview'). _However_, the code here: https://source.sakaiproject.org/websvn/filedetails.php?repname=sakai-svn&path=%2Fportal%2Ftrunk%2Fportal-render-engine-impl%2Fpack%2Fsrc%2Fwebapp%2Fvm%2Fneoskin%2FincludeAnalytics.vm%2F&peg=133740&rev=133740 is what sakai is using, and even hand feeding a _gaq.push(['trackPageview']) stil results in no real time hit?? – andmar8 Dec 15 '14 at 13:10
  • Curiouser and curiouser, if I null the _gaq object and manually add the sakai code to a chrome debug console it also works??? It's as if the actual deployed sakai code isn't working... I'm starting to wonder if it "is JUST" the domain and my browser is clinging on to a .js cache using the old domain, hmm... – andmar8 Dec 15 '14 at 13:32
  • OK, so I don't know if the domain url takes a while to update or whether you have to fully clear your browsers' caches but all of a sudden the old analytics code in the current (10.2) sakai code base is now working. Take your bounty, sir. – andmar8 Dec 15 '14 at 13:46
  • Great! I updated the documentation in the properties and commented on the original jira. I haven't tested the universal newer Universal Google Analytics code, but probably will in a few weeks. I'm guessing it should work similarly though. Thanks for the feedback. – jonespm Dec 15 '14 at 16:49