Hello Stape team and community,
I’m running a Stape Gateway (first-party proxy for a web GTM container, no server-side container) and I have a persistent duplication that only affects click-based events, not page_view. Looking for anyone who has found a clean fix at the source.
Setup:
-
Stape Gateway, first-party domain
gtm.kosgroup.com(CNAME → stape.net), EU region -
Web container GTM-XXXXXXX served via Stape custom loader
-
GA4 property (single measurement ID)
-
No server-side GTM container — Gateway acts as a first-party proxy only
Symptom:
click_phone and click_mail arrive duplicated in GA4 (~50%, stable for months, across all pages). page_view, scroll, user_engagement are NOT duplicated (~0.2%). So the duplication is selective: only events that fire after the page has loaded.
What I’ve ruled out (with evidence):
-
Single container load (one
gtm.startin source) -
GA4 tag fires once in GTM Preview (single GA4 tag among fired tags)
-
Both hits carry the same
tid— not a second measurement ID -
No hardcoded gtag.js besides GTM
-
Enhanced Measurement “Outbound clicks” disabled, tested in incognito → duplication persists
-
No “Create event” / “Modify event” rules in GA4
-
Link markup (tel:/mailto:) verified clean
The two hits (same session, single physical click):
Identical in tid, cid, _p, sid, en, ep.link_url. Both go to region1.analytics.google.com/g/collect. They differ only in:
-
_s: 3 vs 4 (sequential) -
_et: 7418 vs 1 (second one reset) -
gtm=: the second hit is missing a block present in the first (...z89180086559za20...vs...za20...) -
_eu: AgAAACQC vs AAgAACQC
This matches the documented gtag ↔ service worker retry bug (Google release note March 2025; Stape’s own “GTM & gtag Service Workers” article; PPC.land Sept 2025): gtag sends with suppressSuccessCallback=true, the service worker doesn’t acknowledge back, gtag re-sends. The selectivity (only post-load events, page_view unaffected because the SW isn’t active yet at load) is the known signature.
Question: has anyone applied a clean, production-safe workaround for this on a Stape Gateway setup? I’ve seen mentions of blocking specific service-worker files or removing the iframe via MutationObserver, but I’m wary of applying those on a site serving 17 locations without validation. Is there a recommended approach, or a Gateway/loader setting that avoids the double send?
(For now I’m deduplicating downstream in BigQuery, which keeps my KPIs correct — but I’d like to fix it at collection level.)
Thanks!
Danilo