Skip to content

Geo-pending window drops network beacons for non-EU visitors #8

Description

@reatlat

Bug

When geo is configured, all interceptors activate synchronously in coreInit() with checkConsent returning false. The geo lookup then runs async (up to 1500ms).

During that window, network calls (fetch/XHR/sendBeacon) matching blockedDomains or known trackers are dropped permanently — the network interceptor has no replay queue (by design, line 20-21 of network-interceptor.js).

Scripts/elements/cookies/storage are queued and replayed on consent — fine. But network beacons are gone forever.

When geo resolves to allow (non-EU visitor), coreAcceptAll() replays queued scripts/elements, but the initial analytics pageview beacon was already dropped. Tracking is silently incomplete.

Root cause

Interceptors install unconditionally before geo resolves. There's no concept of "pending geo, hold but don't drop" for network calls.

Repro

  1. Configure Zest with geo + intercept: { network: true } + fallback: 'allow'
  2. Visit from a non-EU IP
  3. Network calls during the first ~1500ms are dropped (204 "Blocked by Zest")
  4. After geo resolves to allow, new calls fire, but initial beacons are lost

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions