Intelligems Docs
  • Welcome to Intelligems
  • Getting Started
    • Getting Started
    • Adding Intelligems Script to your Theme
    • Updating the Intelligems Script
    • Common Use Cases
      • Price Test Common Use Cases
        • The Straddle
        • The Double Down
        • The Strikethrough
        • The Great Discount Debate
        • Savings Showdown: Volume Discount vs. Price Discount
      • Shipping Test Common Use Cases
        • The Flat Fee Face Off
        • The Threshold Trials
      • Content Test Common Use Cases
        • Landing Page Testing
        • Testing a Brand New Theme
        • Testing Different Imagery
        • Testing Cart Elements
        • Testing Announcement Bar Text
        • Navigation Menu
        • Testing Checkout Blocks
      • Offer Test Common Use Cases
        • The Volume Discount Duel
        • Gifting Games
    • Best Practices
      • 🧪Test Design Best Practices
      • ✅Best Practices During a Test
    • General FAQs
  • Price Testing
    • Price Testing - Getting Started
    • Price Testing Integration Guides
      • Integration Guide using Shopify Functions
        • Step 1: Add Intelligems JavaScript
        • Step 2: Tag product prices
        • Step 3: Update your cart
        • Step 4: QA your integration, and publish your changes
      • Integration Guide using Checkout Scripts
        • Step 1: Add Intelligems JavaScript
        • Step 2: Tag product prices
        • Step 3: Add the Checkout Script
        • Step 4: Update your cart
        • Step 5: QA your integration, and publish your changes
      • Integration Guide using Duplicate Products
        • Step 1: Add Intelligems JavaScript
        • Step 2: Tag product prices
        • Step 3: Hide duplicate products from collections pages
        • Step 4: Configure duplicate products
        • Step 5: QA your integration, and publish your changes
      • Troubleshooting
        • How to Add the data-product-id and/or data-variant-id Attribute to an Element
      • Replo Page Builder
    • How to Set Up a Price Test
    • Price Test QA Checklist
    • Starting a Price Test
    • Ending a Price Test
    • Testing Prices with Subscriptions
      • Testing Prices with Recharge 2.0 or Stay.Ai
      • How to Set Up a Price Test using Duplicate Products and Recharge Subscriptions
      • How to Set Up a Price Test using Duplicate Products and Skio Subscriptions
      • Managing Duplicate Products when Redirecting to Duplicate PDPs
    • Multi-Currency Testing
    • Price Testing FAQs
  • Shipping Testing
    • Shipping Testing - Getting Started
    • How to Set Up a Shipping Test
    • Shipping Test QA Checklist
    • Starting a Shipping Test
    • Ending a Shipping Test
    • Shipping Progress Bar Integration
    • Shipping Testing FAQs
  • Content Testing
    • Content Testing - Getting Started
      • How to Set Up a Split URL Test
      • How to Set Up an Onsite Edits Test
      • How to Set Up a Template Test
      • How to Set Up a Theme Test
      • How to Set Up a Test using our JavaScript API
    • Content Test QA Checklist
    • Ending a Theme Test
    • Content Testing FAQs
  • Personalizations
    • Personalizations - Getting Started
    • Personalization Modifications
      • Offer Modifications
      • Progress Bars
      • Offers: Integrating Widgets
      • Offers: Running a Large Number of Offer Personalizations with Shopify Functions
      • Theme Personalization Precautions
    • Targeting Personalizations
    • Targeting Modes for Personalizations
    • Previewing Personalizations
    • Testing Offer Personalizations
    • Offers Limits
    • Offer Combinations
    • Scheduling Personalizations
    • Rolling Out Tests
    • Personalizations FAQs
  • General Features
    • Targeting
      • Audience Targeting
      • Currency Targeting
      • Page Targeting
      • Mutually Exclusive Experiments
      • Targeting FAQs
    • Onsite Editor
    • Image Onsite Editor
    • CSS and JavaScript Injection
  • Analytics
    • Overview
      • How orders and sessions are attributed to experiments
      • Order and revenue accounting
      • How experiment targeting affects analytics
    • Analytics FAQs
    • Metric Definitions
      • Revenue
      • Conversion Funnel
      • Profit
      • Subscriptions
    • Filters
    • Statistical Significance
    • Timeseries
    • Custom Events
      • Overview
      • CSS Selectors
      • Scoping to specific pages
      • Custom Javascript Events
      • Testing Custom Events
      • Using custom events in experiment analytics
    • How to Add Profit to Intelligems Analytics
    • How to Add Product Groups to Intelligems Analytics
    • Tagging Orders by Test Group in Shopify
    • Exporting Data
    • Data Sharing
  • Performance Optimization
    • Site Performance
    • Optimizing Your Price-Test Integration
    • Anti-Flicker Modes
    • Edgemesh
  • Integrations
    • Google Analytics 4 Integration
    • Amplitude Integration
    • Heap Integration
    • Segment Integration
    • Heatmap Integrations
      • Integrating with Microsoft Clarity
      • Integrating with Heatmap.com
      • Integrating with HotJar
    • Navidium Testing
  • Developer Resources
    • Javascript API
      • User Object
      • Price Object
      • Campaigns Object
        • campaigns.getAll()
        • campaigns.getGWP(options)
        • campaigns.setHistoryStatus(params)
    • Intelligems Theme Snippets
    • Advanced Settings
    • Cart Permalinks
    • Targeting By Customer Parameters
    • Custom Add to Cart and Order Completed Events
