Re: [weewx-user] New Google Analytics 4 / GA4

49 views
Skip to first unread message

Tom Keffer

unread,
Apr 6, 2023, 11:39:18 AM4/6/23
to weewx...@googlegroups.com
Not sure which skin you are referring to, but if it's Seasons, simply put it in index.html.tmpl

On Thu, Apr 6, 2023 at 8:02 AM Parsoli 69 <pars...@gmail.com> wrote:
Hello!

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>

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/d4b08732-7294-4d73-a7dc-93ceb1bb385dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages