Prerequisites
Google has announced that on July 1, 2023, its standard Universal Analytics properties will stop processing data. Before that date, you must create a custom report in the Monetate platform that uses one of the third-party analytics code samples written for Google Analytics 4 (GA4) with Google Tag and then use that custom report for any active experiences.
You must have a GA4 property before you can create the custom report in Monetate. Refer to Google's Make the switch to Google Analytics 4 documentation to learn how to create the property.
If you don't create a GA4 property, then your existing Google Analytics integration with Monetate will continue to use the legacy version of Google Analytics until July 1, 2023, the date when Google stops collecting data for its standard Universal Analytics properties.
Creating the Custom Report
Follow these steps to create a custom Google Analytics report that's compatible with your GA4 property.
- Click the settings icon in the top navigation bar and then select Integration.
- Click GOOGLE ANALYTICS in the list of third-party analytics reports.
- Confirm that the existing Google Analytics report uses a legacy version of Google Analytics.
- Click SHOW THE CODE BEING USED TO REPORT DATA.
- Confirm that the code does not include
gtag
.
- Click SHOW THE CODE BEING USED TO REPORT DATA.
- Click ADD REPORT and, if necessary, select Custom.
- Give the report a name that differentiates it from the existing Google Analytics report.
- Copy one of the code samples for GA4 from Code Samples for Third-Party Analytics Integrations, and then paste it into the code editor.
- Leave Enable by default for all new experiences set to NO.
- Click CREATE.
Test the new report configuration to ensure it works as expected. Do not add it to any active Web experiences nor enable it for all new Web experiences until you test it.
If you have multiple legacy Google Analytics reports in one domain, ensure that you create and test a new GA4-compatible report for each of them.
Testing the New Report
You can ensure the new GA4 report works from the report configuration page by adding the JavaScript console.log()
method to whichever GA4 report code you input into the code editor.
The following example is the Google Analytics 4 with Google Tag (Minimal) code with the console.log()
method added.
if (typeof(window.gtag) === "function") { for (var i = 0; i < campaigns.length; i++) { var campaign = campaigns[i]; window.gtag('event', campaign.key, { 'event_category': 'Monetate', 'event_label': campaign.split, 'non_interaction': true }); } console.log("Google Analytics 4"); }
Follow these steps to test the new report.
- Add the
console.log()
method to the GA4 report code. - Click the preview icon.
- While viewing the new browser tab or window in which your site loaded in Preview Mode, open your browser's developer tools and then switch to its console.
- Ensure the message that you used with the
console.log()
method in the GA4 report code is present in the console. - In the Monetate platform, remove the
console.log()
method from the GA4 report code, set Enable by default for all new experiences to YES, and then click SAVE.
After you've created and tested all the new GA4-compatible reports across all the domains of your Monetate account, complete the table of report names that your Customer Success Manager (CSM) emailed to you, and then return it so that Monetate Engineering can then deploy the new reports to their respective active Web experiences.
You can view a table of experiences that Monetate is reporting to a GA4 setup on its respective custom report configuration screen of the Third-Party Analytics tab of the Integration page of the Monetate platform settings.
To disable Google Analytics reporting for a single experience, click its name in this table to open it in Experience Editor, then click the additional options menu (...), click Third-Party Analytics, and then toggle Google Analytics to NO in the Third-Party Analytics modal.
Archiving a Legacy Google Analytics Report
After Monetate has enabled the new GA4-compatible report for each active Web experience, you can optionally archive the legacy Google Analytics report(s). If you choose to archive a report, you cannot reactivate it.
Follow these steps to archive a legacy Google Analytics report.
- Click the legacy Google Analytics report in the list of third-party analytics reports.
- Click the archive icon.
- Click OK to confirm that you want to archive the report.
After you click OK, Monetate disables and removes the legacy Google Analytics report from the Third-Party Analytics modal for all existing experiences.
FAQ
Can I determine if my Google Analytics setup is using Universal Analytics or Google Analytics 4 if I'm not logged into Monetate?
When you're logged into the Google Analytics platform, look for these clues to help you determine if you're using UA or GA4:
- If you're using UA, you'll see a blue notification at the top of your account that states UA will no longer be processing new data after July 1, 2023. If you previously dismissed the notification, it will no longer appear.
- If you set up a Google Analytics account before October 14, 2020, then you're likely using UA. Otherwise, you're likely using GA4.
- A UA property ID starts with UA and ends with a number (for example, UA-123456789-1). A GA4 property ID only contains numbers.
For more information see Google's How to check whether you have Universal Analytics or Google Analytics 4 (GA4) documentation.
Can Monetate help me migrate my UA property to my GA4 property?
No, Monetate cannot provide any assistance setting up your GA4 property in the Google Analytics platform and on your site.
Google has released migration guides targeting everyone from beginners to advanced users. Monetate strongly encourages you to follow one of these guides to migrate your Google Analytics property:
- Migration guide for beginners
- GA4 migration walkthrough (videos)
- Advanced topics: Extended migration guides
You may also find assitance customizing your GA4 setup in Google's Common reporting solutions in Google Analytics 4.
Setting Up Google Analytics 4
What actions must I take to set up a new GA4 property for my site?
Setting up a GA4 property is the first step for some sites. If you haven't created a GA4 property, Google will automatically create one for you and copy to it your UA configurations unless you opted out.
See Automatically created Google Analytics 4 properties from Google for more information.
You must also add GA4's gtag.js
snippet to your site. Like its UA analytics.js
counterpart, it allows you to send analytics to your Google Analytics setup. Furthermore, Monetate uses this code to push experience metrics to your Google Analytics account via the third-party analytics integration that either you created in the Monetate platform or that Monetate's Delivery Services team created for you. To learn more about adding gtag.js
to your site, refer to the Add a Google Analytics 4 property (to a site that already has Analytics) and Tips for switching from analytics.js to gtag.js guides from Google.
Refrain from setting up a GA4 integration in the Monetate platform until after you've set up GA4, deployed gtag.js
on your site, and confirmed the new property is working correctly.
Is my GA4 property connected to my UA property?
To determine if your two properties are connected, load your Google Analytics GA4 property in a browser, click the settings cog, and then select Setup Assistant. If your GA4 property is connected to your UA property, then beside the "Setup Assistant" heading appears Connected to [name of your UA property]
in green text. If this green text doesn't appear, then your GA4 property isn't connected to your UA property. See Google's documentation for additional assistance.
Why does data from my site look different in GA4?
Some metrics in GA4 may not align with the metrics collected in UA. These metrics may be impacted:
- Users
- Page views
- Purchases
- Sessions
- Session/traffic-based acquisition metrics
- Conversions
- Bounce rates
- Event counts
Learn more about how GA4 functionality compares to UA in Google's Migration reference. See Comparing metrics: Google Analytics 4 vs. Universal Analytics to better understand the extent to which you can and can't compare metrics between the two versions.
Tags
Do I still have to set up GA4 if I already have gtag.js on my site and use it with Universal Analytics?
Using gtag.js
on your site doesn't exempt you from migrating to GA4. Refer to How gtag.js for UA maps to GA4 to better understand what you need to do.
Can I use both gtag.js and analytics.js on my site?
Completely switching from analytics.js
to gtag.js
is the best choice in most situations. However, if you want to keep data reporting that uses advanced UA features until the deprecation deadline, then you can have dual tagging on your site. Google provides more information for developers about dual tagging in Add Google Analytics 4 to an existing Universal Analytics implementation, and its Send events to both your UA and GA4 properties advanced guide provides a thorough overview of this type of implementation.
Can I keep using Google Tag Manager when I have GA4?
If you've been using Google Tag Manager to collect data for your UA setup, you can use it with GA4. However, you must be aware of certain considerations when implementing GA4 with Google Tag Manager. See Google's tips on this topic to learn more.