08 Jul 2026

Google Analytics 4: complete usage guide

Google Analytics 4 : guide complet d'utilisation
Reading time
Contents
Follow us

Google Analytics 4 (GA4) is the new version of Google's web analytics tool. It lets you measure traffic and engagement on your websites and apps. GA4 introduces a new type of property built for the future of measurement: it collects event-based data rather than session-based data, includes privacy controls such as cookieless measurement and behavioral and conversion modeling, and integrates predictive capabilities along with direct connections to Google's media platforms.

In this article, I will explain how to use Google Analytics 4 to understand and master GA4's features. Whether you are a beginner or an expert in web analytics, you will find practical tips and concrete examples to help you get the most out of GA4. You will learn how to set up your GA4 property, manage your attributes, explore and customize your data, measure and optimize your customer journey, and leverage GA4 for e-commerce.

Introduction to Google Analytics 4

What is Google Analytics 4?

Google Analytics 4 is the successor to Universal Analytics (UA), the previous version of Google Analytics. GA4 launched in October 2020 as the next generation of Analytics. GA4 uses an event-based approach to collect data from your websites and apps. An event is an action a user takes on your site or app, such as viewing a page, clicking a button, adding a product to the cart, and so on. GA4 lets you define your own custom events on top of the automatic events collected by default.

GA4 also gives you access to richer and more flexible reports than UA. You can explore your data using interactive dashboards, filters, segments, and custom dimensions. You can also build your own custom reports based on your specific needs. GA4 also leverages machine learning to surface useful insights, such as revenue forecasts, user trends, and data anomalies.

Why use Google Analytics 4?

There are several reasons why you should use Google Analytics 4 to analyze your website or app. Here are some of the main ones:

  • GA4 is built for the future of measurement: it adapts to the technological and regulatory changes affecting data collection, such as shifting user behaviors, growing mobile usage, and cookie restrictions. GA4 lets you measure your website and app with a single property, making it easier to understand the full customer journey. GA4 also gives you more control over data privacy, allowing you to choose how your data is used and shared with Google.
  • GA4 provides more relevant and actionable insights: it uses machine learning to help you identify opportunities and risks in your data, such as high-value user segments, top-performing products, and friction points in the customer journey. GA4 also makes it easy to integrate your data with Google's media platforms, such as Google Ads, Google Search Console, and YouTube, so you can optimize your marketing campaigns and achieve your goals.
  • GA4 is easier to use and customize: it offers a more intuitive and flexible interface than UA. You can explore your data through predefined dashboards or build your own custom reports. You can also define your own custom events and attributes to measure what matters most for your website or app. GA4 also makes it easier to manage your setup and settings, using the data stream as a single entry point for your GA4 property.

If you currently use a UA property for your website or app, you can migrate to a GA4 property using the GA4 Setup Assistant. You can also run both property types in parallel, using the same Google Tag Manager tag or global site tag. This lets you compare data and reports between UA and GA4 while getting comfortable with GA4's features.

Initial setup of Google Analytics 4

Creating your Google Analytics 4 property

To start using Google Analytics 4, you first need to create a GA4 property in your Google Analytics account. A GA4 property is the entity that collects data from your website or app. You can create a GA4 property by following these steps:

  1. Sign in to your Google Analytics account and click the "Admin" button in the bottom left of the screen.
  2. In the "Account" column, select the account in which you want to create the GA4 property.
  3. In the "Property" column, click the dropdown and select "Create property".
  4. Enter a name for your GA4 property, choose your time zone and currency, and click "Next".
  5. Select whether you want to measure a website, an app, or both, then click "Next".
  6. If you are measuring a website, enter your website URL and a name for your data stream. If you are measuring an app, enter your app name, the package name or ID, and a name for your data stream.
  7. Click "Create" to create your GA4 property and data stream.

You can also create a GA4 property from an existing UA property using the GA4 Setup Assistant. To do so, follow these steps:

  1. Sign in to your Google Analytics account and click the "Admin" button in the bottom left of the screen.
  2. In the "Property" column, select the UA property you want to migrate to GA4.
  3. In the "Property" column, click "GA4 Setup Assistant".
  4. Click "Get started" to create a new GA4 property linked to your existing UA property.
  5. Follow the on-screen instructions to configure your data stream and enable the features you want.

