# Troubleshooting GA4 Integration Issues

### Overview

In this guide, you'll learn how to troubleshoot issues with Shoplift's GA4 integration and verify that your test data is flowing correctly to Google Analytics. You'll learn how to identify common problems, use debugging tools, and ensure your experience impression events are properly configured.

***

### Prerequisites

Before troubleshooting, ensure you have:

* GA4 integration enabled in your Shoplift dashboard
* Google Analytics 4 property set up and connected
* Admin or Editor access to your GA4 property
* Google Tag Assistant browser extension installed
* At least one active test running in Shoplift

***

### Common Integration Issues

**1. Verify Integration Status**

First, confirm your integration is properly connected:

* Navigate to **Settings > Integrations** in your Shoplift dashboard
* Check that GA4 shows as "Connected" with a green status indicator
* Confirm your Measurement ID matches your GA4 property (format: G-XXXXXXXXXX)

**2. Check Event Processing Delay**

GA4 typically processes events within 24-48 hours. However, you can verify real-time data:

* Open your GA4 property
* Navigate to **Reports > Real-time**
* Trigger a test experience on your store
* Look for `experience_impression` events within 30 seconds

{% hint style="info" %}
Note that `experience_impression` events only fire once per user, when the user is added to the test. We recommend using incognito windows during debugging.
{% endhint %}

**Data Layer Conflicts**

If you're using Google Tag Manager alongside GA4, ensure there are no conflicting implementations:

* Check for duplicate GA4 tags
* Verify event naming conventions don't overlap
* Confirm trigger conditions don't exclude Shoplift events

#### Test Traffic Not Recording

When test impressions aren't being recorded despite proper integration:

**1. Confirm Test Status**

* Ensure your test is set to "Active" in Shoplift
* Check audience targeting rules match your testing conditions

**2. Review Cookie Consent** Cookie consent banners may block tracking until accepted:

* Test in an incognito window
* Accept all cookies before testing
* Verify Shoplift cookies (`Shoplift_Analytics`) are being set after accepting consent

**3. Check Browser Extensions** Ad blockers and privacy extensions can interfere with tracking:

* Temporarily disable ad blockers
* Test in a clean browser profile
* Use incognito/private browsing mode

***

### Verifying Events with Google Tag Assistant

Google Tag Assistant provides real-time debugging for your GA4 integration. The web-based debugger allows you to monitor events as they fire and inspect their parameters in detail.

#### Setting Up Your Debug Session

**1. Access Tag Assistant**

