-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgoogleAnalytics.js
More file actions
28 lines (22 loc) · 1.16 KB
/
googleAnalytics.js
File metadata and controls
28 lines (22 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
* @overview Google Analytics asynchronous load
* @see http://developer.chrome.com/extensions/tut_analytics.html
* @see https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
*/
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-42943200-1']); // NOTE: Make sure you change this to your own Google Analytics code!!!
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = 'https://ssl.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
// Note: This was the code provided when I setup Google Analytics. Newer version of?
// <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','//www.google-analytics.com/analytics.js','ga');
// ga('create', 'UA-42943200-1', 'chrome-newwindowwithtabstoright.net');
// ga('send', 'pageview');
// </script>