Hey! I'm making a game called Terra Mango. You should check it out.

Google Async Analytics using LocalStorage Test

Thanks! Just visiting this page is helping out. To learn more about what this page is for, read Google Async Analytics Using LocalStorage.


This page's purpose is to test a new Google Analytics snippet that uses localStorage (MDN), when available, instead of cookies.

The way the test works is by first loading the Analytics code into this main frame (named Control Analytics). Once the script has been loaded within the main frame, we'll dynamically create two iframes, one iframe will contain the original async snippet (named Original Analytics), the other will contain our localStorage snippet (named LocalStorage Analytics).

Each of the three snippet contains its own unique tracking ID. If you'd like to be added to the list of users who can read and analyze the captured tracking data, send your email address to .

  // Original Analytics Snippet  
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-55009296-1', 'auto');
  ga('send', 'pageview');
// Semi-prettified version of our localStorage Analytics Snippet  
// See: https://github.com/h5bp/html5-boilerplate/issues/1444 for discussion
+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-55009296-2', l ? {} : {clientId: localStorage.clientId, storage:'none'}),
    ct(function(l,e) {
        localStorage.clientId = l.get('clientId')
    }),
    ct('send','pageview')
}()