title: Convert Google Analytics cookies to Local/Session Storage
body: <p><strong>UPDATE</strong>
  <a href="http://jsfiddle.net/musicisair/rsKtp/embedded/result/" rel="noreferrer">http://jsfiddle.net/musicisair/rsKtp/embedded/result/</a></p>
  
  <hr>
  
  <p>Google Analytics sets 4 cookies that will be sent with all requests to that domain (and ofset its subdomains). From what I can tell no server actually uses them <strong>directly</strong>; they're only sent with <code>__utm.gif</code> as a query param.</p>
  
  <p>Now, obviously Google Analytics reads, writes and acts on their values and they will need to be available to the GA tracking script.</p>
  
  <p>So, what I am wondering is if it is possible to:</p>
  
  <ul>
  <li>rewrite the <code>__utm*</code> cookies to local storage after <code>ga.js</code> has written them</li>
  <li>delete them after <code>ga.js</code> has run</li>
  <li>rewrite the cookies FROM local storage back to cookie form right before <code>ga.js</code> reads them</li>
  <li>start over</li>
  </ul>
  
  <p>Or, <strong>monkey patch <code>ga.js</code> to use local storage before it begins the cookie read/write part.</strong></p>
  
  <p>Obviously if we are going so far out of the way to remove the <code>__utm*</code> cookies we'll want to also use the Async variant of Analytics.</p>
  
  <p>I'm guessing the down vote was because I didn't ask a question. DOH!</p>
  
  <p><strong>My questions are:<br>
  Can it be done as described above?<br>
  If so, why hasn't it been done?</strong></p>
  
  <hr>
  
  <p><em>I have a default <code>HTML/CSS/JS</code> boilerplate template that passes YSlow, PageSpeed, and Chrome's Audit with near perfect scores. I'm really looking for a way to squeeze those remaining cookie bytes from Google Analytics in browsers that support local storage.</em></p>