Skip to main content
Ecwid → GA4Integration guide

Connecting Ecwid to GA4

Ecwid is a store that embeds into someone else's website, which makes it the only ecommerce platform here where the checkout runs inside a widget on a page you do not fully control. GA4 is where the business goes to understand what happened, which makes an unattributed conversion there expensive in decisions rather than in ad spend. The join between them succeeds or fails on one thing: whether the GA4 client_id reaches the Ecwid order before the conversion happens, because GA4 can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Ecwid to GA4: one tag owns ecommerce, the host page owns the session

Decide whether Ecwid's built-in Google Analytics connection or the host-site tag sends GA4 ecommerce, using one measurement ID. For purchases, read client_id and session_id from the host page's _ga cookies, store them in an Ecwid order extra field, and send purchase through Measurement Protocol from the paid-order webhook, with refunds using the same transaction_id.

Ecwid has its own Google Analytics connection in the store settings; check how your plan sends GA4 ecommerce events and to which measurement ID. The host site, whether WordPress, Wix or Squarespace, often has a GA4 tag of its own. Run both and you get either two purchase events per order or page views on one property and purchases on another. Decide that one of them sends ecommerce events, and make sure both use the same measurement ID if both stay installed.

Ecwid changes store pages without full page loads, so a GA4 tag on the host page records the first view and then misses product pages and checkout steps unless history-change page views are enabled. Funnel explorations then show drop-off at the wrong step. For purchases, read client_id and session_id from the host page's _ga cookies, write them into an Ecwid order extra field, and send purchase through Measurement Protocol from the order webhook when the order is paid.

Some payment options send the shopper to the provider's page and back, which starts a new session attributed to the payment domain. Add those domains to GA4's unwanted referrals list, otherwise PayPal shows up as your top revenue source. Ecwid records refunds against the original order, so send GA4 refund events with the same transaction_id and, for partial refunds, the items refunded.

Ecwid → GA4 · what breaks

Why this join usually fails — Ecwid → GA4

  1. 01

    The GA4 client_id never reaches Ecwid

    The store runs inside an embedded widget, so the host page's scripts and the widget's own context are not the same environment. An identifier captured by the host page does not automatically reach the order, and a purchase inside the widget does not automatically fire the host page's tags.

  2. 02

    A checkout inside somebody else's page

    The host site and the store widget are two contexts. Tags installed on the host page routinely miss purchases entirely, and nobody notices because the site looks like it is working.

  3. 03

    Everything lands under (direct)/(none)

    The classic Measurement Protocol symptom, and it always means the same thing: the client_id was missing or wrong, so GA4 had no session to attach the event to and invented a new user.

  4. 04

    Nothing reconciles afterwards

    GA4 DebugView shows events arriving with their parameters, and Realtime confirms the user and session they attached to. Neither tells you whether you are double-counting — for that, compare GA4's conversion count against the source system's record for the same window.

Ecwid → GA4 · the fix

What working looks like — Ecwid → GA4

  • The GA4 client_id on every order

  • Conversions arriving in GA4

    Conversions appear in GA4 attributed to the original session's source and medium, so acquisition reporting reflects what actually drove revenue.

  • Reconciled against the source

Ecwid → GA4 · architecture

How Ecwid and GA4 actually connect

  1. 1

    Ecwid holds the truth

    Ecwid is authoritative for the order. Because it embeds into WordPress, Wix, Squarespace and plain HTML sites alike, the surrounding page's own analytics frequently has no idea a purchase happened.

  2. 2

    GA4 needs a click to match

    GA4 needs the client_id to attach a server event to the user and session that produced the click. Without it there is no attribution to inherit and the event is orphaned.

  3. 3

    The identifier is the bridge

    The GA4 client_id, captured at the visit and carried into the Ecwid order.

  4. 4

    The event source decides reliability

    Send from your server when Ecwid reports the order paid. The widget's own client-side events depend on the host page still being open and the embed having initialized correctly, neither of which is guaranteed.

  5. 5

    Deduplication at the destination

    GA4 has no built-in deduplication for Measurement Protocol. If the browser also sends the event, it counts twice. The only reliable approach is to decide per event which side sends it, and enforce that decision — GA4 will not protect you from your own duplicates.