Adding your Google Analytics 4 property to your site

Once you have created your GA4 property, you need to add the tracking code to your website or app to start collecting data. There are several ways to add the tracking code, depending on whether you use Google Tag Manager (GTM) or Firebase. Here are some of the most common methods:

  • If you use GTM to manage your tags, you can add the GA4 tag to your existing GTM container. To do so, follow these steps:
  1. Sign in to your GTM account and select the container for your website or app.
  2. Click "Tags" in the left sidebar, then click the "New" button.
  3. In the window that opens, click "Tag configuration" and select "Google Analytics: GA4 Configuration".
  4. Enter your GA4 measurement ID, which you can find in your GA4 data stream settings.
  5. Enable or disable configuration options as needed, such as click tracking, form tracking, YouTube video tracking, and so on.
  6. Click "Triggers" and select the "All Pages" or "All Events" trigger depending on the type of site or app you are measuring.
  7. Click "Save" to save your GA4 tag.
  8. Click "Submit" to publish your GTM container with the GA4 tag.
  • If you do not use GTM to manage your tags, you can add the global site tag to your HTML source code. To do so, follow these steps:
  1. Sign in to your Google Analytics account and click the "Admin" button in the bottom left of the screen.
  2. In the "Property" column, select your GA4 property.
  3. In the "Data streams" column, click the data stream for your website.
  4. Click "Global site tag (gtag.js)" under "Website tagging".
  5. Copy the code that appears and paste it into the <head> section of every page on your website.
  • If you are measuring a mobile app, you can use Firebase to add the tracking code. To do so, follow these steps:
  1. Sign in to your Firebase account and create a Firebase project linked to your app.
  2. Add Firebase to your app by following the instructions for Android or iOS.
  3. Sign in to your Google Analytics account and click the "Admin" button in the bottom left of the screen.
  4. In the "Property" column, select your GA4 property.
  5. In the "Data streams" column, click the data stream for your app.
  6. Click "Link to Firebase" under "App tagging".
  7. Select the Firebase project you created and click "Link".

Exploring the GA4 interface

Once you have added the tracking code to your website or app, you can start exploring the GA4 interface. The GA4 interface has four main sections:

  • The "Home" section gives you a quick overview of your site or app performance, including number of users, sessions, revenue, and more. You can also see key insights from machine learning, such as forecasts, trends, and anomalies.
  • The "Real-time reports" section shows you what is happening on your site or app right now, including active users, page views, triggered events, and more. You can also filter and segment your real-time data by various criteria.
  • The "Exploration reports" section lets you explore your historical data using predefined or custom dashboards. You can choose from different report types, such as the audience report, the acquisition report, the engagement report, and more. You can also build your own custom reports using the analysis tool.
  • The "Configuration" section lets you manage your GA4 property settings and options. You can edit general property information, manage your data streams, define custom events and attributes, configure your audiences and conversions, and more.

You can navigate between sections using the left sidebar. You can also use the search bar in the top right to quickly find what you are looking for.

Understanding and using GA4's features

Setting up and managing UA and GA4 attributes

One of the most important features of GA4 is the ability to define your own events and custom attributes. Events are the actions users take on your website or app, such as viewing a page, clicking a button, adding a product to the cart, and so on. Attributes are the additional pieces of information you can associate with an event, such as the product name, price, category, and so on.

GA4 automatically collects certain default events and attributes, such as first start, first open, page view, and more. You can consult the full list of default events and attributes in the GA4 documentation. You can also define your own custom events and attributes to measure what matters most for your website or app. For example, you could create a custom event to measure how many times a user subscribes to your newsletter, and attach a custom attribute to indicate the traffic source.

Creating a GA4 attribute

