Collect UTM parameters when installing an add-on
Categories
(Toolkit :: Add-ons Manager, enhancement, P2)
Tracking
()
People
(Reporter: willdurand, Assigned: willdurand)
References
Details
Attachments
(2 files, 1 obsolete file)
4.31 KB,
text/plain
|
jennyzhang
:
data-review+
|
Details |
47 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-beta+
|
Details | Review |
We'd like to use Telemetry data to propel the (new) download stats on AMO. We have a proof of concept using main pings but this isn't ideal because we don't have data for all add-on types (see also Bug 1645347) and we.
We think that event pings would work to retrieve the number of installs (downloads) per add-on, given that we send event pings when add-ons get installed. We also store the sourceURL
in the add-on db (which was fixed in Bug 1648036), which is the URL of the page where the install process has been initiated. This could be somehow used for attribution.
The proposal would be to parse the query string of the sourceURL
and extract 4 UTM parameters (utm_source
, utm_medium
, utm_content
, and utm_campaign
) that we can then send in the event ping once the install is successful. Of course, this requires a data review.
WDYT?
Comment 1•5 years ago
|
||
We do collect those for firefox installs[1]. Do we have those params on all addon installs?
Assignee | ||
Comment 2•5 years ago
|
||
Do we have those params on all addon installs?
No, they are optional. I also think that we should only collect those params when host is AMO because otherwise we could end up collecting UTM params from various websites (unlisted add-ons).
Assignee | ||
Comment 3•5 years ago
|
||
We decided to only rely on Telemetry events (addonsManager
/install
) when the step
is completed
and the source
is either amo
or disco
in order to only have download stats for "listed" add-ons (disco
is for recommended extensions, which should be listed). Therefore, the plan would be to only record the 4 UTM params mentioned above for those specific events (in extra
payload probably).
Assignee | ||
Comment 4•5 years ago
|
||
Comment 5•5 years ago
|
||
Updated•5 years ago
|
Comment 6•5 years ago
•
|
||
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 7•5 years ago
|
||
Assignee | ||
Comment 8•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
Hi :phire, I'd like to draw your attention to the implementation of this data collection: the existing "install" event has too many extra keys already, so we cannot add the 4 UTM parameters there, and the size limit of a single extra value prevents us from serializing the 4 UTM parameters in a single extra key.
Therefore, we introduced a new "install_stats" event, documented in Events.yaml
, which collects the 4 UTM parameters as described in the original data request. Nothing has changed in this regard, we collect the 4 UTM parameters only when the installation of an add-on has completed and only when the "source" is "amo".
The event itself is only sent when the installation has completed and the source is "amo" or "disco". The existing "install" event is sent more often with more sources but we don't need events for other sources so we thought reducing the number of events being sent was a good thing.
Comment 10•5 years ago
|
||
Thanks for following up here :willdurand, that sounds fine and doesn't have any impact on the data review. I appreciate the clarification.
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
bugherder |
Assignee | ||
Comment 13•5 years ago
|
||
So, we'd like to uplift this patch to Beta (FF 80) because it would be very useful to collect the new event sooner rather than later. This would allow us to enable the new download stats feature on AMO sooner. The patch is covered by unit tests, it applies cleanly and you can see it on Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1fac3e1f4982db3995e12a085a561ce8cee301da
Will we need the patch for Bug 1657513 too?
:rpl could you take care of the uplift request while I am away for parental leave? Thanks!
Assignee | ||
Comment 14•5 years ago
•
|
||
Comment on attachment 9166983 [details]
Bug 1653020 - Collect UTM params when installing an add-on from AMO. r=rpl
Beta/Release Uplift Approval Request
- User impact if declined: Without this patch, we wouldn't be able to collect add-on installation statistics for AMO. Unfortunately, the existing Telemetry
install
events cannot be used for AMO so that's why this patch adds a new event (install_stats
).
End users wouldn't be impacted but add-on developers would be, because there wouldn't be any stats data available to them on AMO. Having this patch in Beta would allow us to collect more data sooner.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: To verify this patch, please install a web-extension from AMO. The add-on is expected to be successfully installed. The "Events" tab in
about:telemetry
should eventually contain an event for category =addonsManager
and method =install_stats
. - List of other uplifts needed: Bug 1657513
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This patch isn't risky because it only adds a new Telemetry event that is collected when an add-on is fully installed (fairly small change to the AddonManager internals). In addition, the patch includes a comprehensive set of tests.
The patch for Bug 1657513 only sets a pref in the test file to make sure the data is collected for Thunderbird when running the test file.
- String changes made/needed:
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 15•5 years ago
|
||
Comment on attachment 9166983 [details]
Bug 1653020 - Collect UTM params when installing an add-on from AMO. r=rpl
approved for 80.0b6
Updated•5 years ago
|
Comment 16•5 years ago
|
||
bugherder uplift |
Comment 17•5 years ago
•
|
||
Reproduced the initial behavior using an old Nightly 80.0a1 (build id: 20200715215205). The Events tab does not contain the method = install_stats (it contains just the install method) after installing an add-on from AMO.
Verified - Fixed in latest Nightly 81.0a1 (build id: 20200809213940) and latest Beta 80.0b6 (build id: 20200807195315). The Events tab in about:telemetry contains the method = install_stats and category = addonsManager.
Description
•