title: Google Analytics - how to set custom variable with DataLayer
body: <p>I dont know much about Google Analytics (GA). 
  My job now is to find the way to send data from a webshop to be shown in GA at custom variables (key 1) and it must sending with dataLayer.</p>
  
  <p>The data to send is for telling that the visitor is new or have been a customer.</p>
  
  <p>After researching I found only the way to send with ga.js</p>
  
  <p>_gaq.push(["_setCustomVar", 1, "ReturningVisitor", 'Yes', 1]);</p>
  
  <p>But its not work for me, because we send the other data to GA with DataLayer.</p>
  
  <p>This is the example code we send other data:</p>
  
  <p>window.dataLayer = window.dataLayer || [];</p>
  
  <pre><code>var dataToPush = {
    'event': 'transactionEvent',
    'transactionId': '112256',
    'transactionAffiliation': 'CompanyName',
    'transactionTotal': 250.00;?&gt;,
    'transactionTax': 0,
    'transactionShipping': 0,
    'transactionProducts': []
  }
  
  dataLayer.push(dataToPush);
  </code></pre>
  
  <p>So how to add the custom variable (key 1) to this dataLayer? </p>