Made by Rune Andersen @ Copenhagen, Denmark
Mapbox logo

Debug Mapbox in Chrome DevTools

To debug Mapbox in Chrome DevTools, install the free Event Watcher extension and open its panel: every Mapbox request is captured the moment it fires, broken out into its parsed query and body parameters, plus the cookies it set and sent, and cross-referenced against the visitor's consent state. Event Watcher has listed Mapbox under Widgets since v1.2.0, and flags any Mapbox event that fires without functional consent.

Geospatial mapping platform — embed analytics and SDK telemetry from Mapbox GL JS and mobile SDKs (alternative to Google Maps used by Strava, Foursquare, GitHub, and many others).

Last updated:

Category
Widgets
Detected via
Network requests: Event Watcher matches the request URLs this platform sends
Consent category
Functional / preferences consent: Event Watcher flags Mapbox activity that fires without it
Supported since
Event Watcher v1.2.0 (2026-04-29)
Show the URL patterns Event Watcher matches
  • events.mapbox.com

What Mapbox traffic looks like

Mapbox splits cleanly into content and telemetry. Tiles, styles, fonts, and geocoding are the map itself; a separate beacon reports that the map was used. Event Watcher matches the telemetry host only, so a Mapbox entry in the stream means the SDK reported, not that a tile loaded.

Endpoint pattern
Telemetry posts to events.mapbox.com/events/v2?access_token=<token>. Map content comes from api.mapbox.com and is deliberately not matched, since it is the page's own content rather than tracking
Transport
JSON POST carrying an array of events, sent by Mapbox GL JS and the mobile SDKs. The public access token travels in the query string, in plain sight
Key parameters
event (a session turnstile event and a map load event) · sdkIdentifier and sdkVersion · a persistent anonymous SDK user id · skuId, which is the billing SKU. Exact field names vary between SDK versions
Notes
Mapbox bills GL JS per map load, and this beacon is the meter. Counting these requests on a page is the closest client-side equivalent to reading the invoice

A map load beacon, as Event Watcher captures it:

[
  {
    "event": "map.load",
    "created": "2026-08-10T09:14:22.031Z",
    "sdkIdentifier": "mapbox-gl-js",
    "sdkVersion": "3.x.x",
    "userId": "8f1c…",
    "skuId": "01"
  }
]

Debugging Mapbox with Event Watcher

  • No dedicated parser. The beacon is matched by hostname, named Mapbox, badged with the Widgets category, and shown with its parsed query and body parameters.
  • The access_token in the query is readable directly. Confirm it is a public pk. token and not a secret one, and that it is the token you expect for this site.
  • Because tile traffic is not matched, the Mapbox events in the stream are exactly the billable ones. If a page produces more map load beacons than it has maps, something is initializing the map more than once, typically a component that re-renders.
  • Script Tree attributes the SDK to the site's own bundle, a tag manager, or another third-party script.

Mapbox and consent

Functional consent

Event Watcher checks Mapbox against the functional consent category.

A map a visitor asked for is functional. The telemetry beacon is a separate question: it is a third-party call carrying a persistent SDK identifier, and it fires on map load whether or not the visitor interacted with the map. The web SDK exposes no supported switch to turn it off, so the practical control is whether the map initializes at all before consent resolves.

Common debugging scenarios

  • Map loads are higher than expected. Count the map.load beacons per page view. Each one is a billed load, and re-initialization on re-render is the usual cause of a surprising invoice.
  • Which token is in use? Read access_token from the query string, confirm the pk. prefix, and check that URL restrictions are configured for it.
  • The map renders but no beacon appears. A content blocker or a content security policy is blocking events.mapbox.com. The map still works; the telemetry does not arrive.
  • A map appears on a page that should not have one. Group by Page to see where beacons fire, then use Script Tree to find what mounted the component.
  • Mapbox fires before consent. Filter to Mapbox and read the consent verdict on the first beacon of the session.

See Mapbox traffic on your own site

Free, no account, runs entirely inside Chrome DevTools.

Add to ChromeFree on the Chrome Web Store

Related guides

More widgets platforms