To create a custom event or attribute in GA4, you first need to send the corresponding data to your GA4 property. There are several ways to do this, depending on whether you use GTM or Firebase. Here are some of the most common methods:

  • If you use GTM to manage your tags, you can send data to your GA4 property using the GA4 tag or the custom measurement tag.
  • Sign in to your GTM account and select the container for your website or app.
  • Click "Tags" in the left sidebar, then click the "New" button.
  • In the window that opens, click "Tag configuration" and select "Google Analytics: GA4 Configuration" or "Google Analytics: Custom measurement".
  • Enter your GA4 measurement ID, which you can find in your GA4 data stream settings.
  • Click "More options" and select "Events".
  • Click "Add item" and enter the name of your custom event.
  • Click "Add item" under "Parameters" and enter the name and value of your custom attribute.
  • Click "Triggers" and select the trigger corresponding to the action you want to measure.
  • Click "Save" to save your tag.
  • Click "Submit" to publish your GTM container with the tag.
  • If you do not use GTM to manage your tags, you can send data to your GA4 property using the gtag() function in your HTML source code.
  • Sign in to your Google Analytics account and click the "Admin" button in the bottom left of the screen.
  • In the "Property" column, select your GA4 property.
  • In the "Data streams" column, click the data stream for your website.
  • Click "Global site tag (gtag.js)" under "Website tagging".
  • Copy the code that appears and paste it into the <head> section of every page on your website.
  • Add the following code wherever you want to trigger your custom event: html <script> gtag('event', 'your_event_name', { 'your_attribute_name': 'your_attribute_value' }); </script> Replace the values in quotes with the name and value of your custom event and attribute.

Adding your GA4 attribute to your site

Once you have sent your custom event or attribute data to your GA4 property, you need to register it in the "Configuration" section of GA4. This lets you see your custom events and attributes in your reports and use them to create custom audiences, conversions, dimensions, and metrics. To register your custom events and attributes in GA4, follow these steps:

  1. Sign in to your Google Analytics account and click the "Admin" button in the bottom left of the screen.
  2. In the "Property" column, select your GA4 property.
  3. In the "Property" column, click "Events" under "Data".
  4. Click "Create event" or "Edit event" depending on whether you want to create a new custom event or modify an existing one.
  5. Enter the name of your custom event and click "Next".
  6. Add the attributes you want to associate with your event and click "Save".

Using UA and GA4 attributes simultaneously

If you are running a UA property and a GA4 property in parallel, you can send data to both properties using the same GTM tag or global site tag. This lets you compare data and reports between UA and GA4 while getting comfortable with GA4's features. To send data to both properties, follow these steps:

  • If you use GTM, you can send data to both properties using the GA4 tag.
  • Sign in to your GTM account and select the container for your website or app.
  • Click "Tags" in the left sidebar, then click the "New" button.
  • In the window that opens, click "Tag configuration" and select "Google Analytics: GA4 Configuration".
  • Enter your GA4 measurement ID.
  • Click "More options" and select "Advanced configuration settings".
  • Click "Add item" under "Send data to multiple properties".
  • Enter your UA tracking ID.
  • Click "Triggers" and select the "All Pages" or "All Events" trigger.
  • Click "Save" and then "Submit" to publish.
  • If you do not use GTM, you can send data to both properties using the global site tag.
  • Sign in to your Google Analytics account and click "Admin".
  • In the "Property" column, select your GA4 property.
  • In the "Data streams" column, click the data stream for your website.
  • Click "Global site tag (gtag.js)" under "Website tagging".
  • Copy the code and paste it into the <head> section of every page.
  • Add the following code after the line containing your GA4 measurement ID: ```html ``` Replace UA-XXXXX-Y with your UA tracking ID.

Breaking down Google Analytics 4's features

Dashboards and reports in GA4

GA4 gives you access to dashboards and reports that help you analyze your data and surface useful insights. You can choose from different report types, such as the audience report, the acquisition report, the engagement report, and more. These reports are based on the events and attributes you have defined or that are collected by default. You can also build your own custom reports using the analysis tool.

To access dashboards and reports in GA4, follow these steps:

  1. Sign in to your Google Analytics account and click "Admin" in the bottom left.
  2. In the "Property" column, select your GA4 property.
  3. Click "Exploration reports" in the left sidebar.
  4. Choose the report type you want to view, or click "Create" to build a new custom report.
  5. Explore the data shown. Use filters, segments, dimensions, and metrics to refine your data. Click on elements to drill down into additional details.

Exploring and customizing data with GA4

GA4 lets you explore and customize your data with a great deal of flexibility. You can use the analysis tool to build your own custom reports by selecting the dimensions, metrics, filters, and segments that matter to you. You can also use exploration mode to access more detailed and granular data, using pivot tables, histograms, heatmaps, and more.

