title: Google Universal Analytics custom dimensions and trackpageview
body: <p>I'm trying to migrate from Google old Analytics to Universal Analytics. I have code below and from <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/custom-dims-mets" rel="nofollow">universal - developers guide</a> I couldn't find solution.</p>
  
  <p>Inside my analytics code I had these lines. Part 1:        </p>
  
  <pre><code> var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-123456-1']);
  
       _gaq.push(['_trackPageview','/tools/one');
       _gaq.push(['_setCustomVar', 1, 'name', 'michael', 1]);
  
  (function() {
         var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
          ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
          var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
  </code></pre>
  
  <p>Also inside my some other script I have this code snippet. Part 2:</p>
  
  <pre><code>if (typeof _gaq !== "undefined" &amp;&amp; _gaq !== null) {
      _gaq.push(['_trackPageview', '/dosomework']);
  }
  </code></pre>
  
  <p>How can I convert "gaq.push"s inside 2 parts and add to my universal analytics code ?</p>