Soil plugin Google Analytics module uses obsolete Universal Analytics loader

I had GA configured via the Soil module since my site launched prior to the sunsetting of Universal Analytics this past June. But no data has been collected since then, because Soil was never patched accordingly.

Should be something like this:

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ $gaid }}"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', '{{ $gaid }}');
</script>

I would have reported this as a bug but the issue tracker is disabled…

Looks like this is in motion; a draft PR is up for it here: đŸ‘½ Update the Google Analytics module to GA4 by Log1x · Pull Request #289 · roots/soil · GitHub

This topic was automatically closed after 42 days. New replies are no longer allowed.