GA4 is Google's new tracking property designed to help you capture more information and insight into your page visitor's journey using event-based analytics. To learn more, see our handy FAQ.
On July 1st, 2023, Google will replace Universal Analytics (UA) properties with Google Analytics 4 (GA4). If you try creating a new property in Google Analytics (GA), a GA4 property will automatically be created.
This integration works with Unbounce and supports both Classic and Smart Builder. This article will explain how to set up GA4 with Unbounce and how to view some of this event data in GA4's dashboard.
What You'll Need
- A Google Analytics Account with a GA4 tracking setup,
- An Unbounce account with live landing pages,
- A working domain or subdomain,
- A data stream in your GA4 property for your Unbounce landing page domain (be sure to select the Web option).
Please note that our teams are equipped to support you with implementing and setting up GA4 with Unbounce. If you have any questions about the GA4 platform, custom reporting, or require more training in GA4, please contact Google's support team.
Installing GA4 in Unbounce (using the built-in integration)
- Log in to Unbounce, and from the left-hand side menu, click Settings.
- From the drop-down menu, select Script Manager.
- Click the blue Add a Script button on the top-right-hand corner.
- From the Add a Script window, select Google Analytics 4 from the drop-down menu.
- Paste your GA4 tracking ID in the empty field (also known as a Measurement ID):
- Click Add Script Details. A new page will appear to enter more Script Details:
- From the Script Usage tab, select the domain you want the GA4 tag to apply to (i.e., GA4 will collect analytics for these landing pages):
- Click Save and Publish.
You're all set! You've now set up the GA4 integration with Unbounce pages. Data and page metrics will appear in Google Analytics 24 hours later.
Installing GA4 in the Classic Builder (manual installation)
Pro Tip:
In GA4, a customer can have multiple data streams per property, so you can integrate GA4 once in Unbounce without worrying about integrating it for every page. However, you still have the option to install GA4 manually on pages in the Classic Builder.
To install GA4 manually within the Classic Builder, you'll need the default GA4 installation code.
If you want to track form submission events as well, you will need
- The default GA4 installation code (installed to the head), and
- A custom code - shared below - to track form submissions
The Javascripts widget in the Classic Builder is a great way to add custom scripts to individual pages. Here is how to add your GA4 script to Classic Builder pages:
- Navigate to your landing page in the Classic Builder.
- Click the Javascriptsbutton at the bottom of the Classic Builder.
- Give your script a name, such as 'GA4 Tag', and set the Placement to Head.
- Paste the GA4 tag in the script field. It should look like this:
Optional: Capturing Form Submission events
To capture form submission events, you'll need to create a second custom script. To start, copy this script:
- Click the Add Script to this Variant to add a second script.
- Paste in the event tracking script, and set the placement to Before Body End Tag:
- Click the blue Done button to add the script.
Be sure to Save and Republish your landing page.
Enabling Enhanced Measurements in Google Analytics
GA4 helps you capture actions on your page through events.
An event in GA4 refers to any interaction on your website, such as a page load, button click, video play, form submission, etc.
GA4 automatically captures events on your page by default. However, you can also adjust the settings in Google Analytics to capture more enhanced measurements. To do so, you must enable Enhanced Measurements in your Google Analytics 4 property data stream.
- In the Google Analytics platform, navigate to Admin -> Property -> Data Streams.
- Click on the data stream corresponding to your landing page.
- Toggle the Enhanced measurement button:
- To adjust which events you want to measure, click the gear icon, and toggle the events from the Enhanced measurement window that appears:
Some common events that you may want to track on your Unbounce pages are:
- Page views
- Scrolls
- Outbound clicks
- Form interactions
- File downloads
- Video engagement
Click the Save button at the top to finalize these changes.
Tracking Page Views in GA4
Follow these steps to access your page view metrics in GA4.
- In the Google Analytics platform, navigate to the Reports tab on the left-hand side.
- Under the Life cycle heading, click the Engagement drop-down menu, then Pages and screens. Then, select a Page path option:
Under the Page title tab, you might see the (not set) title:
To remedy this and ensure that a clear page title appears in Google Analytics, update the Page Title metadata settings on your landing pages back in Unbounce. Then, Google Analytics will start collecting the page titles:
Updating Page Settings & Metadata in Smart Builder
Managing your Page Properties in the Classic Builder - The Title & Metadata Section
Variant Tracking in GA4
Note:
At this time, automated variant tracking only works if you've set up the built-in GA4 integration. If you've set up your GA4 integration via Google Tag Manager (GTM), variant tracking is currently unavailable.
If you're running an A/B test, or have Smart Traffic enabled on your page, you may want more granular data to see how your page variants perform.
The Unbounce integration passes through a 'page_variant' event which contains the Unbounce page variant letter ('variant_id' in Google Analytics reports).
To view page variant reports, follow these steps.
- In the Google Analytics platform, navigate to the Reports tab on the left-hand side.
- Under the Life cycle heading, click the Engagement drop-down menu, then Events, and click on the 'page_variant' event:
- Select variant_id as the Parameter Name:
Note: This data will only show events within the last 30 minutes.
Setting up Custom Reports in GA4
Custom reports (also known as Explorations in GA4) provide with advanced reporting insights to help you segment data better.
Explorations are a new feature introduced with Google Analytics 4, and there are many ways to mock-up reports to get insight into different metrics, segments, and dimensions.
To provide you with an example, we'll set up a custom report to track page variants. To start, we'll set up a Custom Dimension. This custom dimension will collect data about page variants only.
- Navigate to the Admin page in Google Analytics.
- Click Custom definitions,
- From the new tab that appears, click Create custom dimension.
- Set the Scope to Event and,
- Set the Event parameter to variant_id:
- You can set the event parameter to another option depending on what focused dimensions you want to track. For this example, we'll use variant_id.
- Click Save to finalize these changes.
To set up a report with the newly created custom dimension,
- Navigate back to the Explore tab.
- Click Free Form to set up a report with the newly created custom dimension.
- Under the Dimensions section, click the plus sign to add the new dimension:
- Select the dimension you created from the Custom section:
You can then drag the dimension under the rows or columns to add it to the chart.
If you see the (not set) value instead of a variant letter, that means the event came from a form confirmation dialog or a lightbox:
Related Articles
GA4 and Universal Analytics (UA) FAQ
Integrating Popups & Sticky Bars with Event Tracking in Google Analytics (GA4)