-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adding retention attributed metric #6955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding retention attributed metric #6955
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| ) : AttributedMetric, AtbLifecyclePlugin { | ||
|
|
||
| companion object { | ||
| private const val PIXEL_NAME_FIRST_MONTH = "user_retention_week" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: naming? says first month but the name is retention week?
| appCoroutineScope.launch(dispatcherProvider.io()) { | ||
| if (oldAtb == newAtb) { | ||
| logcat(tag = "AttributedMetrics") { | ||
| "RetentionFirstMonth: Skip emitting atb not changed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
| } | ||
| if (shouldSendPixel().not()) { | ||
| logcat(tag = "AttributedMetrics") { | ||
| "RetentionFirstMonth: Skip emitting, outside window" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
28ebece to
90dafbc
Compare
7c10354 to
8763abc
Compare
90dafbc to
a8eb8a7
Compare
8763abc to
8f0cbda
Compare
a8eb8a7 to
efb097e
Compare
8f0cbda to
7c167da
Compare
efb097e to
287bc5e
Compare
7c167da to
90451f9
Compare
287bc5e to
77f3862
Compare
90451f9 to
d238a5c
Compare
Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1211382557175160?focus=true ### Description Adds ad clicks attributed metric as per specs in https://app.asana.com/1/137249556945/project/1206716555947156/task/1211301604929610?focus=true ### Steps to test this PR While testing this PR you need to add the following in your logcat filter: `tag~:"AttributedMetrics"` _Feature 1_ - [x] We need fresh install (including removing DDG folder in file system) - [x] Open the app - [x] wait until "skip onboarding" appears - [x] After downloading privacy config and atb init, you should see `Client status running: true -> isActive: true, isEnabled: true` - [x] Skip onboarding, and go to the browser - [x] Perform search like "hotels in vietnam" - [x] click the first ad - [x] Ensure in logs `Collected event ad_click` - [x] Go to settings -> `Attributed Metrics Dev Settings` - [x] Click on "Add Ad clicks Events" so we add some test data - [x] Update installation date with 2d ago (and click save) - [x] Close the app, open it again (or fire button) - [x] Perform search like "restaurants in vietnam" - [x] Click first ad - [x] Ensure `Fired pixel user_average_ad_clicks_past_week` ### UI changes | Before | After | | ------ | ----- | !(Upload before screenshot)|(Upload after screenshot)|
b870ae3
into
feature/cristian/search_attributed_metric

Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1211382557175157?focus=true
Description
Adds retention metric as per specs in https://app.asana.com/1/137249556945/project/1206716555947156/task/1211301604929607?focus=true
Steps to test this PR
While testing this PR you need to add the following in your logcat filter:
tag~:"AttributedMetrics"Feature 1
Client status running: true -> isActive: true, isEnabled: trueAttributed Metrics Dev Settingsv502-1(and click save)Fired pixel user_retention_week with params {count=1}v502-1(and click save)Fired pixel user_retention_week with params {count=2}v502-1(and click save)Fired pixel user_retention_month with params {count=1}UI changes