VOOZH about

URL: https://phabricator.services.mozilla.com/D302800

⇱ ⚙ D302800 Bug 2027794 - Add Attribution and Distribution with Glean API.


Bug 2027794 - Add Attribution and Distribution with Glean API.
ClosedPublic

Authored by Roger on Wed, May 27, 3:44 PM.
Referenced Files
Unknown Object (File)
Sat, Jun 6, 8:25 AM
Unknown Object (File)
Sat, Jun 6, 7:18 AM
Unknown Object (File)
Fri, Jun 5, 11:17 PM
Unknown Object (File)
Wed, Jun 3, 8:50 AM
Unknown Object (File)
Wed, Jun 3, 8:50 AM
Unknown Object (File)
Wed, Jun 3, 4:27 AM
Unknown Object (File)
Wed, Jun 3, 12:12 AM
Unknown Object (File)
Tue, Jun 2, 6:34 PM
Subscribers

Diff Detail

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
Comment Actions

Have some questions about the data that we should pass in, recommend to also check with Travis about what's expected.

mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/InstallReferrerWorker.kt
313–314

The way I understand it in the case of missing metrics we should pass in while with defaulting to empty strings we would pass which could taint the data.

Recommend checking with @TravisLong also on this.

suggestion:

AttributionMetrics( 
 source = source.takeIf { it.isNotBlank() }, 
 medium = medium.takeIf { it.isNotBlank() }, 
 ... 
)
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/distributions/DistributionIdManager.kt
240

question: defaults to "Mozilla" so we'd report this for every organic user. I see allowing for a value so wouldn't this be more appropriate for the scenario of organic acquisition?

mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/InstallReferrerWorker.kt
313–314

Empty strings will end up in the dataset, that's correct. In most cases just omitting the value is enough for Glean to keep this as "null", you shouldn't have to explicitly set it to .

petru added a project: testing-approved.
Comment Actions

If the arguments passed are good with Travis they're okay with me too.

This revision is now accepted and ready to land.Thu, Jun 11, 1:45 PM
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/distributions/DistributionIdManager.kt
240

This is a good question. Thought about this for a while and I think we should just stay with recording the actual distribution ID and use query in the backend to distinguish them.

Main reason here is if we have another distribution ID that's also organic (similar to what we had before), we would still want to distinguish them in the backend.

Thanks for bring this up though. Good call out.

Revision Contents

PathSize
mobile/
android/
fenix/
app/
src/
main/
java/
org/
mozilla/
fenix/
components/
metrics/
12 lines
distributions/
3 lines
test/
java/
org/
mozilla/
fenix/
components/
metrics/
16 lines
distributions/
38 lines
CommitTreeParentsAuthorSummaryDate
6697cae5176e828faf9cca32Roger Yang
Bug 2027794 - Add Attribution and Distribution with Glean API. r=android… (Show More…)

Diff 1297546

mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/InstallReferrerWorker.kt

Loading...

mobile/android/fenix/app/src/main/java/org/mozilla/fenix/distributions/DistributionIdManager.kt

Loading...

mobile/android/fenix/app/src/test/java/org/mozilla/fenix/components/metrics/InstallReferrerWorkerTest.kt

Loading...

mobile/android/fenix/app/src/test/java/org/mozilla/fenix/distributions/DistributionIdManagerTest.kt

Loading...