Sep 15, 2022

How To Set Up GA4

by Digital Marketing Institute

As we move to a cookie-free world GA4 will be vitally important to safeguard customer data. Since GA4 isn’t as reliant on cookie tracking as Universal Analytics, we can continue to report on website and campaign performance while respecting people’s privacy preferences. While Universal Analytics tracks visits and repeat visits using cookies, GA4 is less reliant on cookies as a technology and uses data modelling and machine learning to plug gaps because of users’ privacy choices. This means that to future-proof your tracking, it’s essential to set up and start using GA4 to stay ahead of the competition.

You can also check out our other GA4 detailed guides here, so, when Google shuts down UA, you'll be ready to hit the ground running with GA4.

Tracking the customer journey

As desktop devices and traditional websites were the primary focus of Universal Analytics this is now somewhat out of step with how people engage with business across devices, websites, and mobile apps. While there is a mobile app version of Universal Analytics, data is reported in a separate account property and set of reports. GA4 on the other hand unifies website and mobile app data into one single reporting view so we can measure user interactions and journeys across devices, websites, and apps as they move towards conversion.

With the emergence of omnichannel marketing—which sees businesses provide a seamless customer experience across all touchpoints from website to social, email and app usage—it is important that there’s an analytics tool that can track these journeys and GA4 aims to do this to some degree for channel, website, and app usage. Though in-platform metrics for non-Google products like comments, shares etc., on Facebook or Instagram still need to be tracked in the Meta platform itself, GA4 can track visits from these channels and help map customer journeys across your websites and apps: something that can’t be done in a unified way in Universal Analytics.

Ultimately GA4 should provide more data and details in a single interface to help marketers unearth insights faster.

How to configure GA4

If you don’t have Universal Analytics on your site or mobile app already you can sign up to GA4 on analytics.google.com and follow the setup and code installation instructions. For those who are using Universal Analytics, to help you get set up with GA4, you can use the GA4 setup assistant which is found in the top center of the Admin area in the bottom left corner of Universal Analytics. Simply click the setup assistant and depending on your analytics setup, Google will suggest that you link an existing Universal Analytics tracking code to GA4 or create a new GA4 and install the code separately.

Fig 1 GA4 Setup Assistant
Fig 1 GA4 Setup Assistant

During setup, GA4 will ask you to specify if you are tracking a website or mobile app. These are known as data streams: you can have one data stream feeding website data into GA4 and other data streams that feed your iOS and Android mobile app data into GA4, so remember to set up different data streams for your website and mobile apps where applicable. When complete, GA4 will provide you with a different measurement ID and tracking code for each of your data streams which you can use to link to your site and mobile app.

Why is setting up GA4 important?

Fig 2 Measurement ID
Fig 2 Measurement ID

Tracking code

If you’re setting up a new GA4 you’ll need to add the tracking code to your website and also your mobile app if you have one. You can do this by installing the tracking code into the HTML of your website or by choosing the GA4 configuration tag and adding your GA4 measurement ID in Google Tag Manager if you use GTM. You don’t need to add the tracking code in Google Tag Manager, the measurement ID number will suffice.

Fig 3 GA4 in Google Tag Manager
Fig 3 GA4 in Google Tag Manager

When it comes to mobile app installations, it’s essential to install the correct GA4 measurement ID tag on your website and mobile apps to unify the data in the GA4 interface. Your app developer will be able to help with the installation here.

Audience Signals

Once you have your code installed and you’re recording data, ensure you set up audience signals to enable GA4’s audience modelling engine: this will allow you to report on your website even in the absence of cookies. GA4 will prompt you to enable audience signals during setup. If you need to change these settings, you can do so in the Data Collection section under Data settings in the Admin area.

GA4 eCommerce tracking

For ecommerce websites, it’s important to check if your ecommerce website provider, like Magento, Shopify etc., is compatible with GA4 and to add the GA4 tracking code in the appropriate area in your website settings or analytics plugin.

For websites that use Woocommerce for example, it’s possible to add your GA4 measurement ID to the plugin but you may need a second installation of the plugin to track ecommerce transactions from both Universal Analytics and GA4 at the same time, so it’s worth checking with your web developer about your own setup to decide what’s best. It might be the case that you need your website developer to manually add the GA4 ecommerce output to your website. Details of this can be found on Google here.

GA4 conversion tracking

For the most part, events are automatically tracked in GA4 and you can mark them as Conversions in the “Configure” section in the left-hand menu. When you click on “Events” in “Configure” you’ll see a list of all of the events that GA4 has automatically tracked for you. If there is an event that you think is valuable and worth tracking as a conversion, click the slider and mark it as a conversion.

Fig 4 Set Conversions in GA4
Fig 4 Set Conversions in GA4

If there are specific conversions you want to track, you can set up GA4 events in Google Tag Manager by choosing the GA4 Event tag and entering your names and triggers.

For example, you could write your Event Name in the tag as something like: “new_products_brochure_download” and trigger the event to fire when people click the text “Download Now” on the “/new-products” page path.

Fig 5 Downloads tracked as events in GA4
Fig 5 Downloads tracked as events in GA4

This means that every time someone clicks Download Now on the new products page of your website, GA4 will record a specific event relating to this download.

Fig 6 Set Tag Managers Triggers to Fire GA4 Events
Fig 6 Set Tag Managers Triggers to Fire GA4 Events

This gives you more details than the auto-tracked events which might simply say something like “file download” but with this auto event, you won’t know what that file refers to. Adding specific tags and triggers to Tag Manager to push data to GA4 elevates the level of detail for things like conversion tracking.

Destination URL goals in GA4