Powered by GitBook
On this page
  • Overview
  • How it Works
  • Enabling the Intelligems <> GA4 Integration
  • Analyzing Experiments in GA4
  • Additional Settings
  • Troubleshooting
  • There is not any Intelligems data in GA4
  • There are fewer visitors tracked in my GA4 segments than in Intelligems analytics
  • There are too many or too few orders & revenue compared to Intelligems analytics
  • Finding your GA4 Measurement ID

Was this helpful?

  1. Integrations

Google Analytics 4 Integration

PreviousEdgemeshNextAmplitude Integration

Last updated 23 days ago

Was this helpful?

Overview

The Intelligems Google Analytics integration allows you to analyze experiment results within GA4. Once enabled, we’ll send an event to GA on each page load indicating the active experiment(s) and test group(s) for the visitor. You can then use this dimension to segment users in GA4.

How it Works

Once you’ve enabled the Intelligems GA4 integration, Intelligems will begin sending an event called experience_impression to GA4 on each page load, with one event for each active experiment. Intelligems attaches a dimension to the event, Experience - variant ID, which contains the name of the experiment and test group this visitor was in, in the following format:

IG - <Experiment Name> - <Test Group Name>

Enabling the Intelligems <> GA4 Integration

Enabling the integration takes only 1-2 minutes:

  1. In the Intelligems app, click on the “Integrations” tab in the lower left section of the side nav, or navigate directly in your browser.

  2. Within the “Google Analytics 4” section, click “Sign in with Google.” You’ll need to sign in with a Google account that has access to your GA4 account, and sufficient permissions to authorize Intelligems.

  3. In the new Google window, click “Allow.” You may see a checkbox asking if you’d like to enable specific permissions - if so, check it off.

  4. Choose the stream you’d like Intelligems to send the data to. If you're unsure, follow the steps to find your measurement ID.

Analyzing Experiments in GA4

To analyze experiment data within GA4, create a segment for each test group:

  1. Choose “User Segment”.

  2. Add a dimension to condition on, and choose “Experience - variant ID”.

  3. Choose “contains,” and find the test group you’re interested in analyzing (the pattern will follow the one detailed in the “How it Works” section above, and should autocomplete). Check off “at any point in time”.

  4. Click "Save and Apply" to save the segment. You can also create an Audience from the segment so that you can re-use it in other reports.

Additional Settings

If you would like Intelligems to add the event to the window.dataLayer instead of using window.gtag, add this snippet above the Intelligems script in your theme.liquid:

<script>
  window.igSettings = {
    useDataLayer: true
  }
</script>

Troubleshooting

There is not any Intelligems data in GA4

  • Note that data is sent only for active experiments, and only after the integration has been enabled. Data won't be sent retroactively for experiments that have already ended when the integration was first enabled

  • Make sure Intelligems and your Google Analytics scripts are both being loaded

  • Make sure the stream and property chosen in the integration was correct (see above for instructions on how to check this)

There are fewer visitors tracked in my GA4 segments than in Intelligems analytics

Not every visitor to the experiment may be tagged with their test group in Google Analytics. Intelligems triggers the experience_impression event almost immediately after loading, but GA often delays sending it to its server for a few seconds. This causes visitors who bounce quickly to be tracked in Intelligems, but not to be tagged in GA with their test group. It's common to see the number of visitors in GA4 segments ~80-90% of the number in Intelligems analytics. If you're seeing fewer than that, here are some things to check:

  • Check the users that are not tagged with an Intelligems test group, and make sure they are real users by checking browsing behavior, time on site, and attributed revenue and orders. There are a number of different reasons GA will "make up" visitors

  • If you use the measurement ID in your Google tag is not the same as the one you've chosen in Intelligems, it may help to initialize that measurement ID directly. For example, if your GA4 measurement ID is G-1234567890 and your Google tag looks like:

      <!-- Google tag (gtag.js) -->
      <script async src="https://www.googletagmanager.com/gtag/js?id=AW-987654321"></script>
      <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
    
        gtag('config', 'AW-987654321');
      </script>

    Adding a config line for your measurement ID G-1234567890 may help ensure Intelligems events are sent successfully:

      <!-- Google tag (gtag.js) -->
      <script async src="https://www.googletagmanager.com/gtag/js?id=AW-987654321"></script>
      <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
    
        gtag('config', 'AW-987654321');
        gtag('config', 'G-1234567890');
      </script>

There are too many or too few orders & revenue compared to Intelligems analytics

Intelligems' order data comes directly from Shopify through server-side events. When order totals and revenue differ significantly between Intelligems and GA4, this is usually a problem with how your Shopify <> GA4 integration is configured. To diagnose the issue, you can download order exports from the Intelligems dashboard, and compare the included orders to order IDs In Google Analytics, by creating a GA4 report with order ID as a dimension.

Finding your GA4 Measurement ID

  1. Go to Google Analytics and navigate to the Admin section.

  2. Click on the stream associated with your online store. In many cases, there may be only one stream.

  3. The measurement ID will appear in the drawer. It usually starts with “G-”.

. From within an exploration, click the “+” button next to Segments.

Make sure the GA4 integration is enabled in the

Ensure is available on your store. Intelligems uses GA's gtag API to send events. You can check this by loading your store in your browser and checking for window.gtag in the console

Ensure you've rather than using the Shopify app embed. The app embed loads Intelligems asynchronously, which may delay the triggering of the experience_impression GA event

We also recommend reaching out to a tracking specialist who can take a look at your GA4 setup. You can visit or for experts.

In the menu under “Property Settings,” choose “Data Streams”.

Create a new segment
Intelligems app
window.gtag
installed Intelligems directly
partners page
to the integrations page
here
Creating a user segment in GA4