title: Accessing ClientID set by Google Analytics through Google Tag Manager
body: <p>I have setup a new <strong>Universal Analytics tracking</strong> and would <strong>like to store ClientID in one of the custom dimensions slots</strong>. </p>
  
  <p>The tracking tags are implemented through Google Tag Manager (using the predefined UA tag) and I am having the difficulty to passing the Client ID (via custom JavaScript Macro) with the basic pageview request.</p>
  
  <p>I have named my tracker so that I can access it and this code runs without any error in console, however when used with GTM, it's returning an error.</p>
  
  <pre><code>ga.getByName('trackerGTM').get('clientId'))
  </code></pre>
  
  <p>produces an error:</p>
  
  <pre><code>Uncaught ReferenceError: ga is not defined
  </code></pre>
  
  <p>Any tips?</p>