Indonesia Singapore ไทย Pilipinas Việt Nam Malaysia မြန်မာ ລາວ
← Back to Blog

Fetch Phases, Import Maps, and the Web's Signal Layer

Understanding fetch's two-phase lifecycle lets analytics teams recover signal that vanishes when connections drop mid-request.

A figure standing between two large network cables splitting apart, holding a clipboard and measuring the gap
Illustrated by Mikael Venne

Two-phase fetch, import maps, and View Transition API: what these browser primitives mean for tracking fidelity and signal hygiene in 2026.

A quiet shift is happening inside the browser. Not the kind that ships with a conference keynote or a vendor press release — the kind that shows up in a spec update, a newsletter item, or a side project that a Chromium engineer built over the holidays. Three of those shifts landed in the same week, and together they sketch something worth paying attention to if your job involves understanding what browsers actually do with the signals your marketing stack depends on.

Fetch Has Two Phases — and That Gap Is Where Signal Dies

Most analytics implementations treat fetch() as atomic: you fire the request, you get a response (or you don’t), you move on. Stefan Judis’s Web Weekly #200 surfaces a detail that most teams skip: fetch has two distinct phases — the network phase and the body consumption phase. The connection can succeed and the response status can return 200 while the body read fails silently downstream.

For standard page content, this is a nuisance. For beacon-style analytics calls — the lightweight hits that log conversions, session boundaries, or attribution events — it’s a data integrity problem. If your tracking pixel resolves at the network layer but the response body carrying a server-generated event ID never completes, you get a ghost request: logged on the client, absent on the server, and invisible in your attribution model.

The practical fix is straightforward but rarely implemented: explicitly await both phases, not just the fetch promise. Structure your analytics calls to catch errors on response.json() or response.text() separately from the initial fetch() catch block. In high-latency mobile environments — which describes a meaningful share of Southeast Asian traffic, particularly on 4G connections in secondary cities in Indonesia or the Philippines — this two-phase failure mode is more common than teams expect.

Import Maps: Dependency Control You’re Probably Not Using for Tracking Hygiene

Also surfaced in Web Weekly #200: the question of whether sites should be shipping import maps in production. The short answer is yes, and the tracking-hygiene angle is underappreciated.

Import maps let you declare a browser-level mapping between module specifiers and actual URLs — essentially a manifest that controls what JavaScript loads and from where. For teams managing a sprawling tag ecosystem (a Shopee seller dashboard running GTM plus three vendor pixels plus a homegrown attribution script is not unusual), import maps introduce a formal dependency graph that replaces the current informal chaos.

The security and signal benefit is concrete. Without import maps, a compromised or updated third-party script can quietly redirect module loads to a different endpoint. With an import map in place and a strict Content Security Policy alongside it, you’ve created an auditable record of exactly what JavaScript was permitted to execute at page load. That matters for PDPA compliance in Thailand and for data governance teams trying to answer the reasonable question: “what was actually running on our pages last Tuesday?”

Import maps are supported in all modern browsers as of mid-2024. The implementation barrier is low; the adoption rate among marketing-adjacent engineering teams remains surprisingly thin.


View Transitions and the Analytics Blind Spot They Create

Bramus’s ie-page-transitions project — a CSS+JS library that revives Internet Explorer’s classic interpage transition effects using the modern View Transition API — is presented as a nostalgia experiment. It is. It’s also a useful stress test for something more consequential: what happens to your page-view tracking when navigation stops looking like navigation?

The View Transition API, now available in Chrome and increasingly in Safari, enables animated transitions between pages without a full document reload. The visual effect is smooth; the analytics implication is that the traditional pageshow or DOMContentLoaded events may fire differently, partially, or not at all depending on how the transition is implemented. Single-page application teams have dealt with this for years via history API hacks. The View Transition API extends the problem to multi-page architectures that previously had clean, reliable page-view signals.

For Southeast Asian e-commerce contexts specifically — storefronts on Lazada or Tokopedia that embed brand microsites, or LINE-connected mini-apps — the risk is that a design team adopts view transitions for their perceived polish without looping in the analytics function. The result is a reporting dashboard that shows a 15% drop in page views that isn’t a traffic drop at all. It’s a measurement gap created by a CSS file.

The mitigation is a transition observer pattern: wrap your page-view tracking call inside a transitionend listener rather than a DOM-ready event, and validate that your tag manager fires correctly against a View Transition-enabled test environment before any production rollout.

Naming Conventions as Signal Infrastructure

Vitaly Friedman’s practical guide to naming UI components in Smashing Magazine reads like a UX article. Spend ten minutes with it and it starts reading like a data architecture article.

Inconsistent component naming — buttons called cta-primary in one codebase and btn-hero-action in another — is one of the most reliable sources of tracking implementation debt. When component names drift, the CSS selectors and data attributes your analytics team uses to instrument click events drift with them. A/B test results become unreliable when the “same” button carries three different identifiers across three deployment environments.

Friedman’s recommendation to establish a shared naming taxonomy — one that spans design system, code, and QA — has a direct return in tracking fidelity. Teams that implement a consistent data-track-id convention anchored to design system component names report fewer instrumentation gaps during release cycles. The naming layer is signal infrastructure. Treating it as a UX housekeeping task is how you end up with six months of click data you can’t trust.


Key Takeaways

  • Audit your analytics fetch calls to handle body-phase failures separately from connection failures — especially for conversion and attribution beacons on mobile networks.
  • Add import maps to your production dependency stack as both a security control and a compliance audit trail for third-party JavaScript.
  • Before any design team ships View Transition API effects, run your full tag suite against a transition-enabled test environment and confirm page-view events fire as expected.

The browser is not a passive delivery mechanism for your marketing stack. It’s an active environment with its own lifecycle events, permission models, and failure modes — and each new API that ships changes the surface area your tracking depends on. The teams that treat browser spec updates as engineering trivia are the same ones debugging attribution gaps six months later and blaming the ad platforms. Which raises the question: how often does your analytics function actually read the spec?


At grzzly, we work with digital growth teams across Southeast Asia to audit JavaScript payloads, validate tracking implementations, and build measurement infrastructure that holds up when browsers change the rules. If your tag ecosystem has grown faster than your confidence in the data it produces, we should compare notes. Let’s talk

Stormy Grizzly

Written by

Stormy Grizzly

Stress-testing email open rates, dissecting Apple's Mail Privacy Protection, and auditing the JavaScript payloads quietly leaking signal. The analyst who reads the spec, not just the summary.

Enjoyed this?
Let's talk.

Start a conversation