-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a Map Load event to GL-JS #7297
Comments
Does it means mapbox-gl-js could not be used anymore on closed private networks? |
Does this mean that Mapbox pricing for JS may well change from map tiles to map loads? Much like the Mapbox mobile SDK & Google Maps? |
Hi @leearmstrong , that may be something we consider in the future, but was not the motivation for this ticket. @Fractaliste I asked around and I don't believe this has any impact on closed private networks. If you are using your own tile server instead of Mapbox tiles, and are therefore not setting a Mapbox access token, this event wouldn't fire. |
You're talking about this load event: https://www.mapbox.com/mapbox-gl-js/api/#map.event:load right? I still need it when I use no Mapbox token/api, otherwise I got some "Style is not done loading" errors when I dynamically add layers or sources. |
@Fractaliste I am requesting a new event. The one you refer to would not be impacted and would not fire when a Mapbox token isn't set. |
I think there's a bit of miscommunication, Lily is referring to a tracking/analytics event to mapbox.com when you're using Mapbox services, the |
Is it too late to suggest a different name? This sounds confusingly similar to |
@stevage – this won't be exposed at all so name collision shouldn't be an issue. I agree the issue title is a bit confusing, but we are talking about a telemetry event that will be sent to a mapbox endpoint (only if using mapbox tiles) for tracking usage. |
Ah thanks. Sorry, I see that Andrew tried to clear that up but I missed it. |
What is requested in this change?
mapbox-gl-js will send a map load event when (and only when) the Mapbox access token is set, a Mapbox map is instantiated, and resources are loaded from a Mapbox API. This behavior will be the same as in the mapbox-gl-native SDKs for iOS and Android.
For each instantiation of a Mapbox GL map object, a map load will be accrued upon its first tile request to the Mapbox Maps API. Further requests made by that instance, e.g. those caused by user interactions such as zooming and panning, or by usage of runtime styling methods, will not generate additional map loads.
Other than the IP address, which is retained for a limited period of time per our privacy policy, no device identifiers will be sent as part of this event.
Why is this needed?
Today, we track how many maps we serve to our customers via API requests. We are adding map loads as a metric that isn’t biased by implementation of/interaction with maps, as API requests are. Additionally, tracking map loads will make our internal web usage metrics consistent with our internal mobile usage metrics.
We think carefully about all tracking we add to our developer tools, and only add what we believe helps us provide a better customer experience.
Can I opt out of this tracking?
If your use of mapbox-gl-js does not set the access token (using
mapboxgl.accessToken
) then this code is always disabled. When the access token is set, there is no option to disable this event.The text was updated successfully, but these errors were encountered: