Skip to content

Conversation

cmonfortep
Copy link
Contributor

@cmonfortep cmonfortep commented Oct 7, 2025

Task/Issue URL: https://app.asana.com/1/137249556945/project/488551667048375/task/1211382557175158?focus=true

and: https://app.asana.com/1/137249556945/project/488551667048375/task/1211382557175159?focus=true

Description

Introduces 2 attributed metrics and their initial implementation.

Steps to test this PR

While testing this PR you need to add the following in your logcat filter:
tag~:"AttributedMetrics"

Note: Test cases should be executed in order

Not enough data

  • 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 search atb with v502-1 (and click save)
  • Update installation date with 10-8d ago (and click save)
  • Go back to the browser
  • Perform a search
  • No pixels are emitted, Skip emitting...not enough data or no events (both ddg_search_days and ddg_search)

Sending data

  • Go to settings -> Attributed Metrics Dev Settings
  • Click on "Add Search Events"
  • Update search atb with v502-1 (and click save)
  • Go back to the browser
  • Perform a search
  • Ensure you see Fired pixel user_average_searches_past_week_first_month with params {count=0} (Note: 0 is the bucket, not value. Notice first_month in pixel name)
  • Ensure you see Fired pixel user_active_past_week with params {days=2}(note: 2 is the bucket, not the value)

Trigger only if search atb refreshes

  • Perform a search
  • No pixels are emitted, Skip emitting....atb not changed (both ddg_search_days and ddg_search)
  • You should see 2 collected events (both ddg_search_days and ddg_search)

installation >1mo ago

  • Go to settings -> Attributed Metrics Dev Settings
  • Update search atb with v502-1 (and click save)
  • Update installation date with some day in August (and click save)
  • Perform a search
  • Ensure you see Fired pixel user_average_searches_past_week with params {count=0} (Note: 0 is the bucket, not value. Notice this is not first_month)
  • Ensure you see Fired pixel user_active_past_week with params {days=2}(note: 2 is the bucket, not the value)

Client not active

  • Clear storage
  • Open the app
  • After downloading privacy config and atb init, you should see Client status running: false -> isActive: false, isEnabled: true
  • Skip onboarding, and go to the browser
  • Perform a search
  • Ensure nothing collected Discard collect event....client not active and not emitted Skip emitting....

UI changes

Before After
!(Upload before screenshot) (Upload after screenshot)

@cmonfortep
Copy link
Contributor Author

cmonfortep commented Oct 7, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cmonfortep cmonfortep force-pushed the feature/cristian/attributed_metrics_module branch from 831e0ec to c8c63fb Compare October 7, 2025 18:13
@cmonfortep cmonfortep force-pushed the feature/cristian/search_attributed_metric branch from 12d236a to 6a65b73 Compare October 7, 2025 18:13
@cmonfortep cmonfortep changed the base branch from feature/cristian/attributed_metrics_module to feature/cristian/attributed_metrics_internal_dev_settings October 7, 2025 18:13
@cmonfortep cmonfortep force-pushed the feature/cristian/attributed_metrics_internal_dev_settings branch from 2106b08 to bedf6b7 Compare October 8, 2025 13:09
@cmonfortep cmonfortep force-pushed the feature/cristian/search_attributed_metric branch from 6a65b73 to 6129721 Compare October 8, 2025 13:09
@cmonfortep cmonfortep force-pushed the feature/cristian/attributed_metrics_internal_dev_settings branch from bedf6b7 to 5fd75af Compare October 8, 2025 13:31
@cmonfortep cmonfortep force-pushed the feature/cristian/search_attributed_metric branch from 6129721 to 83ab535 Compare October 8, 2025 13:31
@cmonfortep cmonfortep force-pushed the feature/cristian/attributed_metrics_internal_dev_settings branch from 5fd75af to 6a6bd27 Compare October 8, 2025 14:52
@cmonfortep cmonfortep force-pushed the feature/cristian/search_attributed_metric branch from 83ab535 to 4738c79 Compare October 8, 2025 14:52
@cmonfortep cmonfortep force-pushed the feature/cristian/search_attributed_metric branch from 4738c79 to e0ba965 Compare October 8, 2025 22:04
store.searchRetentionAtb?.let {
store.searchRetentionAtb = binding.searchAtb.text
}
store.searchRetentionAtb = binding.searchAtb.text
Copy link
Contributor Author

Choose a reason for hiding this comment

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

internal screen bug fix: before making a search, there's no search retention atb, and override was not working

Copy link
Contributor Author

Choose a reason for hiding this comment

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

File only contains logging changes, to improve testing.

@cmonfortep cmonfortep marked this pull request as ready for review October 8, 2025 22:08
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.

1 participant