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)

@cmonfortep
Copy link
Contributor Author

cmonfortep commented Oct 17, 2025

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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants