title: Google Analytics tracking code giving CORS error
body: <p>I'm using (what looks to me like) new Google Analytics tracking code that I got from my account yesterday. It makes use of some "Global site tag". I've placed it at the top of my , as GA instructs, but I'm getting a cross origin error when loading my page, so GA isn't tracking my site correctly.</p>
  
  <p>This is the exact message:</p>
  
  <blockquote>
    <p>Access to Script at '<a href="https://www.googletagmanager.com/gtag/js?id=" rel="noreferrer">https://www.googletagmanager.com/gtag/js?id=</a>{my-id}' from origin '{my website}' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value '<a href="http://www.googletagmanager.com" rel="noreferrer">http://www.googletagmanager.com</a>' that is not equal to the supplied origin.</p>
  </blockquote>
  
  <p>The script that is causing this error is included like this</p>
  
  <pre><code>&lt;!-- Global site tag (gtag.js) - Google Analytics --&gt;
  &lt;script async src="//www.googletagmanager.com/gtag/js?id={my-id}"&gt;&lt;/script&gt;
  &lt;script&gt;
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
  
    gtag('config', '{my-id}');
  &lt;/script&gt;
  </code></pre>
  
  <p>That code above is exactly as it comes from Google Analytics, so I'm not sure why it isn't working..</p>
  
  <p>Is anyone able to help?</p>