Skip to content

Commit

Permalink
Insert Google Analytics snippet with localstorage for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
drublic committed Mar 12, 2014
1 parent 2ca9212 commit ca36e4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.html
Expand Up @@ -339,5 +339,7 @@ <h2 id="modal-label-3">A set of pictures</h2>
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-40657909-2');ga('send','pageview');
</script>

<iframe src="test-gau-localstorage.html" seamless>
</body>
</html>
7 changes: 7 additions & 0 deletions test-gau-localstorage.html
@@ -0,0 +1,7 @@
<script>
+function(l,e){(ct=this[GoogleAnalyticsObject='ct']||function(l,e){(ct.q=ct.q||[]).push(arguments)}).l=+new Date,l=document.createElement('script'),l.src='//www.google-analytics.com/analytics.js',(e=document.getElementsByTagName('script')[0]).parentNode.insertBefore(l,e);try{localStorage.setItem(ct.l,ct.l),l=localStorage.getItem(ct.l)-ct.l,localStorage.removeItem(ct.l)}catch(l){};ct('create','UA-40657909-3',l?{}:{clientId:localStorage.clientId,storage:'none'}),ct(function(l,e){localStorage.clientId=l.get('clientId')}),ct('send','pageview')}();
</script>
<script>
var _gaq = _gaq || [];
_gaq.push(['_trackPageview']);
</script>

0 comments on commit ca36e4f

Please sign in to comment.