* Open a new incognito browser tab and navigate to [tagassistant.google.com](https://tagassistant.google.com)
* You'll see the Tag Assistant dashboard with options to start debugging

**2. Start a Debug Session**

* Click the "Add domain" button
* Enter your store's URL (e.g., `https://mystore.myshopify.com`), or the URL of the page where a test is being run

<figure><img src="https://314821113-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDg2m2UmvTCMjmBjnzBKA%2Fuploads%2FejXMF7kIUvjGBNqSx2wc%2Ftag%20assistant%20domain.png?alt=media&#x26;token=a3479913-c613-4b1c-838f-563075244810" alt=""><figcaption></figcaption></figure>

* Click "Connect" to initialize the debugging session
* A new tab will open with your store and debugging enabled

<figure><img src="https://314821113-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDg2m2UmvTCMjmBjnzBKA%2Fuploads%2FQNRHqZfXIN8oOApuX3oc%2Fdebugging%20enabled%20on%20store.png?alt=media&#x26;token=e81256d3-e51e-4a82-a20b-d7634affcd14" alt=""><figcaption></figcaption></figure>

**3. Debug Mode**&#x20;

* In Tag Assistant, you'll now see a "Connected!" dialog. Press **Continue** and navigate to the tab containing your Google Analytics Measurement ID.

<figure><img src="https://314821113-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDg2m2UmvTCMjmBjnzBKA%2Fuploads%2F6tLmw1RKBBRLsHbIOkM2%2Fgoogle%20id%20in%20tag%20assistant.png?alt=media&#x26;token=ffeb5f8a-0fa8-44ff-835d-88433674f5a7" alt=""><figcaption></figcaption></figure>

* Here, you'll see a real-time stream of all GA4 events
* Look for the `experience_impression` event in the event list
* Events appear within 2-3 seconds of firing
* Ensure the `experience_impression` event is in the **Hits Sent** list

{% hint style="info" %}
If you don't see an `experience_impression` event fire, it's possible that your visitor was not added to the test, or was already added to the test by the time your debugging window opened. To re-fire the event, clear out the following cookies and local storage from your incognito window:

* Cookies: `Shoplift_Analytics`, `Shoplift_Essential`, `Shoplift_Session`, `shopify_y`
* Local Storage: `Shoplift_Analytics`, `Shoplift_Essential` , `Shoplift_Session`

Once your storage is cleared, refresh the page. You should be added to the test, and an `experience_impression` event should fire.
{% endhint %}

**4. Inspect Event Parameters**&#x20;

* Click on the `experience_impression` event to view detailed information. Depending on your setup, you may see two events, one with a Data Layer value and one with a **Google Analytics Hit** under **Hits Sent**.
* The `experience_impression` Google Analytics Hit is what sends information to Google Analytics. Expand the information under **API Call**, and confirm that your `exp_variant_string` parameter is passing the expected test and variant IDs.

<figure><img src="https://314821113-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDg2m2UmvTCMjmBjnzBKA%2Fuploads%2FOQqaThS8fWQ6mREe2s4H%2Fapi%20call%20values.png?alt=media&#x26;token=0519b490-0138-400c-979b-d98ff082f517" alt=""><figcaption></figcaption></figure>

* If you see that the parameter values are returning `undefined`, it could be because the event parameters are being nested in `eventModel`.
* You can confirm if this is the case by checking the Data Layer values for the `experience_impression` event:

<figure><img src="https://314821113-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDg2m2UmvTCMjmBjnzBKA%2Fuploads%2FNuuQl1a9QlPzBu4n312r%2FeventModel%20in%20tag%20assistant.png?alt=media&#x26;token=ee531a95-8566-45fc-99db-9d2718f46e8b" alt=""><figcaption></figcaption></figure>

* If this is the case, then it's likely you selected the "Google and YouTube Sales Channel" as the integration type in Shoplift. Disconnect the GA4 integration in Shoplift, and reconnect it, with "Google Tag Manager (recommended)" as the integration type.

***

### Validating in GA4 Real-Time Reports

After confirming events in Tag Assistant:

**1. Open GA4 Real-Time Reports**

* Go to your GA4 property
* Navigate to **Reports > Real-time**
* Look for your event in the "Event count by Event name" card

**2. Check Event Parameters**

* Click on `experience_impression` in the events list
* Select "Parameter" view
* Verify all expected parameters appear with correct values

**3. Create Debug View** For detailed debugging:

* In GA4, go to **Admin > DebugView**
* Your tagged session should appear if Tag Assistant is active
* Watch events stream in real-time with full parameter details

***

### Why GA4 numbers might not match Shoplift

Some difference between GA4 and Shoplift is normal and expected. The two tools collect data through fundamentally different methods, so their numbers will never match exactly. This section explains the most common discrepancies, what causes them, and what ranges to expect.

{% hint style="warning" %} Before comparing any data, make sure you're looking at dates that are **at least 48 hours old** in GA4. Exploration data is processed on a delay, and comparing against Shoplift's real-time dashboard before processing is complete will always show a gap. See [View test data in GA4](https://www.notion.so/integrate/ga4/view-test-data) for guidance on which metrics to use for accurate comparison. {% endhint %}

#### 1. GA4 shows fewer visitors than Shoplift

It's common to see 10–20% fewer visitors in GA4 than Shoplift reports. This is not a sign of a broken integration.

**The primary reason is timing.** Shoplift's script loads in the `<head>` of your page and fires immediately. GA4 (whether loaded through gtag.js or Google Tag Manager) initializes later. If a visitor loads the page and leaves before GA4 finishes loading, Shoplift captures that visitor but GA4 never does. This timing gap is the single largest contributor to the visitor count difference.

Several other factors can add to this gap:

* **Ad blockers.** GA4 loads from third-party domains (`google-analytics.com`, `googletagmanager.com`) that ad blockers actively block. Shoplift's tracking script loads from your store's own domain, so ad blockers don't affect it. Depending on your audience, ad blockers alone can account for 5–15% of the difference.
* **Cookie consent.** If your store uses a consent management platform, visitors who decline analytics cookies won't be tracked by GA4. How this affects Shoplift depends on your specific consent configuration.

These factors compound with each other, which is why a 10–20% total gap is typical. If you're seeing a gap within this range, your integration is working correctly.

{% hint style="info" %}
To benchmark whether GA4's gap is specific to Shoplift data, compare GA4's overall visitor count to Shopify's visitor count for the same period. If GA4 typically captures around 70–80% of Shopify's visitor data, it will capture a similar percentage of Shoplift event data.
{% endhint %}

#### 2. GA4 shows fewer or more orders than Shoplift

Order counts between GA4 and Shoplift can differ in both directions.

**Why GA4 may show fewer orders:** On Shopify, roughly 20 out of every 100 orders can fail to appear in GA4. This happens because GA4 relies on client-side tracking to fire a `purchase` event on the order confirmation page. Several things can break this chain:&#x20;

* third-party payment redirects (PayPal, Klarna, etc.) send the customer away from your store and may not return them to a trackable confirmation page;&#x20;
* ad blockers can prevent GA4 from loading on the confirmation page;&#x20;
* and Shopify's Checkout Extensibility integration has documented issues that can cause purchase events to be dropped.

**Why GA4 may show more orders:** If your store has both the native Shopify GA4 integration (via the Google & YouTube sales channel) and a GTM or Elevar setup firing purchase events, the same order can be recorded twice.

**Shoplift takes a different approach.** Rather than relying on client-side tracking, Shoplift uses server-side order events and pulls revenue data directly from Shopify. This means Shoplift captures orders regardless of whether the visitor's browser successfully fired a GA4 event.

#### 3. GA4 shows higher revenue than Shoplift

If GA4 reports significantly more revenue than Shoplift for the same test, the most likely explanation is a difference in how each tool calculates revenue.

GA4's **Item Revenue** metric is calculated as `price × quantity` for each item in an order. Crucially, GA4 does not automatically subtract the `item.discount` field from `item.price`. If your Shopify or Elevar implementation sends the full retail price as `item.price` and uses `item.discount` as a separate field, Item Revenue reflects **gross pre-discount revenue**.&#x20;

For stores that run frequent promotions (common on Shopify), this alone can account for 15–30% inflation.

Shoplift calculates revenue using the actual amount paid by the customer (post-discount, excluding taxes and shipping), which matches Shopify's order data.

For a more accurate comparison, use **Product Revenue** instead of Item Revenue in your GA4 Explorations. Product Revenue and Shoplift still calculate totals differently, but the gap will be smaller. See [Recommended metrics for comparing with Shoplift](https://docs.shoplift.ai/integrate/view-test-data-in-ga4#recommended-metrics-for-comparing-with-shoplift) for detailed guidance on which GA4 metrics to use.

#### Sampling in GA4 Explorations

GA4's free tier applies data sampling when an Exploration query exceeds approximately 10 million events in the selected date range. When sampling is active, GA4 uses a subset of your data to estimate totals, which can randomly inflate or deflate one variant relative to another.

You can check whether your report is sampled by clicking the shield icon in the top-right corner of your Exploration:

<figure><img src="https://314821113-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDg2m2UmvTCMjmBjnzBKA%2Fuploads%2FYWbRqD2QEmFH34ftSRxP%2Fga4%20sampling.png?alt=media&#x26;token=16b2b78d-2277-451f-835b-13d37f4b4240" alt="" width="338"><figcaption></figcaption></figure>

* A **green checkmark** means your data is unsampled.
* A **yellow or orange icon** means sampling is active, and the dropdown will show what percentage of data was used.

If your Exploration is being sampled, the most effective fix is to **shorten your date range**. Longer date ranges, multiple segments, and high-cardinality dimensions all increase the likelihood of sampling.

***

### Getting Additional Help

If you've worked through these troubleshooting steps and still experience issues:

**1. Gather Diagnostic Information**

* Screenshot of Tag Assistant output
* Your GA4 Measurement ID
* Test ID from Shoplift dashboard
* Browser console errors (if any)
* Time and date of test attempt

**3. Contact Support**&#x20;

Reach out to our support team with your diagnostic information:

* Include your store URL and test details
* Provide screenshots of Tag Assistant verification
* Describe the specific issue and when it started
