Old Google analytics is going away next year; Google says migrate

After months of gentle suggestions, Google has started sending emails about a sunset date for their old analytics (Oct 2023 I think). I don’t care much about this but don’t want to end up left out of searches because something obsolete is on my site.

I clicked on the link to connect my old web property ID to the new analytics and the next day got some email that said I had to put a file in the header of my web pages for this new scheme to work.

An old post in the forum (from 2020) said that you need to use php plugins to do that. If this new scheme is going to be Google’s main analytics tool shortly, can we have something in the Backlight UI that lets us put the script in without having to do custom php?

This is the script Google is after:

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

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

I’ve been using this new format with phplugins for a while. If you want to try it, please let me know.

I’m certain that @Matthew will move to this format way before the current scheme expires in 18 months.

I have also seen the emails, and it’s on my radar. Thanks.

Should I add the above file to my php file?

I suggest not doing anything until we introduce proper support.


Any notes on when the new Google analytics code will be implemented in Backlight?


Support for GA4 came out last week with Backlight 5.0.3: Update: Backlight 5.0.3 – The Turning Gate

@LifeIsABeach Did you not receive the newsletter titled “New! Google Analytics 4 Support in Backlight 5”?

My bad! Thanks for pointing that out. I had mail going into the wrong folder and missed it. I see it now.

Thank you!