Docs
  • INTRO
    • What is Shoplift?
    • What to Test
    • Quickstart
      • Install Shoplift
      • Create a Test
      • Edit Your Variant
      • Launch Your Test
  • TEST
    • Template Testing
      • Overview
      • Guides
        • Guide: Testing Individual Pages
        • Guide: Testing One-Click Payment Methods
        • Guide: Testing App Blocks
        • Guide: Testing Different Template Types
      • Theme Compatibility
      • Template Management
      • Switching Themes
      • Shopify Markets
      • Shopify Translate & Adapt
    • Theme Testing
      • Overview
      • Guides
        • Guide: Testing a Navigation Menu
        • Guide: Testing a Mini Cart
      • Theme Management
      • Theme Development
      • Switching Themes
    • URL Testing
      • Overview
      • Guides
        • Guide: Testing URLs
        • Guide: Testing Product Properties
    • JavaScript API (Beta)
      • isHypothesisActive
      • setAnalyticsConsent
      • getVisitorData
    • Lift Assistâ„¢
      • What is Lift Assistâ„¢?
      • How To Use Lift Assistâ„¢
      • Brand Styles
    • Audience Targeting
      • Devices
      • New and Returning Visitors
      • Custom Audiences (UTMs, Referring Domains, and Geo-targeting)
    • Test Management
      • Test Compatibility
      • Mutual Exclusion
      • QA Checklist
      • Scheduling Tests
      • Pausing Tests
      • Implementing Winning Tests
    • Performance
      • Pagespeed
      • Shopify Caching
      • CDNs and Edge Delivery
  • ANALYZE
    • Reports
      • Overview
      • Metrics
        • Goals & Reporting Metrics
        • Metric Views
      • Test Progress
      • Statistical Significance
      • Channel Groups
    • Tracking
      • Visitor Attribution
      • Web Pixel
      • Liquid Snippet
      • Anti-Flicker
      • Analytics Discrepancies
  • integrate
    • Integrations and Tooling
      • GA4 (Beta)
        • Integrate GA4 (Shopify)
        • Integrate GA4 with Google Tag Manager
        • Integrate GA4 with Elevar
        • Analyze Test Data In Google Analytics
        • Disabling the GA4 Integration
      • Subscription Apps
      • Page Builder Apps
      • Reporting Tools
      • Heatmapping Tools
      • Custom Integrations
  • ADMIN
    • Plans and Billing
      • Subscription Plans
      • Uninstalling Shoplift
    • Users and Permissions
      • Managing Team Access
      • Managing User Notifications
    • Privacy and Compliance
      • Customer Data and GDPR
  • PARTNERS & DEVELOPERS
    • Shoplift Partner Program
    • Testing on Development Stores
  • SUPPORT
    • Frequently Asked Questions
    • Get Help
    • Give Feedback
Powered by GitBook

Contact Us

  • Get help
  • Give feedback
  • Request a feature

Helpful Links

  • Shoplift
  • Shopify App Store
On this page
  • Prerequisites
  • Set up the integration
  • Add a new user-defined variable in Google Tag Manager
  • Add an new event tag in Google Tag Manager

Was this helpful?

  1. integrate
  2. Integrations and Tooling
  3. GA4 (Beta)

Integrate GA4 with Google Tag Manager

PreviousIntegrate GA4 (Shopify)NextIntegrate GA4 with Elevar

Last updated 20 days ago

Was this helpful?

This guide is intended for merchants who have configured GA4 for their store with Google Tag Manager. If you have connected GA4 via the Google & YouTube sales channel or use Elevar to manage your data layer, follow those guides instead.

Prerequisites

Before integrating GA4 with Shoplift and configuring the necessary tags, triggers, and variables in Google Tag Manager, make sure you have the following:

  • A Google Tag Manager (GTM) account with a container and Google tag configured for your store

  • Access to the Google Analytics property for your store to authorize the connection in Shoplift

  • The ability to create Audiences in GA4 via the Google Account you use to authorize the connection

  • Permissions to publish changes to your Google Tag Manager container

Set up the integration

Configuring the integration (takes 2 minutes)

  1. In Shoplift, navigate to Settings and then click the Integrations tab.

  2. 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.

  3. 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.

  4. 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.

  5. 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).

  1. Once you've selected your property, click Confirm. The integration will toggle on, and your Google Analytics 4 account and Shoplift are now integrated.

Add a new user-defined variable in Google Tag Manager

  1. In Google Tag Manager, go to Variables, and under User-Defined Variables, click New.

  1. Name your variable exp_variant_string. Then click Variable Configuration and choose Data Layer Variable from the window.

  1. In the Data Layer Variable Name field, enter exp_variant_string.

  2. The Data Layer Version will default to Version 2. If it is not, set it to Version 2 from the dropdown.

  3. Click Save to save your new variable.

Add an new event tag in Google Tag Manager

  1. In Google Tag Manager, go to Tags, and click New to start creating a new tag.

  2. Name your tag Shoplift - GA4 Event.

  3. Click Tag Configuration and select Google Analytics from the list. Then select Google Analytics: GA4 Event.

  1. In the Measurement ID field, enter your Measurement ID for your GA4 property. This will be a string of characters, like G-XXXXXXXXXX, and should be the same ID that you see connected in Shoplift. If you already have a variable configured for your Measurement ID, you can add the variable instead.

  2. In the Event Name field, enter experience_impression.

  3. Expand the Event Parameters section and click Add Parameter.

  4. In the Event Parameter field, enter exp_variant_string.

  5. In the Value field, click the button to add the exp_variant_string variable you created earlier.

  1. Now click Triggering to add a trigger to this event tag.

  2. Create a new trigger by clicking the + icon in the top right.

  3. Name your trigger Shoplift - GA4 Event Trigger.

  4. Click Trigger Configuration and scroll down in the window until you see the Other section. Select Custom Event.

  1. In the Event name field, enter experience_impression.

  1. Click Save to save your new event trigger. Then click Save again to save your new event tag.

  2. Publish your changes to your workspace by clicking Submit and Publish.

Your Google Tag Manager container and GA4 property are now configured to receive events from Shoplift!