title: Google Analytics Character encoding of __utm cookies
body: <p>I'm trying to figure out what encoding GA uses when it saves cookies.  For example, I can use non-western characters when setting the utm_source parameter and they show up fine in the GA reports. However, if I look at the __utmz cookie, it does not match the value for utm_source parameter, instead is seems to be encoded somehow, I know there is URL encoding, but this is something different.</p>
  
  <p>Example:</p>
  
  <p>1) Visit www.example.com?utm_source=ХЦЧШЩЬЫЪЭЮЯ</p>
  
  <p>2) View cookies.  The __utmz cookie saves whatever value was given to utm_source param. It contains the value Ð¥Ð¦Ð§Ð¨Ð©Ð¬Ð«ÐªÐ­Ð®Ð¯ which seems to be encoded.</p>
  
  <p>3) click around on website then view GA reports.  You see ХЦЧШЩЬЫЪЭЮЯ as visit source, which is correct.</p>
  
  <p>I'm trying to write some JavaScript that will read the __utmz cookie and save it in a Google App Engine Datastore then successfully display it in an HTML page.  I've tried all types of encode(utf-8) decode(utf-8) solutions but nothing seems to work. I assume this is because I don't have the original encoding used when setting the cookie.</p>