Google is deprecating older analytics tagging and changing up the way it's done. Below is an example for one of my websites. This script needs to be inserted on each page after <HEAD>. As Weewx will overwrite each pages index.html, does anyone know how to enter this code snippet and in what file so that weewx page hits can be recorded?
<!-- Google tag (gtag.js) -->
<script async src="
https://www.googletagmanager.com/gtag/js?id=G-2Txxxxxx"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-2Txxxxxx');
</script>