forked from LockerProject/Locker
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request LockerProject#938 from LockerProject/analytics
Switch to Google Analytics and adding custom GA events for tracking devs and users
- Loading branch information
Showing
10 changed files
with
57 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
var _kmq = _kmq || []; | ||
function _kms(u) { | ||
setTimeout(function(){ | ||
var s = document.createElement('script'); var f = document.getElementsByTagName('script')[0]; s.type = 'text/javascript'; s.async = true; | ||
s.src = u; f.parentNode.insertBefore(s, f); | ||
}, 1); | ||
} | ||
_kms('//i.kissmetrics.com/i.js'); | ||
if (document.location.hostname === 'singly.com' || document.location.hostname === 'me.singly.com') { | ||
_kms('//doug1izaerwt3.cloudfront.net/de62fe44ea949f4bf216353f81377c37cfcc90dd.1.js'); | ||
var _gaq = _gaq || []; | ||
|
||
if (document.location.hostname === 'singly.com') { | ||
_gaq.push(['_setAccount', 'UA-22812443-1']); | ||
_gaq.push(['_trackPageview']); | ||
} else { | ||
_kms('//doug1izaerwt3.cloudfront.net/09be6bff5c8937e342f601bae6ee004e1e7aab1e.1.js'); | ||
_gaq.push(['_setAccount', 'UA-22812443-3']); | ||
} | ||
|
||
var _gaq = [['_setAccount', 'UA-22812443-1'], ['_trackPageview']]; | ||
(function(d, t) { | ||
var g = d.createElement(t), | ||
s = d.getElementsByTagName(t)[0]; | ||
g.async = true; | ||
g.src = '//www.google-analytics.com/ga.js'; | ||
s.parentNode.insertBefore(g, s); | ||
})(document, 'script'); | ||
})(document, 'script'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters