How to Use Google Analytics 4 in Joomla

How to Use Google Analytics 4 in Joomla

Shack Analytics is a single extension to manage all the analytics code on your Joomla sites. 

Shack Analytics now has support for Google Analytics 4, which is rolling out to Google customers. This is a major new version of the world's most popular analytics platform.

In this blog post, we'll give you some details on Google Analytics 4 and why you should upgrade. We'll then show you how to use the Shack Analytics extension to add Google Analytics 4 to your site. Finally, we have some alternative suggestions if you want to get out of the Google ecosystem.


What is Google Analytics 4?

Obviously, it's the fourth major version of Google Analytics, but it's more confusing because Google never used a numbering system before.

  • Version 1 = The original software, acquired and launched in 2005.
  • Version 2 = Asynchronus Tracking, launched in 2009.
  • Version 3 = Universal Analytics, released in 2012.

So it's been nearly a decade since Google released a major update. Each new version has required you to update the code installed on your site.

Version 4 is designed for a world with adblockers and GDPR laws. It's designed to be less dependent on tracking cookies, and there are extra tools to help get end-user consent. It's also possible to customize the data you collect for different regions. For example, you can treat European visitors differently from California visitors.

This being Google, there is also a deeper integration with Google Ads. Inside Google Analytics 4 is a new "Life Cycle Report" showing the whole customer journey, from clicking on ad to buying a product inside an app. This image below is from Radar Interactive and shows how prominent the "Life Cycle" section is in Google Analytics 4:

ui changes ga4


How to use Google Analytics 4 with Joomla

  • Install the Shack Analytics extension.
  • Go "Extensions" then "Plugins".
  • Open the "System - Shack Analytics" plugin.
  • You will have three choices for your analytics:
    • Classic (Version 2)
    • Universal (Version 3)
    • Google Analytics Version 4

ga4 dropdown

  • Shack Analytics will now ask you for a Measurement ID. This is available from your Google Analytics account. It will look different from the old Universal code. With the Universal Analytics you had to provide a Property ID that started with UA-. These new Google Analytics 4 codes start with G-. A typical Google Analytics 4 code looks like this: G-PP45TLVYT1

measurement id


Are there alternatives to Google Analytics?

We've heard from many of you who don't want to use Google services. Fortunately, Shack Analytics has support for other services too. Here are some popular alternatives to Google Analytics:


About the author

Steve is the CEO of Joomlashack. Originally from the UK, he now lives in Sarasota in the USA. Steve has been involved with Joomla since 2006.