New google analytics id doesn't connect

In the fastpages instructions it’s asking for a UA-XXXXXX… formatted id, but I can’t seem to find that in the google analytics interface I created. Mine is formatted G-XXXXXXXXX
Here’s the instruction I am getting from google analytics, and I notice that in my fastpages header, the connection method is different.

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src=""></script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-XXXXXXXXXX');

Here’s my header current header trying to use the G-. id and that doesn’t work,

(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','//','ga');ga('create','G-XXXXXXXXXX','auto');ga('require','displayfeatures');ga('send','pageview');

so it appears that it’s using a different google analytics library called analytics.js instead of gtag.js and the call is slightly different. I wonder if there is a roadmap ticket to implement the new google analytics key format.

I haven’t done mine yet but according to what I’m reading, you just need to cut and paste the new code right after the <head> tag.

You can just edit your _includes/head.html file if you want the quickest way to do it.

The way that I solved it was to click the button on creation of my google analytics data stream which activates the old version of google analytics tag referred to as “Universal Analytics”. Then it created 2 data streams, and one of them was the UA-XXXXXXXXX-X and the other was the G-XXXXXXXXX. When I plugged in the UA- tag, the fastpages blog immediately starting feeding data to google analytics.