mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-30 06:43:02 -05:00
Fix Google Analytics for HTML5 history code
This should stop the site from showing up as its own referrer.
This commit is contained in:
@@ -2866,6 +2866,9 @@ if (window.history && history.pushState) {
|
||||
if (document.location.pathname !== Config.locPrefix + urlLoc) {
|
||||
try {
|
||||
history.pushState(null, null, Config.locPrefix + urlLoc);
|
||||
if (_gaq) {
|
||||
_gaq.push(['_trackPageview', Config.locPrefix + urlLoc]);
|
||||
}
|
||||
} catch (e) {
|
||||
// Throws insecure operation when running on local filesystem.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user