To explore and customize your data with GA4, follow these steps:

  1. Sign in to your Google Analytics account and click "Admin" in the bottom left.
  2. In the "Property" column, select your GA4 property.
  3. Click "Exploration reports" in the left sidebar.
  4. Click "Create" to build a new custom report.
  5. Choose the report type you want, such as a table, chart, or diagram.
  6. Add the dimensions and metrics you want to display. Choose from predefined options or create your own custom ones.
  7. Add the filters and segments you want to apply. Choose from predefined options or create your own.
  8. Adjust the appearance and format of your report to your preferences.
  9. Save your report to view it later or share it with other users.

To access exploration mode in GA4, follow these steps:

  1. Sign in and click "Admin".
  2. Select your GA4 property.
  3. Click "Exploration reports" in the left sidebar.
  4. Click the "Exploration mode" button in the top right.
  5. Choose the visualization type you want: pivot table, histogram, heatmap, and so on.
  6. Add the dimensions and metrics you want to display.
  7. Add the filters and segments you want to apply.
  8. Explore your data using the interactive features of your visualization.

Managing specific events and importing data into GA4

GA4 lets you manage specific events that are important for your website or app. You can define events as conversions, meaning actions that align with your goals, such as a purchase, a sign-up, or a download. You can also define events as audiences, meaning groups of users who share certain characteristics or behaviors. These events let you measure and optimize your performance and target users with personalized marketing campaigns.

GA4 also lets you import data from sources other than your website or app, including Google's media platforms such as Google Ads, Google Search Console, and YouTube, as well as third-party sources such as CSV files, APIs, and databases. This data lets you enrich your GA4 data and create more complete and accurate reports.

To manage specific events in GA4, follow these steps:

  1. Sign in and click "Admin".
  2. Select your GA4 property.
  3. Click "Conversions" or "Audiences" under "Data".
  4. Click "Create" to create a new event as a conversion or audience.
  5. Enter the name of your event and choose the conditions that must be met. Choose from predefined or custom events and attributes.
  6. Click "Save".

To import data into GA4, follow these steps:

  1. Sign in and click "Admin".
  2. Select your GA4 property.
  3. Click "Data sources" under "Data".
  4. Click "Link" to connect a Google media platform data source and follow the on-screen instructions.
  5. Click "Add a data source" to add a third-party source and follow the on-screen instructions.

Leveraging Google Analytics 4 for e-commerce

Using GA4 to track e-commerce performance

GA4 offers dedicated features for tracking the performance of your e-commerce website or app. You can measure actions users take such as viewing a product, adding it to the cart, and completing a purchase. You can also measure revenue generated by products, categories, and acquisition channels, and compare performance across periods.

To use GA4 for e-commerce performance tracking, first enable enhanced e-commerce tracking in your GA4 property:

  1. Sign in and click "Admin".
  2. Select your GA4 property.
  3. Click "E-commerce settings" under "Data".
  4. Enable "Enable enhanced e-commerce".
  5. Click "Save".

Once enabled, you need to send the corresponding data to your GA4 property. There are several ways to do so depending on whether you use GTM or Firebase:

  • If you use GTM, follow these steps:
  1. Sign in to your GTM account and select the container for your e-commerce site or app.
  2. Click "Tags" then "New".
  3. Click "Tag configuration" and select "Google Analytics: GA4 Configuration" or "Google Analytics: Custom measurement".
  4. Enter your GA4 measurement ID.
  5. Click "More options" and select "Advanced configuration settings".
  6. Enable "Enable enhanced e-commerce".
  7. Click "Events" and add the events you want to measure, such as checkout start, add to cart, purchase, etc. Choose predefined events or create custom ones.
  8. Add the attributes you want to associate, such as product name, price, category, etc.
  9. Click "Triggers" and select the appropriate triggers.
  10. Click "Save" then "Submit".
  • If you do not use GTM, use the gtag() function in your HTML:
  1. Sign in and click "Admin".
  2. Select your GA4 property.
  3. In "Data streams", click the stream for your e-commerce site.
  4. Click "Global site tag (gtag.js)" under "Website tagging".
  5. Copy the code and paste it into <head> on every page.
  6. Add after the GA4 measurement ID line: <script> gtag('set', 'allow_google_signals', true); gtag('set', 'allow_ad_personalization_signals', true); </script>
  7. Add wherever you want to trigger an e-commerce event: <script> gtag('event', 'your_event_name', { 'your_attribute_name': 'your_attribute_value' }); </script>
  • If you are measuring a mobile e-commerce app, use the Firebase SDKs for Android or iOS:
  1. Sign in to Firebase and select the project for your e-commerce app.
  2. Add Firebase to your app following the Android or iOS instructions.
  3. Sign in to Google Analytics, click "Admin", and select your GA4 property.
  4. In "Data streams", click the stream for your app.
  5. Click "Link to Firebase", select your project, and click "Link".
  6. Add event logging code wherever appropriate in your app using the Firebase SDK.

