Skip to content

Conversation

@cmonfortep
Copy link
Contributor

@cmonfortep cmonfortep commented Oct 17, 2025

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

  • We need fresh install (including removing DDG folder in file system)
  • Open the app
  • wait until "skip onboarding" appears
  • After downloading privacy config and atb init, you should see Client status running: true -> isActive: true, isEnabled: true
  • Skip onboarding, and go to the browser
  • Go to settings -> Attributed Metrics Dev Settings
  • Update app retention atb with v502-1 (and click save)
  • Update installation date with 2d ago (and click save)
  • Close the app, open it again (or fire button)
  • Ensure Fired pixel user_retention_week with params {count=1}
  • Update app retention atb with v502-1 (and click save)
  • Update installation date with 8d ago (and click save)
  • Close the app, open it again (or fire button)
  • Ensure Fired pixel user_retention_week with params {count=2}
  • Update app retention atb with v502-1 (and click save)
  • Update installation date with 1mo ago (and click save)
  • Close the app, open it again (or fire button)
  • Ensure Fired pixel user_retention_month with params {count=1}

UI changes

Before After
!(Upload before screenshot) (Upload after screenshot)
Copy link
Contributor

@marcosholgado marcosholgado left a 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"
Copy link
Contributor

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"
Copy link
Contributor

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@cmonfortep cmonfortep force-pushed the feature/cristian/search_attributed_metric branch from 28ebece to 90dafbc Compare October 24, 2025 08:22
@cmonfortep cmonfortep force-pushed the feature/cristian/retention_attributed_metric branch from 7c10354 to 8763abc Compare October 24, 2025 08:22
@cmonfortep cmonfortep mentioned this pull request Oct 24, 2025
38 tasks
@cmonfortep cmonfortep force-pushed the feature/cristian/search_attributed_metric branch from 90dafbc to a8eb8a7 Compare October 29, 2025 16:30
@cmonfortep cmonfortep force-pushed the feature/cristian/retention_attributed_metric branch from 8763abc to 8f0cbda Compare October 29, 2025 16:30
@cmonfortep cmonfortep force-pushed the feature/cristian/search_attributed_metric branch from a8eb8a7 to efb097e Compare October 31, 2025 11:56
@cmonfortep cmonfortep force-pushed the feature/cristian/retention_attributed_metric branch from 8f0cbda to 7c167da Compare October 31, 2025 11:56
@cmonfortep cmonfortep force-pushed the feature/cristian/search_attributed_metric branch from efb097e to 287bc5e Compare November 4, 2025 13:47
@cmonfortep cmonfortep force-pushed the feature/cristian/retention_attributed_metric branch from 7c167da to 90451f9 Compare November 4, 2025 13:48
@cmonfortep cmonfortep force-pushed the feature/cristian/search_attributed_metric branch from 287bc5e to 77f3862 Compare November 6, 2025 12:06
@cmonfortep cmonfortep force-pushed the feature/cristian/retention_attributed_metric branch from 90451f9 to d238a5c Compare November 6, 2025 12:06
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)|
@cmonfortep cmonfortep merged commit b870ae3 into feature/cristian/search_attributed_metric Nov 6, 2025
5 of 6 checks passed
@cmonfortep cmonfortep deleted the feature/cristian/retention_attributed_metric branch November 6, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants