Use mapbox project keys for maps display

VERIFIED FIXED

Status

VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: hoosteeno, Assigned: agibson)

Tracking

Production

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [kb=1415035] )

Attachments

(1 attachment)

On www.mozilla.org/contact, we're currently using an api key for a mapbox data layer called "Spiffy Streets". In mapbox, data layers are one of the foundational elements of projects. Mapbox projects are combinations of data layers. They have a unique API key, and -- most critically -- they have usage stats. 

Because we're using a data layer key rather than a project key for /contact, we don't get usage stats.

We should generate a mapbox project (or projects) for /contact and use the keys for that project instead of the keys we're currently using, so we can start tracking usage stats for /contact. This should be straightforward; we may need to experiment locally to get it right, but this is likely a very small effort.
(Assignee)

Comment 1

5 years ago
The keys on www.mozilla.org/contact are the ones originally provided to us my MapBox. We also use another key for the labels layer.

I'll see if I can gain access to the mapbox account and have a look what's up. I'm assuming we can just create a new mozilla.org project based on the two current data keys and use whatever that generates?

If this works, I can test locally and make a PR. Then we'll need to create an IT bug to have the API key updated for demo/staging/production servers.
> I'll see if I can gain access to the mapbox account and have a look what's
> up. 

Check out https://mana.mozilla.org/wiki/display/WebDev/Mapbox+Account for this.

> I'm assuming we can just create a new mozilla.org project based on the
> two current data keys and use whatever that generates?

There is already a www.mozilla.org project in our Mapbox account that I built months ago; but we haven't used it yet. We can probably just add/remove layers from that project until it has the same layers as one of our current keys. Then we can create a new project that has the same layers as our other key. It might just work. 

If easier, you can delete the current www.mozilla.org project and make a new one. This has been necessary for us sometimes, since on occasion tinkering with a project will make it lose some of its base functionality (like geocoding). 

> 
> If this works, I can test locally and make a PR. Then we'll need to create
> an IT bug to have the API key updated for demo/staging/production servers.

Sounds great. Thanks!
Whiteboard: [kb=1415035]
(Assignee)

Comment 3

5 years ago
Created attachment 8444412 [details] [review]
GitHub pull request
(Assignee)

Updated

5 years ago
Depends on: 1028917
(Assignee)

Updated

5 years ago
Assignee: nobody → agibson
Status: NEW → ASSIGNED

Comment 4

5 years ago
Commits pushed to master at https://github.com/mozilla/bedrock

https://github.com/mozilla/bedrock/commit/c048c8454f6f2c7f1660bd261b89b212e5ab6657
[bug 1027184] Use mapbox project keys for maps display

https://github.com/mozilla/bedrock/commit/f6732b51d39f74bffcd9afeff9fa271325b7245a
Merge pull request #2108 from alexgibson/bug-1027184-use-mapbox-project-keys-for-maps-display

[bug 1027184] Use mapbox project keys for maps display
fixed on stage https://www.allizom.org/en-US/contact/spaces/vancouver/
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.