Measuring and optimizing the customer journey with GA4

GA4 lets you measure and optimize the customer journey on your e-commerce website or app. You can analyze user behavior at each stage of the purchase process, from discovery and consideration through conversion and retention. You can also identify friction points such as cart abandonment rate and bounce rate, and test improvements using A/B tests, multivariate tests, and personalization tests.

To measure and optimize the customer journey with GA4, use the following reports:

  • The "Customer journey analysis" report lets you visualize users' paths based on the events you have defined as conversions or audiences. You can see how many users reached each stage, what they did between stages, and which traffic sources contributed.
  • The "Behavior analysis" report lets you analyze how users interact with your site or app based on defined events. You can see frequency, duration, and recency of events, as well as user attributes and event sequences.
  • The "Revenue analysis" report lets you measure revenue generated by your site or app. You can see total revenue, average value per user, per session, or per transaction, broken down by products, categories, and acquisition channels.

To access customer journey reports in GA4, follow these steps:

  1. Sign in and click "Admin".
  2. Select your GA4 property.
  3. Click "Exploration reports" in the left sidebar.
  4. Choose the report you want to view.
  5. Explore the data using filters, segments, dimensions, and metrics.

To optimize the customer journey, you can use these tools:

  • The "Tests and experiments" tool lets you create and manage A/B tests, multivariate tests, and personalization tests. You can measure the impact on conversions, revenue, and engagement, and use machine learning to automatically optimize your tests.
  • The "Integrations" tool lets you connect your GA4 property to Google Ads, Google Search Console, YouTube, and more, enabling you to target users with personalized campaigns and measure marketing effectiveness.

To access these tools:

  1. Sign in and click "Admin".
  2. Select your GA4 property.
  3. Click "Tests and experiments" or "Integrations" under "Data".
  4. Follow the on-screen instructions.

Conclusion on Google Analytics 4

Recap: using GA4

In this article, I explained how to use Google Analytics 4 to understand and master GA4's features. You learned how to:

  • Create and configure your GA4 property.
  • Add the tracking code to your website or app.
  • Explore the GA4 interface.
  • Define and manage your custom events and attributes.
  • Explore and customize your data with the analysis tool and exploration mode.
  • Measure and optimize the customer journey with dedicated reports and tools.

GA4 is a powerful and flexible tool that lets you measure traffic and engagement across your websites and apps. It is built for the future of measurement, offers more relevant and actionable insights through machine learning, and makes it easy to customize your measurement setup.

Becoming a Google Analytics 4 expert

If you want to deepen your knowledge of Google Analytics 4 and become a GA4 expert, here are some resources worth checking out:

Want help building your digital marketing strategy? Feel free to reach out!

FAQs

Q: What is Google Analytics 4?

A: Google Analytics 4 (GA4) is a new measurement tool built for the future. It collects event-based data rather than session-based data from websites and apps to better understand the customer journey.

Q: Why switch to Google Analytics 4?

A: Google Analytics 4 (GA4) is a major upgrade over Universal Analytics, offering new features to help businesses better understand their customers, with more effective tracking and a stronger emphasis on user privacy.

Q: How do I access Google Analytics 4?

A: Sign in to your Google Analytics account. If it is your first time, click "Start measuring". If you already have an account, go to "Admin", click "Create account" in the "Account" column, and provide an account name.

Q: What is the difference between Google Universal Analytics and Google Analytics 4?

A: Google Analytics 4 (GA4) is event-based, while Universal Analytics (UA) is session- and pageview-based. GA4 enables more effective tracking of user behavior and conversions, with a stronger emphasis on user privacy.