Offline Conversions with Wix and GA4: Unlocking Complete User Journey Tracking

Sending Offline Conversions to GA4 requires that you send data along with GA4 Client ID. But WIX Websites integrated with GA4 pose a challenge. Wix restricts direct cookie access, making the extraction of GA4's Client ID difficult. This article will show how to get around this challenge with Google Tag Manager.

The critical data-point for joining your users’ online footprints with offline activities in Google Analytics 4 (GA4) is the Client ID. Typically, this Client ID is extracted from the _ga cookie set by GA4 in a user’s browser. However, Wix poses a unique challenge — it doesn’t allow cookie reading, making this extraction difficult. Let’s dive into a workaround. We do not make WIX read the cookie. The goal is to pass your offline conversions data into GA4 when running your business on WIX. This approach is mostly for B2B where Sales team play an important role in signing the deal and locking the final conversions. But the same approach should work for eCommerce or other business models.

In MarTech, success comes not from mastering every “feature” but from sharpening your approach and finding creative ways to make tools work for you.

The Wix Challenge: Extracting GA4 Client ID

Under normal circumstances, lead forms built with traditional CMS platforms include a hidden field that captures the GA4 Client ID, sending it directly to your CRM. This Client ID serves as a crucial “join key” that merges online user interactions (tracked in GA4) with offline events recorded in your CRM.

Unfortunately, Wix doesn’t permit reading cookies, making this standard process impossible.

How Do We Overcome This?

Since Wix restricts cookie reading, we cannot directly access the GA4 Client ID. Instead, we have two alternatives:

  1. Google Tag Manager (GTM): Populate hidden fields using GTM.
  2. Wix Dev Mode Functions: Populate hidden fields using Wix’s development mode.

Can GTM Solve Our Problem?

Surprisingly, no. Wix forms hide fields entirely from the Document Object Model (DOM), preventing client-side scripts, like GTM, from populating these hidden fields.

Recommended Solution: Generate Custom IDs

Our practical workaround is to generate unique identifiers (UUIDs) ourselves and use these IDs consistently across both GA4 and Wix form submissions. Here’s how:

  • Generate a UUID each time a Wix form is submitted.
  • Add this UUID to a hidden Wix form field.
  • Simultaneously, pass this UUID to GA4.

This custom-generated ID then acts as your join key, effectively bridging your CRM and GA4 data.

Benefits of Using Custom-Generated IDs

Once the unique ID exists in both GA4 and your CRM, you can:

  • Send offline conversion data back to GA4 via Measurement Protocol.
  • Integrate datasets for comprehensive reporting (e.g., Power BI, Looker, Tableau).
  • Build specific GA4 audiences for improved marketing segmentation.

A Potential Downside: High Cardinality

However, be aware that creating unique identifiers for every user may introduce high cardinality in GA4, aggregating data into “Other” rows in reports. This issue arises if you exceed 500 unique values daily.

Solution: Enable GA4’s integration with BigQuery, which efficiently handles high-cardinality data.

Step-by-Step Implementation Guide

Part I: Wix Setup

  1. Integrate Google Tag Manager with Wix:
    • Navigate to Settings > Marketing Integrations.
    • Select Google Tag Manager and paste your GTM container ID.
  2. Add a Hidden Form Field:
    • Create a hidden field in your Wix form (e.g., form_submission_id_my_key).
    • Suffixing your field with _my_key ensures Wix automatically pushes this data to the dataLayer.
  3. Generate UUIDs via Wix Dev Mode:
    • Enable Dev Mode on your Wix site.
    • Paste the following script, replacing #form14 and form_submission_id_my_key with your actual form ID and field name:
import { v4 as uuidv4 } from 'uuid';

$w.onReady(function () {
let generated_id = uuidv4();
$w("#form14").setFieldValues({
form_submission_id_my_key: generated_id
});
});

Part II: GTM Setup

  1. Create Variables:
    • _ga Cookie Variable: Set up a 1st Party Cookie variable named _ga.
    • GA4 Client ID JS Variable: Use the following JS to extract Client ID without the prefix:
      function() {
          return {{ga_cookie}}.substring(6);
      }
    • Form Submission ID DataLayer Variable: Capture your UUID from Wix’s dataLayer. Notice that form data submitted to dataLayer by WIX is inside another object called user_data. When creating this variable, we make sure we extract it from the user_data object. The Data Variable Name would be user_data.form_submission_id_my_key
  1. Create Trigger:
    Set up a generate_leads event trigger, which Wix fires automatically upon form submissions. This is a simple Custom Event trigger.
  1. Create GA4 Event Tag:
    • Name your tag (e.g., GA4 Event – Form Submitted).
    • Set event parameters:
      form_submission_id: Use the Wix UUID variable.
      client_id: Use the GA4 Client ID variable.

Part III: GA4 Setup

  1. Create Custom Dimensions:
    • In GA4, navigate to Admin > Custom Definitions.
    • Add two custom dimensions matching your GTM parameters (form_submission_id and client_id).

Verify Your Setup

  • Submit a Wix form and check GA4’s DebugView.
  • Ensure your UUID and Client ID appear correctly.

If all works, publish your GTM containers and launch your form!

Importing Offline Conversions to GA4

You could do a simple CSV import.
Go to GA4 Admin. Under Data Collection and Modification, choose Data Import, and follow the instructions on the screen.

But remember, you can import the data even WITHOUT Client ID, but it won’t associate with individual users. Instead, this data can only be associated with other general dimensions like Date, Time, or City.

We covered this in another article in detail. See this example of Data Import without Client ID to enrich your GA4 data

Enable a full-funnel view

Tracking offline conversions from a Wix site in GA4 isn’t straightforward but it’s definitely possible. By generating your own IDs and passing them to both Wix and GA4, you create a reliable join key to connect offline events to online behavior.

This setup enables a full-funnel view of your users—helping you attribute leads, optimize campaigns, and refine marketing strategies based on complete data. For MarTech professionals, this is a powerful workaround that demonstrates the creativity often required in tool integrations.

If you’d like help implementing this setup or have questions, feel free to get in touch. Or subscribe to the newsletter for more practical MarTech insights.

Possible Questions

Q1. Can Wix natively send Client ID to GA4?
No. Wix doesn’t allow access to cookies directly in the browser, which means you can’t extract the GA4 Client ID in the standard way.

Q2. Is it safe to generate my own UUID for tracking?
Yes. UUIDs are widely used to generate anonymous, unique identifiers without storing personal data. They’re secure and ideal for this kind of workaround.

Q3. Will high cardinality impact my GA4 reports?
Yes. If you have over 500 unique values daily in a dimension like Client ID or Form Submission ID, GA4 may group them into “Other.” This affects data visibility.

Q4. Can Google Tag Manager write data into Wix forms?
No. Wix hides form fields from the DOM, making it inaccessible to GTM scripts. That’s why you must use Wix’s Dev Mode for this setup.

Q5. How do I test if the setup works correctly?
Use GA4’s DebugView to confirm your form submission event contains the client_id and form_submission_id as event parameters.

0 Comments

    Leave a Reply