GA4 (Beta)
Last updated
Last updated
Our GA4 integration is currently in private beta. Apply for access ->
If you use Google Analytics 4, you can integrate your store property with Shoplift to automatically created GA4 audiences with tested visitor data, so you can analyze your experiments alongside the wealth of other tracking and event data that GA4 provides.
When GA4 is integrated with Shoplift and a visitor encounters a test, Shoplift will send an experience_impression
event on page load that contains a parameter called exp_variant_string
. The value for this string will contain the unique IDs for your test and the variation each visitor encountered.
Using this parameter, Shoplift will automatically create audiences for each variation for your active tests, so you can analyze data for control and variant experiences independently. You can access these audiences from the Audiences view in Google Analytics.
Audiences created by Shoplift are named according to the test and the variation that visitors are exposed to. For example, visitors to the variant of a homepage test titled "Homepage Test" will have an audience created called "Shoplift - Homepage Test - Variant".
Before integrating GA4 with Shoplift, make sure you have the following:
A Google Analytics 4 property set up for your store.
Access to this Google Analytics property to authorize the connection.
In Shoplift, navigate to Settings and then click the Integrations tab.
Click Connect to open up an authorization window for your Google account, and select the Google account that has access to your GA property from the list.
On the next screen, Shoplift will request permissions to Edit Google Analytics management entities. Click Allow. These permissions will allow Shoplift to create Google Analytics audiences for your tests on your behalf.
Once you've authorized the connection, you will be redirected back to Shoplift, and an account selection dropdown will appear. Select the Google Analytics account for your store from the list.
After selecting an account, a property selection dropdown will appear. Select the property for your store. You can confirm it is the correct property by referencing the Measurement ID in the dropdown, next to each property name (this will be a string of characters, like G-XXXXXXXXXX
).
Once you've selected your property, click Confirm. The integration will toggle on, and your Google Analytics 4 account and Shoplift are now integrated.
When you launch new tests, Shoplift will now automatically creating audiences for these tests in GA4 and send associated visitor events as they occur.
There are two primary methods of viewing Shoplift test audience data in GA4:
In the Audiences view, where you can see high level information about each test audience
In a custom Exploration, where you can create a User segment that includes visitors who have triggered an experience_impression
event.
To view your Shoplift audiences in Google Analytics, select Admin from the left sidebar navigation. Then, under the Data display card, click Audiences.
From the Audiences view, you'll see a list of your Google Analytics audiences, including any audience that Shoplift has created. These audiences will include a description of "Auto-generated audience for a Shoplift test," and for each test you are running, you'll see two audiences - one for the control, and one for the variant.
You can click into these audiences to view the audience data and settings as with any other GA4 audience, to see total users, device category breakouts, and more.
If you want to see more detailed information about your Shoplift audiences, including custom dimension and metric breakouts, you'll need to create a custom exploration. Explorations have a lot of features, so for the purposes of this guide, we'll just focus on how you can create a new User segment from your Shoplift test audiences.
In GA, click Explore from the left sidebar navigation, and then click the card to create a new exploration.
In the Variables pane on the left, click the '+' button next to Segments.
In the window that opens, click Create a new segment in the top right. Then click User segment to create a new user segment and define specific inclusion rules.
Click the Add new condition button and search experience_impression (it will appear as an Event). Select this from the dropdown.
Then add a new parameter to define which test and variation will determine the visitors included in this segment. Click Add parameter and search exp_variant_string. Click it to open up a New custom definition window. Click Save. This will open up a Conditions window where you can define the string.
From here, you will need to enter the ID for your test variation in the value field. To find this ID, open up your test report in Shoplift, and scroll to the Test variants section of the report. Next to the Original or the Variant you will see an informational tooltip (i). Hover over the tooltip to reveal the ID, and click the small copy icon to copy the ID to your clipboard.
Paste the ID you copied into the value field in GA. Hit Apply, and you will see your audience summary update to reflect the quantity of users included in this segment.
Name your segment (we recommend a name similar to the audiences we create, like "Shoplift Test - Test Name - Variant Name" and click Apply in the top right. Your segment will be added to your Exploration, and from here you can view any number of Metrics or Dimensions for that user segment.
Please note that because pausing audiences in Google Analytics is not possible, the Shoplift integration with Google Analytics does not currently support paused tests. This means that if a test is paused, events from tested visitors will continue to send to Google Analytics.
If a test is paused, and you want to analyze the audience or user segment data in GA4, we recommend setting your date range to the period of time before or after the test was paused or resumed, but not spanning the paused period of time.
By default, Shoplift sets audience durations to the maximum of 540 days. While it's unlikely to run a test for this long, this limit means that after this period of time new data will stop sending for these audiences.
If needed, you can adjust the duration manually from the Audience settings in Google Analytics.
If you'd like to disable the integration for any reason, you can click the toggle off to stop creating audiences and sending events to GA4. To reenable the integration, simply click the toggle again.
If you'd like to disconnect the integration entirely, you can click the Actions button next to the toggle, and select Disconnect. This will completely disconnect your Google account from Shoplift, and if you want to reenable the integration in the future, you will need to reauthorize your account.