Page tree
Skip to end of metadata
Go to start of metadata

Description

All campus webpages must have the University Google Analytics (GA) code to ensure universal and ubiquitous website metrics and reporting.  By using the official University Google Analytics code, the University will gain valuable insight into how our collective customer base navigates our website, which will be a valuable tool as we prioritize our remediation efforts.  

Websites Without Existing GA Code

“<script>
(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','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-193316-2', 'auto');
ga('send', 'pageview');

</script>”



Websites with Existing GA Code

For developers with existing GA code on their web pages would need to edit current code.  The Google Documentation to include multiple Google Analytics properties:

https://support.google.com/analytics/answer/1032400?hl=en
https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers#working_with_multiple_trackers

Developers can keep current Google Analytics code and then add the MarComm managed Google Analytics property. The goal is to have MarComm have a complete/site-wide google analytics while having developers maintain their own access to generate their own reports with their historical data as well as future stats.

 

For example,

 

<script>
  (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','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-193316-2', 'auto', ‘csulb’);
  ga('csulb.send', 'pageview');
  ga('create', 'UA-62438914-1', 'auto', ‘cbaTracker’);
  ga('cbaTracker.send', 'pageview');  </script>”

  • No labels