Created
February 8, 2016 18:51
-
-
Save geramirez/88eb828c5cf7376436f8 to your computer and use it in GitHub Desktop.
AnalyticsCheckerScript
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 data = {'UACodes': []}; | |
var gaUniversal = window.ga; | |
if (typeof gaUniversal === "function") { | |
gaUniversal.getAll().map(function (element){ | |
data['UACodes'].push({ | |
version: 'Google Analytics Universal', | |
trackingId: element.get('trackingId'), | |
anonymizeIp: element.get('anonymizeIp'), | |
forceSSL: element.get('forceSSL') | |
}) | |
}); | |
} | |
if (window.oCONFIG) { | |
data['DAP'] = { | |
agency: oCONFIG['AGENCY'], | |
ua_codes: oCONFIG['GWT_UAID'], | |
sub_agnecy: oCONFIG['SUB_AGENCY'], | |
version: oCONFIG['VERSION'], | |
}; | |
} | |
console.log(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment