Troubleshoot steps for GA4 data not flowing

  • Updated

If your Google Analytics 4 (GA4) data is not flowing into your B2B Analytics instance after completing the migration steps from Universal Analytics to GA4, follow these steps before reaching out to

Although Google offers an automatic upgrade flow between Universal Analytics and GA4, Optimizely does not recommend that clients follow this flow. If you believe you followed the automatic upgrade flow in the past and are facing data issues, Optimizely recommends that you create a new property and restart the GA4 setup for B2B Analytics.

Verify Optimizely access to Google’s API

Follow these steps to confirm that Optimizely is added as a user on your GA4 account:

  1. Sign in to your GA4 account.
  2. Go to Admin > Account Access Management.
  3. Click the Add icon and select Add users.
  4. Enter the following email address:
  5. Select the Notify new users by email checkbox.
  6. Select the Viewer role and click Add.
  7. Close the View access management modal.

Verify GA4 and GTM account link

To properly link your GA4 and GTM accounts, you must enter the measurement ID of your GA4 web data stream in the pageview tag of Google Tag Manager (GTM).

First, find your Measurement ID in GA4:

  1. Sign in to your GA4 account.
  2. Go to Admin.
  3. Ensure you have the correct Account and Property selected.
  4. Click Data Streams and select the data stream associated with your GA4 implementation.
  5. Make note of the Measurement ID.

Next, ensure the GA4 - Pageview tag in GTM has the correct Measurement ID:

  1. Sign in to your GTM account.
  2. Go to Tags. This page displays a list of your GTM tags. The JSON file tags have unique names starting with GA4 to differentiate the old tags from GA4 tags.
  3. Select the GA4 - Pageview tag. Ensure that the Measurement ID matches the measurement ID you noted above. If not, update it to match.
  4. Click Save, then click Submit.

Verify the required custom dimensions

  1. Sign in to your GA4 account.
  2. Go to Admin > Custom definitions.
  3. Click Create custom dimension.
  4. Create each of the below dimensions, one at a time, clicking Save each time.
Dimension name Scope Description

Event parameter/

Item parameter

Authentication_State Event Authentication_State Authentication_State
correctedQuery Event correctedQuery correctedQuery
endingUrl Event endingUrl endingUrl
ga_session_id Event ga_session_id ga_session_id
numSearchResults Event numSearchResults numSearchResults
Page_Path Event Page_Path Page_Path
Page_Path_1 Event Page_Path_1 Page_Path_1








searchQuery Event searchQuery searchQuery
User_ID Event User_ID User_ID
item_ID Item item_ID sku
item_name Item item_name name

Verify the GTM configuration tag

GTM does not work properly if there is more than one active configuration tag.

  1. Sign in to your GTM account.
  2. Go to Tags.
  3. Review the list and ensure that there is only one tag with a Tag Type of Google Analytics: GA4 Configuration. The only tag of this type should be the GA4 - Pageview tag that is included in the Optimizely Default Container. Delete or disable any other tag with this type.

Verify real time data flow in GA4

  1. Sign in to your GA4 account.
  2. Go to Reports > Realtime.
  3. Visit your storefront URL. If GA4 is accurately capturing data, your activity on the site should display on the Realtime overview map within ten seconds. If no data displays, verify that you have installed the GTM snippet on your site.

Verify the GTM snippet on your site

To start tracking data using GA4 and GTM, you must install the GTM snippet on your Optimizely Configured Commerce site through the Admin Console. The GTM snippet is linked to GA4 and provides tracking for both GA4 and GTM.

To find the GTM container ID and snippet:

    1. Sign in to your GTM account.
    2. Expand All accounts and select the appropriate container. The container ID displays at the top of the page.
    3. Ensure this matches the container ID in the Optimizely Configured Commerce Admin Console.
      For a custom implementation of GA4 without using the Admin Console, select the GTM container ID (from the image above) to display the GTM snippet, which you can install directly on your site.

Next, log in to the Optimizely Configured Commerce Admin Console to verify that the snippet is properly installed on your site:

  1. Go to Administration > System > Settings.

  2. Search for google track which should return three settings under  System Settings. A yellow box with the number 3 displays.

  3. Click System Settings.

  4. Scroll down to Analytics.

  5. Ensure that Google Tag Manager is selected next to Google Tracking Type.

  6. Ensure that there are two URLs listed next to Google Tracked Domains.

  7. Ensure your GTM property ID is entered next to Google Tracking Account ID.

Confirm your property ID and site URL with Optimizely support

Before your GA4 data can start flowing into B2B Analytics, the Optimizely engineering team must link the new data source to your instance of B2B Analytics. Ensure that you have sent a request to with your GTM property ID and site URL.

To find your GTM property ID:

  1. Sign in to your GA4 account.
  2. Go to Admin.
  3. Ensure you have the correct Account and Property selected.
  4. Click Property Settings. The Property ID is listed at the top right of this page.
  5. Include the Property ID and Website URL in your email to Optimizely support.

If you made any changes while completing the above verification steps, it takes up to 72 hours for the data to start following into your B2B Analytics instance. Check back after 72 hours.

If the issue still persists, contact Optimizely support and indicate that you completed the steps in this article. Make sure you provide your Property ID and Website URL in your email.