Skip to content

Instantly share code, notes, and snippets.

@softvar
Last active September 19, 2019 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save softvar/162b57deb9c71ee192b6d496cae8ca44 to your computer and use it in GitHub Desktop.
Save softvar/162b57deb9c71ee192b6d496cae8ca44 to your computer and use it in GitHub Desktop.
var env=location.search.split('env=')[1] ? location.search.split('env=')[1] : 'pushcrew';
var account_hash=location.search.split('hash=', 32)[1] ? location.search.split('hash=', 32)[1] : '9124e552b5bae794f8d75b23813e9d84';
if (account_hash.indexOf('&') > 0) {
account_hash = account_hash.split('&')[0];
}
(function(p,u,s,h){
p._pcq=p._pcq||[];
p._pcq.push(['_currentTime',Date.now()]);
s=u.createElement('script');
s.type='text/javascript';
s.async=true;
s.src='https://cdn.' + env + '.com/js/'+ account_hash + '.js';
console.log('https://cdn.' + env + '.com/js/'+ account_hash + '.js');
h=u.getElementsByTagName('script')[0];
h.parentNode.insertBefore(s,h);
})(window,document);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment