How to install Google Analytics 4 in your e-commerce (updates + setup tutorial)

Without question, Google Analytics (formerly known as Universal Analytics) is the most popular web analytics tool these days.

However, Analytics launched an updated version in October 2020: Google Analytics 4 (henceforth “GA4″).

Why should you care about this?

If you have Universal Analytics, you should know that there won’t be any more updates to this version, so you’ll have no choice but to migrate to Analytics 4.

And you might get stuck at first if you don’t know how it works.

No worries, though, because in this post we’re going to help you have a more manageable transition by showing you how to upgrade to GA4 – and how to install it, in case you’ve never used it. And, of course, we’re going to tell you everything that’s new in this version.

Ready?

Let’s do this. 😉

NOTE: If you’ve never installed any versions of this tool, now’s the time to do so. Here’s a Google Analytics mega-tutorial to help you get to know it better before we dig any deeper.

👉 Changes in Google Analytics 4

GA4 (formerly known as “App + Web”) is the newest version of Google Analytics. It features new metrics and functionality Universal Analytics didn’t include.

The main innovation is the possibility of analyzing both websites and phone apps in the same property.

Here’s a short explanation, in case you’re not familiar with this concept.

A property is the website you wish to analyze. Suppose it’s your shop’s website.

Previously, if your e‑commerce had a website and mobile app, Universal Analytics wouldn’t let you analyze the app. Later, they enabled this feature, but you still had to create a special “App + Web” property.

Now, Analytics 4 properties can be used with websites, phone apps, or both of them at the same time. In other words, all properties have been unified, making it much easier and more convenient.

But GA4’s improvements don’t end there.  

Because this new generation features significant advancements, such as the use of artificial intelligence (AI) and machine learning to create much more thorough analytics.

✅ 1. What’s new about Google Analytics 4

As we just said, GA4’s main improvement is the use of smart technologies for improved insights and the integration of web and app metrics into a single property.

Overall, it allows for more comprehensive monitoring of user data, but it also features other changes:

  • Main page: a new look, which now includes new web traffic data, such as user tendencies over time.
  • Improved search engine: now allows you to quickly find anything you want. You can also get reports quite easily and make queries related to this tool.
  • Real-time reports: even though they were already included in the earlier version, you can now find out more about the kind of audience that visits your site.
  • Codeless events: prior to GA4, in order to know if someone had clicked on a specific button or downloaded a lead magnet, you had to create a specific event and track those clicks. Now, you can track them automatically without configuring it (i.e., without modifying the HTML code).
  • Engagement section: tells you how long users spend on your site and the engagement each of your events generates. Among other metrics, you can also track scrolling (i.e., how users move around your site) and how many times a certain element has been clicked on.
  • Monetization: this equates to Universal’s e‑commerce reporting, thus giving you a report on the number of purchases in the shop. For example, it tells you the products that are currently selling as well as the most popular ones.
  • Retention report: it shows you your retention rate, which tells you whether your customers keep coming back to you or not.

But that’s not all! Those were only the most important changes.

GA4 has also incorporated a lot of new metrics Universal Analytics lacked. You’ll see them little by little as you familiarize yourself with this tool.

✅ 2. Extra: a walkthrough of the Google Analytics 4 interface

It’s great to be told about but even better to see for yourself.

With this Google video, you can check out the Analytics 4 user interface, navigate through different sections, and explore the new content.

👉 Step-by-step setup of Google Analytics 4

Now that you’ve seen all that’s new in GA4, it’s time to install it. We all known how dreary technical stuff can get, but once you see everything this new tool has to offer, you’ll see that  it’s all worth it.

So let’s get into it right away. 😉

✅ 1. Update to GA4

The first step is to update to the new Analytics version. You have two different ways to do this:

  • If you haven’t created any property yet: you still haven’t started measuring. To start using GA4, you need to create a new property.
  • If you’ve already created a property in Universal Analytics: you just need to use GA4’s setup assistant.

But what if you’ve already created an App + Web property?

In that case, you don’t need to do anything because it will update automatically. If that’s your case, you can skip these steps.

A. If you don’t have a property, create a new property in GA4

You own a store, but you still haven’t paid much attention to metrics (bad move, by the way, because tracking your store’s KPIs is key to improving your conversion).

Right, it’s time to make a move and create a new property in GA4.

First of all, go to the Admin panel.

instalar-google-analytics4-ecommerce

If you click on “Create Property”, you’ll automatically have the option of creating a new property of the GA4 kind.

como-instalar-analytics-4

Next, you have to add some basic information in the pop-up window:

  • Property name
  • Time zone
  • Currency

Then, you need to fill in other fields with your shop’s details. And voilà, your property is all set.

B. If you already have a property in Universal Analytics, use GA4’s setup assistant

We’re now assuming you already have a property because you’ve been using Google Analytics.

How can you migrate to the new version?

By creating a new property in GA4. Plus, this process is much faster because you already filled in the required information to create your first properly in Universal Analytics.

You just need to click where it says “GA4 Setup Assistant”. You’ll see a window like this one:

google-analytics-4-instalar

If you look at it closely, you’ll see a note saying you’ve already created a property in Universal Analytics that won’t undergo any changes.

Click on “Get Started”.

The assistant will take care of everything. It’ll import the existing information (including your created events) and create the new GA4 property.

Important note before moving on:

Remember not to delete any old properties. Even though it’s a Universal Analytics one – so it’ll stop updating at some point – it’ll do no harm to keep the data you’ve gathered so far.

Creating a new property entails gathering new data from scratch and you don’t want to lose information you already had. 😉

✅ 2. Sync Google Analytics 4 with your website

At this point, you either created a new property or updated a Universal Analytics one. Either way, you need to sync your website with GA4.

For this, you need the setup assistant.

como-instalar-analytic-4

Here you need to click on “Tag installation”, which is the first option they give you.

Analytics-4

Then, you’ll see two options to install the tag and sync your website. Let’s go over them separately:

A. With the global site tag (gtag.js)

This tag is an HTML code you can copy from your site’s source code.

como-instalar-google-analytics-4-ecommerce

If you choose this option, you need to:

  • Go to the template’s source code.
  • Choose the “head tag.
  • Install the code provided by the tool (like the one you see in the screenshot above).

If you don’t want to do it manually, you can always resort to a plugin or module.

B. With Google Tag Manager

Just like with the plugin or module, this is an easy and safe alternative that doesn’t require you to modify any code.

In this case, Analytics gives you an alphanumerical tracking ID that you need to copy/paste into Google Tag Manager. And that’s it.

If you don’t know how to do this part, our Google Tag Manager tutorial may come in handy.

✅ 3. Extra video: how to update to GA4

Still can’t wrap your head around it?

Here’s a video where you can see how to set up Google Analytics 4.

👉 Ready to step up to Google Analytics 4?

There really is no excuse.

Update to or install GA4 and keep track of your store’s metrics. Yes, we know we can be a pain in the neck, but we’ll never tire of reminding you, “if you can’t measure it, you can’t improve it.” It’s that simple.

In that vein, here are some of our posts on web analytics:

No excuses! Install GA4 and start tracking properly. 😉