GA4 Migration Guide: Everything You Need to Know

SmartAppSmartApp
9 min read

GA4 migration plan

  1. Choosing a proper TMS

  2. Creating a GA4 property

  3. Setting up the data stream

  4. Cross-Domain Tracking

  5. IP Filters

  6. Domain Referral Filters

  7. Adjust Session Timeout

  8. Connect to Google Ads

  9. Connect to Big Query

Choosing a proper TMS

A tag management system (TMS) is a tool that helps you manage your tags and track pixels across your website or app. It makes it easier to deploy, manage, and update tags without requiring manual changes to the code. Some popular TMS options in 2023 include Google Tag Manager, Tealium, and Adobe Launch. Choose a TMS that meets your needs and budget.

Creating a GA4 property

To create a GA4 property, follow these steps:

  • Sign in to your Google Analytics account.

  • Click on the Admin button in the bottom left-hand corner.

  • Select the account and property where you want to create the GA4 property.

Screenshot showcasing the setup process of a GA4 (Google Analytics 4) property.

GA4 Property Setup Assistant

  • Click on Create Property.

Screenshot depicting the creation of a GA4 (Google Analytics 4) property

GA4 Property Creation

  • Select Web, App, or both depending on your needs.

  • Choose GA4 from the dropdown menu.

  • Give your property a name and click Create.

Setting up the data stream

To set up the data stream for your GA4 property, follow these steps:

  • Click on Data Streams in the left-hand navigation menu.

  • Click on the Add Stream button.

  • Choose a Web or App depending on your needs.

Screenshot illustrating the process of selecting a platform for GA4 (Google Analytics 4) property setup

GA4 Property Choosing a Platform

  • Enter a name for your data stream and click Create Stream.

Screenshot showcasing the creation of a data stream in GA4 (Google Analytics 4)

GA4 Stream Creation

  • Follow the instructions to set up the data stream on your website or app.

Cross-Domain Tracking

Cross-domain tracking allows you to track user behavior across multiple domains or subdomains. To set up cross-domain tracking for your GA4 property, follow these steps:

  • Click on Cross-Domain Setup in the left-hand navigation menu.

  • Enter the domains or subdomains you want to track.

  • Follow the instructions to set up cross-domain tracking on your website or app.

IP Filters

IP filters allow you to exclude traffic from specific IP addresses or IP ranges. To set up IP filters for your GA4 property, follow these steps:

  • Click on Data Settings in the left-hand navigation menu.

  • Click on the Data Filters tab.

  • Click on the Add Filter button.

  • Choose the IP address filter type.

  • Enter the IP addresses or IP ranges you want to exclude.

  • Click Save.

Domain Referral Filters

Domain referral filters allow you to exclude traffic from specific domains or subdomains. To set up domain referral filters for your GA4 property, follow these steps:

  • Click on Data Settings in the left-hand navigation menu.

  • Click on the Data Filters tab.

  • Click on the Add Filter button.

Screenshot highlighting the filter button in GA4 (Google Analytics 4) interface.

GA4 Filter Button

  • Choose the Referral filter type.

  • Enter the domains or subdomains you want to exclude.

  • Click Save.

Adjust Session Timeout

By default, a session in GA4 ends after 30 minutes of inactivity. You can adjust the session timeout to better reflect the behavior of your users. To adjust the session timeout for your GA4 property, follow these steps:

  • Click on Data Settings in the left-hand navigation menu.

  • Click on the Session Settings tab.

  • Adjust the session timeout as needed.

  • Click Save.

Connect to Google Ads

Connecting your GA4 property to Google Ads allows you to see how your ads are performing and optimize your campaigns. To connect your GA4 property to Google Ads, follow these steps:

  • Click on Data Streams in the left-hand navigation menu.

  • Click on the name of your data stream.

  • Click on Additional Settings.

  • Click on Google Ads Linking.

  • Follow the instructions to link your GA4 property to Google Ads.

Connect to BigQuery

Connecting your GA4 property to Big Query allows you to export your GA4 data to a BigQuery table for further analysis. To connect your GA4 property to BigQuery, follow these steps:

  • Click on Data Streams in the left-hand navigation menu.

  • Click on the name of your data stream.

  • Click on Additional Settings.

  • Click on BigQuery Linking.

  • Follow the instructions to link your GA4 property to BigQuery

Creating a GA4 configuration tag through GTM

To create a GA4 configuration tag through Google Tag Manager (GTM), follow these steps:

  • Log in to your GTM account and select the container where you want to create the tag.

  • Click on Tags in the left-hand navigation menu.

  • Click on New Tag.

  • Choose Google Analytics: GA4 Configuration from the tag template gallery.

 Screenshot demonstrating the configuration settings and options in GA4 (Google Analytics 4)

