Created
January 18, 2013 07:31
-
-
Save KELiON/4562940 to your computer and use it in GitHub Desktop.
Google analytics: track page view
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
var trackPageView = function(url) { | |
if (typeof _gat === 'undefined') { | |
_gaq.push(['_setAccount', googleAccountId]); | |
_gaq.push(['_trackPageview', url]); | |
} else { | |
var pageTracker = _gat._getTracker(googleAccountId); | |
pageTracker._trackPageview(url); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment