title: Updating Google Analytics and passing through variables
body: <p>I received an email that I needed to update our Google Analytics Javascript on our site. Originally I was not wanting to use Google Tag Manager because it was always blocked by some antivirus programs because you can track the user but it appears everything is now being pushed through the domain googletagmanager. It the original Google Analytics I would push through a variable so I can specify the page they are on and also include other peoples analytics on the page. I can't find any reference on how I would do this with the new format. Can anymore point me or let me know how to do this?</p>
  <p>Old Code</p>
  <pre><code>&lt;script&gt;
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  
    ga('create', 'UA-123456789', 'domain.com');
    ga('create', 'UA-987654321', 'another.com');
    ga('send', 'pageview');
  
  &lt;/script&gt;
  </code></pre>
  <p>New Code</p>
  <pre><code>&lt;!-- Global site tag (gtag.js) - Google Analytics --&gt;
  &lt;script async src=&quot;https://www.googletagmanager.com/gtag/js?id=UA-26066200-3&quot;&gt;&lt;/script&gt;
  &lt;script&gt;
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
  
    gtag('config', 'UA-123456789');
  &lt;/script&gt;
  </code></pre>