GA4 Configuration

  • Enter a name for your tag and select the GA4 property you want to use.

  • Select the trigger that will fire the tag, such as All Pages or some specific pages, depending on your needs.

Screenshot showcasing the saving process of GA4 tag configuration

GA4 Tag Configuration Saving

  • Click Save.

When your tag has been successfully triggered, the appearance of the Tag Assistant UI will be like this.

Screenshot illustrating the process of initializing GA4 (Google Analytics 4) for website tracking.

GA4 Initialization

  • Preview and test your tag to make sure it’s working as expected.

  • Publish your tag to make it live on your website or app.

That’s it! With these steps, you should be able to set up GA4 for your website or app and track your data more efficiently.

Custom Events in Google Analytics 4

Common on custom events in GA4:

In Google Analytics 4 (GA4), custom events are user interactions with your website or app that you define and track using specific parameters. These events allow you to track specific user actions that are not automatically tracked by GA4, such as form submissions, button clicks, video plays, and more. Here are some examples of common custom events in GA4:

  • Form submissions: This event tracks when a user submits a form on your website or app, including the form ID, form name, and submission time.

  • Button clicks: This event tracks when a user clicks on a button on your website or app, including the button ID, button name, and click time.

  • Video plays: This event tracks when a user plays a video on your website or app, including the video ID, video name, and playing time.

  • Scroll tracking: This event tracks when a user scrolls down a page on your website or app, including the scroll depth and scroll time.

  • File downloads: This event tracks when a user downloads a file on your website or app, including the file name, file type, and download time.

  • Add to cart: You can track when users add items to their cart on your website or app. This can help you understand how many people are interested in your products and which products are the most popular.

  • Search: You can track when users search for something on your website or app. This can help you understand what people are looking for and how well your site or app meets their needs.

  • Custom actions: You can track any custom actions that are important to your business, such as completing a survey or signing up for a newsletter. This can help you understand how well your site or app meets your specific goals and objectives.

Custom events in GA4 are defined using event parameters, which are key-value pairs that describe the event. The key is the parameter name, such as “form_id” or “button_id”, and the value is the parameter value, such as “contact_form” or “submit_button”. By tracking custom events in GA4, you can gain valuable insights into user behavior, optimize your website or app, and drive more conversions.

Steps to create custom events

Setting up custom events in GA4 using Google Tag Manager (GTM) is a convenient way to track user interactions without having to modify your website’s code directly. In this guide, we’ll go through the steps to create custom events using a form submission as an example.

Step 1: Set up GA4 in GTM

  • Log in to your Google Tag Manager account.

  • Create a new tag and choose “Google Analytics: GA4 Event”.

  • Connect your GA4 property by selecting the relevant measurement ID.

  • Enter the event name and choose “Custom” as the event type.

  • Click on “Add Parameter”.

  • Enter the name and value for each parameter you want to track, such as “form_id”, “form_name”, “form_submission_time”, etc.

  • Click on “Save” to create your custom event tag.

Step 2: Set up triggers for your custom event

  • Create a new trigger and choose “Custom Event”.

  • Enter the event name for your custom event, such as “form_submission”.

  • Choose the trigger type based on the action you want to track, such as “form submission” or “click”.

  • Add any additional conditions for the trigger, such as only firing the trigger when a certain form ID or form name is submitted.

  • Click on “Save” to create your custom event trigger.

Step 3: Test your custom event

  • Preview your GTM container to test your custom event.

  • Perform the action that triggers your custom event, such as submitting a form or clicking on a button.

  • Check if the custom event appears in the GTM preview and debug console.

  • Check if the event data is being sent to GA4 by going to the “Events” section in your GA4 property.

Step 4: View the custom event data in GA4

  • Go to the “Events” section in your GA4 property.

  • Select the custom event you created, such as “form_submission”.

  • View the data for your custom event, such as the number of times the event was triggered, the top events, the average value, etc.

  • Use the data to optimize your website or app, improve user experience, and drive more conversions.

Migrating to Google Analytics 4 is a complex process that poses several challenges that must be addressed. To minimize the impact on your reporting systems, we have outlined the essential steps to undertake.

To ensure your business data remains secure, we advise switching to GA4 as soon as possible. This provides ample time to adjust your business systems and reports to the new toolkit and resolve any issues related to the updated GA4 technology.

The migration to GA4 presents an opportunity for companies to utilize advanced user behavior analysis tactics. It is recommended to explore the cross-device tracking and Predictive audiences features, as they offer a new and powerful way to understand your customers.

Since GA4 is a relatively new technology, it is advisable to hire a specialist who is proficient in both Universal Google Analytics and GA4 to handle the migration for your SaaS business. Please, contact us to discuss your migration options.

0
Subscribe to my newsletter

Read articles from SmartApp directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

SmartApp
SmartApp