Want more features on Pastebin? Sign Up, it's FREE!
Guest

Cookie Extract

By: a guest on Feb 25th, 2013  |  syntax: None  |  size: 0.46 KB  |  views: 125  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. < script type = "text/javascript" >
  2.     function readCookie() {
  3.     var utmz = readCookie('__utmz');
  4.     var vals = (function () {
  5.         var pairs = utmz.split('.').slice(4).join('.').split('|');
  6.         var ga = {};
  7.         for (var i = 0; i < pairs.length; i++) {
  8.             var temp = pairs[i].split('=');
  9.             ga[temp[0]] = temp[1];
  10.         }
  11.         return ga;
  12.     })();
  13.  
  14.     dataLayer.push({
  15.         'campaign_source': 'vals.utmcmd'
  16.     });
clone this paste RAW Paste Data