If you tracked thank you pages in Universal Analytics and you want to do something similar in GA4 you can create custom conversion events in the GA4 interface. In the Events section in the Configure area, choose to create a New event and there you can set the conditions to track your thank you page. For example, if you want to track visits to the Purchase complete page on your website you might set the conditions like this:

Fig 7 Create Events in GA4
Fig 7 Create Events in GA4

event_name equals “page view” – this tells GA4 you’re tracking a visit of a page as the event.

page_title contains “Order Confirmed” – this tells GA4 to only track when people visit the page that contains Order Confirmed as the page title.

Fig 8 Set Conditions for Custom Events in GA4
Fig 8 Set Conditions for Custom Events in GA4

Once you have set up your custom event you can go to the Conversions area of the Configure area and create a new Conversion Event. Enter the name of your custom event as the Conversion name. In our example we would call the conversion event “purchase” and this will track instances of people seeing the order complete page as a purchase goal, just like destination goals in Universal Analytics. Admittedly it is a little trickier to set up destination goals in GA4, it is something everyone should do to ensure that your GA4 configuration matches your Universal Analytics configuration as best possible.

Linking to other Google products

Once your tag is installed on your website and apps, and your events and conversions are set up to your liking, you can link GA4 to other Google marketing products like Google Ads, Google Search Console, and Google Merchant Center.

You can also link to Big Query for big data analysis, though this may not be necessary for small to medium businesses unless data mining is core to your business. For the most part, linking to the marketing tools will suffice.

Much like Universal Analytics, you can link GA4 natively to other Google Tools, with the addition of the Merchant Center link to GA4: this is not available in Universal Analytics so GA4 provides an extra layer of data around Google Shopping behavior. All of these tools can be linked in the Admin area of GA4 in the center, simply click on the Google product you want to link and follow the onscreen instructions to complete the link. It’s very straightforward to link the tools when you log into Google Analytics with the same email address you use for Google Ads, Search Console etc.

Once complete it will take a few hours to share data across the GA4 reports but it provides many more insights into your activity once the links are finalized and you’ll be able to use GA4 conversions to optimize your bids in Google Ads as you transition to GA4 as your primary analytics tool.

Fig 9 Link GA4 to Other Google Products
Fig 9 Link GA4 to Other Google Products

Creating GA4 goals in Google Ads

After you link GA4 to Google Ads, you can import GA4 goals into Google Ads and use this as the basis of your bid optimization to prepare for the sunsetting of Universal Analytics. To do this, click on the conversions area of Google Ads in the top menu and select Create a new conversion. Choose the import option and select GA4. Next you can choose to import web or app goals into Google Ads. After that you can choose which goals to import.

Fig 9 Import GA4 Goals into Google Ads
Fig 9 Import GA4 Goals into Google Ads

It's vitally important that you validate your conversions between Universal Analytics and GA4 so you know they are recording similar levels to each other.

To do this in Google Ads, click on the GA4 goals you have just imported and edit the goal settings. Set the primary recording method to “secondary” which means Google Ads will record the goal but not use it for bid optimization. This means that you can continue to use your Universal Analytics Goals for bid optimization and if you see that over a number of days and weeks the GA4 goals and Universal Analytics conversions numbers in Google Ads look similar you can decide to switch your GA4 goals to the primary conversion for bid optimization.

Fig 10 Set GA4 Goals to Secondary Goals to Verify Against Universal Analytics
Fig 10 Set GA4 Goals to Secondary Goals to Verify Against Universal Analytics

Don’t forget to set the Universal Analytics goal as a secondary goal so you can continue to track and validate all your conversions in the system while you transition fully to GA4 conversion tracking. It’s important not to set both GA4 and Universal Analytics goals as primary conversions or your Google Ads will double report as you will be duplicating data.

Depending on your business type: lead generation or ecommerce, it’s important to ensure you don’t double-count conversions if you want to track unique conversions only. You can do this by setting the conversion count in Google Ads conversions to “One” for lead submissions so you won’t count every lead form submission, just unique submissions. With ecommerce transactions you might want to count every transaction.

Fig 11 Set Conversion Count in Google Ads
Fig 11 Set Conversion Count in Google Ads

To ensure everything is lining up between GA4 and Universal Analytics in Google Ads you can look at your primary conversions in the Conversions Column. You can then add the "All Conversions" Column which will show both primary and secondary conversions. If your primary and secondary conversions are tracing correctly, your All conversions totals should be double the total of your primary conversion.

Fig 12 Add All Conv. Column to test Primary (Universal Analytics) against Secondary (GA4) conversions
Fig 12 Add All Conv. Column to test Primary (Universal Analytics) against Secondary (GA4) conversions

Tip: Don’t forget to set your date range to the time after you added the GA4 conversions

Verify between platforms

Once your GA4 setup is complete and you’re tracking data, it’s important to take a few weeks to validate the setup against your Universal Analytics data. You can so this by toggling between GA4 and Universal analytics and simply looking at the comparable metrics between the two platforms. The data may not 100% match but if it’s relatively close in terms of metrics, you can decide to start reporting using GA4 as your primary analytics tool

Some of the most common metrics to validate between tools are listed below:

Fig 13 Common metrics to validate
Fig 13 Common metrics to validate

Now that GA4 is set up and ready to actively track customers and their activity, you can make sure that you are accurately tracing and mapping your customer's journey, among other tasks. While you are familiarising yourself with the basics of GA4, you should also check out our guide for Reporting on GA4 and gain deeper insight about the core differences between GA4 vs Universal Analytics.

Upgrade to Power Membership to continue your access to thousands of articles, toolkits, podcasts, lessons and much much more.
Become a Power Member

CPD points available

This content is eligible for CPD points. Please sign in if you wish to track this in your account.