Browse Source

don't do analytics on https

pull/706/head
Joe Germuska 10 years ago
parent
commit
6528bbd41a
  1. 14
      source/js/Core/Embed/Embed.CDN.js

14
source/js/Core/Embed/Embed.CDN.js

@ -28,11 +28,15 @@ var _gaq = _gaq || [];
var ga = document.createElement('script'), s = document.getElementsByTagName('script')[0];
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
s.parentNode.insertBefore(ga, s);
_gaq.push(['_setAccount', embed_analytics]);
_gaq.push(['_trackPageview']);
if ('https:' != document.location.protocol) { // analytics in https embeds problematic for IE 9/10/some Android
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
s.parentNode.insertBefore(ga, s);
_gaq.push(['_setAccount', embed_analytics]);
_gaq.push(['_trackPageview']);
}
})();

Loading…
Cancel
Save