mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.23k stars 2.23k forks source link

Add the ability to disable event tracking #13226

Open mhemmings opened 4 months ago

mhemmings commented 4 months ago

Motivation

Mapbox GL JS sends analytics data to events.mapbox.com. However, the domain is blocked by a number of ad and privacy blocklists. We see that the majority of our end-users are blocking this domain and therefore all event tracking with ad block lists, privacy-first browsers such as Brave browsers, or other tools such as PiHole.

I understand that Mapbox tries to anonymise tracking data but the ability to disable all requests is the best route for privacy focused users, who will just have the requests being blocked in the background anyway (Ad-blocker usage is around 37% worldwide)

The mobile SDKs already allow telemetry to be disabled, and the ToS explicitly state this must be an option provided to the user.

Design/Concepts/etc

Add a telemetryDisabled?: boolean or similar option to the Mapbox instantiation, which disables requests to events.mapbox.com.

This is a simple API, and allows Mapbox GL JS to work as currently implemented unless the developer actively disables telemetry. This may be a developer choice, or they could offload this choice to the user. The design also closely matches that for the Android and iOS SDKs.

Note: The above works on the assumption that "map.load" events aren't used for billing (this sort of control should never be left to the frontend environments). If it is, there are much bigger issues here due to the large number of events in the real world that would be blocked, and also the ease for users or developers to actively disable this without Mapbox ever knowing.

timotheeduran commented 2 months ago

Hi! Do we have any news on this? @stepankuzmin. I think this is really great input from @mhemmings.

At the very least, could we have a way to disable this in a development environment? This floods the console logs and makes it hard to see real errors.

MangoMarcus commented 1 month ago

We're using Cookiebot for cookie compliance for GDPR etc and they categorise the mapbox.eventData Mapbox data as "statistics", which they describe as

"Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously."

I think technically speaking we'll need to require the user to consent to this storage before we can load our Mapbox component.

If there were a way to disable telemetry instead though that'd be awesome!

cookie10codes commented 1 month ago

We’re having the same issue. It would be very sad to disable the Mapbox functionality because it captures data

wannevancamp commented 1 month ago

We are experiencing the same issue. Due to the two cookies, mapbox.eventData.uuid and mapbox.eventData, we must disable Mapbox when cookies are not accepted.

jj0b commented 1 month ago

Encountering this issue as well. Would be great to be able to disable event tracking.