-
Re: Can anyone shed light on Google Analytics issue?
Ryan Rutan Jan 6, 2015 1:29 PM (in response to ronanfeely)When you say you get nothing, you mean? I would run this through a JS debugger and see where it is freezing up.
How are you putting the JS onto the page? Jive Cloud? On-Premise/Hosted?
-
Re: Can anyone shed light on Google Analytics issue?
ronanfeely Jan 9, 2015 10:40 AM (in response to ronanfeely)I got this to work, thanks to Alban Rampon at ARM community. And for the record, we are hosted in the cloud so it goes in the footer by default.
<script>
window.onload = function () {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
var userclass;
var placeid = window.parent.containerType.toString() + ':' + window.parent.containerID.toString();
if (window._jive_current_user.ID < 0) {
userclass = 'guest';
} else {
userclass = 'member';
}
ga('create', 'UA-XXXXXX-X', 'auto');
ga('set', 'dimension1', userclass);
ga('set', 'dimension2', placeid);
ga('send', 'pageview');
}
</script>
-
Re: Can anyone shed light on Google Analytics issue?
jaritars May 6, 2015 10:02 AM (in response to ronanfeely)I tried putting my code into the footer code in the theming tool and google still can't find out. Is that where you put it? Thanks!
-
Re: Can anyone shed light on Google Analytics issue?
danaeinsidler Sep 8, 2015 7:03 AM (in response to jaritars)Did you ever figure out how to get the code to work? I know that Google Analytics/GTM says that their container code needs to be added to each page, but with Jive is this the case?
-
-