Ecwid → GA4 · normal or broken

Working vs. broken, side by side — Ecwid → GA4

Normal, not a fault

  • The GA4 client_id present on the order

  • Sent from the Ecwid order webhook

  • Deduplicated correctly

    GA4 has no built-in deduplication for Measurement Protocol. If the browser also sends the event, it counts twice. The only reliable approach is to decide per event which side sends it, and enforce that decision — GA4 will not protect you from your own duplicates.

  • Reconciles with the source

Actually broken

  • The GA4 client_id missing on most records

    The store runs inside an embedded widget, so the host page's scripts and the widget's own context are not the same environment. An identifier captured by the host page does not automatically reach the order, and a purchase inside the widget does not automatically fire the host page's tags.

  • Sent from the browser

    The host site and the store widget are two contexts. Tags installed on the host page routinely miss purchases entirely, and nobody notices because the site looks like it is working.

  • Counted twice, or not at all

    The classic Measurement Protocol symptom, and it always means the same thing: the client_id was missing or wrong, so GA4 had no session to attach the event to and invented a new user.

  • Nobody has reconciled it

Ecwid → GA4 · diagnose

Diagnostic order — Ecwid → GA4

  1. 01

    Count orders carrying the GA4 client_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Open a recent Ecwid order and check its extra fields

    If the identifier is not on the order, the host page captured it and never passed it across the embed boundary.

  4. 04

    Check whether server events carry a session and a source

    In GA4 Realtime or DebugView, find the event and look at its session and traffic source. A brand-new user with no source on every server event is the missing-client_id signature.

  5. 05

    Read the match rate, not the success message

    GA4 DebugView shows events arriving with their parameters, and Realtime confirms the user and session they attached to. Neither tells you whether you are double-counting — for that, compare GA4's conversion count against the source system's record for the same window.

Ecwid → GA4 · prove

How it gets proven — Ecwid → GA4

Source of truth

Ecwid's order list for the same window, in the store's currency and timezone.

  • The GA4 client_id confirmed present on a live order.
  • Server events confirmed in DebugView attaching to an existing session with the original traffic source intact.
  • A purchase completed through the embedded widget, confirmed to report with the identifier attached.

Ecwid → GA4 · free audit

What we check in the free audit

  • Count orders carrying the GA4 client_id
  • Follow one real conversion end to end
  • Open a recent Ecwid order and check its extra fields
  • Check whether server events carry a session and a source
  • Read the match rate, not the success message

Checked against

Ecwid's order list for the same window, in the store's currency and timezone.

Get my free conversion tracking audit

Free30 minutesNo obligation

Ecwid → GA4 · when not to buy

When you don't need this — Ecwid → GA4

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the GA4 client_id.
  • If your Ecwid store is a small add-on to a content site with modest volume, the native integrations may be adequate — measure the order volume before commissioning anything.
  • GA4 is reporting, not bidding. If your problem is ad platform optimization, fix the ad platform destination first — GA4 will not change what any campaign does.

Ecwid → GA4 · what we deliver

What gets built — Ecwid → GA4

  • Identifier capture into Ecwid

    Capture the click identifier on the host page and pass it into the Ecwid order through its order-extra-fields or the storefront API, so it lands on the order record rather than staying on the page.

  • Event source: the Ecwid order webhook

    Send from your server when Ecwid reports the order paid. The widget's own client-side events depend on the host page still being open and the embed having initialized correctly, neither of which is guaranteed.

  • Dispatch to GA4

    Measurement Protocol events with the client_id, session_id and the correct measurement ID and API secret, sent server-side.

  • Reversals where they exist

    Ecwid records refunds and cancellations against the original order, so reversals can be wired properly.

Written guarantee

95%+ tracking accuracy

Measured against Ecwid's order list for the same window, in the store's currency and timezone.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Ecwid → GA4 questions, answered

Pick one to send ecommerce events, not both. If you go server-side, turn off the built-in purchase event and send purchases from the order webhook with the host page's client_id.

Free · 30 min

Get Ecwid and GA4 joined properly

Free30 minutesNo obligation