Closed Bug 1476804 Opened 3 years ago Closed 1 year ago

Add UTM parameters to links to AMO


(Toolkit :: Add-ons Manager, enhancement, P3)




81 Branch
Tracking Status
firefox81 --- fixed


(Reporter: jorgev, Assigned: soniasingla, Mentored)


(Keywords: good-first-bug)


(2 files)

Per this spec[1], we request that UTM parameters are added to all URLs in the Add-ons Manager pointing to AMO, so they are easy to track in analytics dashboards.

There are 3 URLs I see that need this treatment.

Link to user profile page in add-on details view:

* utm_source=firefox-browser
* utm_medium=addons-manager
* utm_content=user-profile-link

Link to reviews in add-on details view:

* utm_source=firefox-browser
* utm_medium=addons-manager
* utm_content=reviews-link


* utm_source=firefox-browser
* utm_medium=addons-manager
* utm_content=search

Priority: -- → P2
There's been a lot of talk about this, so putting here for decision-making.

We're using the services.amo API to get this via AddonRepository.jsm, so we could (theoretically) put this change in two places:

1) in the AddonRepository.jsm (or about:addons), once we get the data back
2) in the API, to return it to requests from services.amo (which we only use)

The benefit of 2) is that we don't have to ride trains and can take affect in earlier versions of Firefox, though it's not clear if there's risk associated with that (where 'that' = older versions using it, or 'that' = other systems using the services.amo API).

The benefit of 1) is that it's more flexible, though it's not clear we need that flexibility.

CCing everyone who has expressed opinion on this. We should do this in 63.
I think that the services.AMO API is the same general API that is used elsewhere and documented for public consumption (, so it wouldn't be possible to make a change limited to what the Add-ons Manager consumes.

Note that the UTM parameters are meant to indicate how a link was followed, so the parameters change depending on what feature it was associated to. If the layout or behavior of the Add-ons Manager change, those parameters will probably need to change as well to reflect that. So, that's another reason the forward and backward compatibility of doing the change in the API may not be accurate.
If it's the same API, it's not evident anywhere in the docs. This is also used for compatibility overrides?

I assume that the services subdomain is used to be able to treat requests differently from public ones (which could/should include additional parameters)? If so, I think that's the biggest argument for doing it server-side. If not, I don't know why that subdomain exists.
I recently looked into the reasoning behind and at this very moment there is only one reason to have it around and to keep it: It makes scaling Firefox related APIs on AMO side much easier for ops.

Generally, right now there are only Rest-APIs hosted through that are hit directly by Firefox and related clients, everything else uses directly.

The code behind both is identical, so there's absolutely no special treatment from my current understanding.

The recommended add-on links currently set the utm params, the helper [1] for those could be re-used for the add-on details links for author and reviews. The URL for searching [2] should be able to get the same treatment.


Mentor: mstriemer
Keywords: good-first-bug
Priority: P2 → P3

Hello,May I work on this?

Assignee: nobody → gaurijove

Jorge, the links in the Recommendations section that are sending UTM params are setting utm_medium=firefox-browser (rather than addons-manager). Should we maintain that value for the other links as well?

Flags: needinfo?(jorge)

It comes down to us being able to pinpoint the origin on the AMO side. So, if we have utm_source=firefox-browser and utm_medium=firefox-browser, then I suggest we use more descriptive values for utm_content, like addons-manager-profile-link, addons-manager-search, etc.

Flags: needinfo?(jorge)

Hi Jayati! How is it going with this bug?

Flags: needinfo?(gaurijove)

Hi Jayati, since we haven't heard from you in awhile we're going to unassign you from this bug so other folks can pick it up. If you'd like to continue working on it, just leave a comment or update the patch. :)

Assignee: gaurijove → nobody
Flags: needinfo?(gaurijove)

Hi Caitlin

Can you assign me this bug? :)

Hi Sonia! Go ahead and submit a patch for this -- we'll assign you as soon as we see the patch come in. :)

Assignee: nobody → soniasingla.1812
Flags: needinfo?(cneiman)

Woohoo thanks for the patch, Sonia! 🙌🏼 mstriemer will review it soon. :)

Flags: needinfo?(cneiman)
Pushed by
Add UTM parameters to links to AMO. r=mstriemer
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

Thank you Sonia! 🎉🏅

You need to log in before you can comment on or make changes to this bug.