mozilla-rally / rally-sdk

This is the Rally partner support library, `rally.js`, used to manage the lifecycle of Rally studies.
0 stars 4 forks source link

Save attribution codes based on extension store URL #44

Closed rhelmer closed 2 years ago

rhelmer commented 2 years ago

Save attribution codes in extension storage when running in non-dev mode, using first AMO/CWS URL present in tabs when the extension calls the Rally constructor for the first time.

Right now this code assumes that the store URL contains a slug matching the studyId, but hyphen-case instead of camelCase. For instance, studyId of facebookPixelHunt would have a CWS URL of https://chrome.google.com/webstore/detail/facebook-pixel-hunt and an AMO URL of https://addons.mozilla.org/addon/facebook-pixel-hunt/

Not asking for review on this yet, I'm asking in #addons on Matrix if this should work and/or if there are any alternatives, if this is the best/only path forward then I'll figure out how to add tests.

rhelmer commented 2 years ago

Moved to https://github.com/mozilla-rally/rally/pull/7