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/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

  • 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
  • Perform search like "hotels in vietnam"
  • click the first ad
  • Ensure in logs Collected event ad_click
  • Go to settings -> Attributed Metrics Dev Settings
  • Click on "Add Ad clicks Events" so we add some test data
  • Update installation date with 2d ago (and click save)
  • Close the app, open it again (or fire button)
  • Perform search like "restaurants in vietnam"
  • Click first ad
  • Ensure Fired pixel user_average_ad_clicks_past_week

UI changes

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

@cmonfortep cmonfortep force-pushed the feature/cristian/ad_attributed_metrics branch from bd049c1 to b0586cd Compare October 17, 2025 16:46
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

@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/ad_attributed_metrics branch from b0586cd to d5957c1 Compare October 24, 2025 08:22
@cmonfortep cmonfortep mentioned this pull request Oct 24, 2025
38 tasks
@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/ad_attributed_metrics branch from d5957c1 to f88ee1d Compare October 29, 2025 16:30
@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/ad_attributed_metrics branch from f88ee1d to 6633627 Compare October 31, 2025 11:56
@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/ad_attributed_metrics branch from 6633627 to c380017 Compare November 4, 2025 13:48
@cmonfortep cmonfortep force-pushed the feature/cristian/retention_attributed_metric branch from 90451f9 to d238a5c Compare November 6, 2025 12:06
@cmonfortep cmonfortep force-pushed the feature/cristian/ad_attributed_metrics branch from c380017 to 3a497dd Compare November 6, 2025 12:06
Task/Issue URL:
https://app.asana.com/1/137249556945/project/72649045549333/task/1211382557175164?focus=true

### Description
Expose remote config to metrics and update their logic to use remote
config and FF

### Steps to test this PR

Use logcat filter: `tag~:"AttributedMetrics"`

➡️ Go to `PrivacyFeatureName` class and replace url by
`https://api.jsonblob.com/019a4fb1-89b3-7971-8c77-ab77969a5874`

Client Flags
_all disabled_
- [x] fresh install (including folder)
- [x] install app
- [x] wait until privacy config downloads
- [x] ensure `Client status running: true -> isActive: true, isEnabled:
true`
- [x] Go to Attributed Metrics Settings and update install date to 1mo
ago
- [x] Go to Feature flag inventory
- [x] Disable `attributedMetrics` and `emitAllMetrics`
- [x] restart app and ensure `Client status running: false -> isActive:
true, isEnabled: false`
- [ ] Ensure no logs from retention metrics
- [ ] Perform a search -> ensure no logs (means metric is disabled)
- [ ] Search "restaurants in vietnam", click on an Ad -> ensure no logs
(means metric is disabled)

_emit all disabled (we collect)_
- [x] Go to Feature flag inventory
- [x] Enable `attributedMetrics`, but keep disabled `emitAllMetrics`
- [x] restart app and ensure `Client status running: true -> isActive:
true, isEnabled: true`
- [x] go to Attributed Metrics Settings
- [x] update install date to 1mo ago
- [x] put random search and app ATBs
- [x] Add Search and Ad click events
- [x] Go back to browser
- [x] Perform a search -> will see collected events, but see `Discard
pixel, client not active`
- [x] Search "restaurants in vietnam", click on an Ad -> will see
collected events, but see `Discard pixel, client not active`
- [x] Fire button to restart app -> see `Discard pixel, client not
active`

_Specific metrics_
- [x] Go to Feature flag inventory
- [x] With `attributedMetrics` enabled and `emitAllMetrics` enabled

_adclicks_
- [x] With `adClickCountAvg` disabled we don't collect and we don't emit
- [x] Perform search that shows ads and click on them to confirm
- [x] With `adClickCountAvg` enabled, but `canEmitAdClickCountAvg`
disabled, we collect but don't emit
- [x] Perform search that shows ads and click on them, event collected
but we never emit

_search_
- [x] With `searchDaysAvg` disabled we don't collect and we don't emit
- [x] Perform search, ensure not collected and not emitted (update
searchATB for testing)
- [x] With `searchDaysAvg` enabled, but `canEmitSearchDaysAvg`disabled,
we collect but don't emit
- [x] Perform search, ensure collected but not emitted (update searchATB
for testing)

_retention_
- [x] With `retention` disabled, like metric doesn't exist
- [x] Update atb in attributed metrics internal dev settings
- [x] Restart the app, no logs
- [x] With `retention` enabled, but `canEmitRetention` disabled, only
emission disabled
- [x] Update atb in attributed metrics internal dev settings
- [x] Restart the app, some logs from metric logic but pixel not emitted

### UI changes
| Before  | After |
| ------ | ----- |
!(Upload before screenshot)|(Upload after screenshot)|
@cmonfortep cmonfortep merged commit 8220682 into feature/cristian/retention_attributed_metric Nov 6, 2025
4 of 6 checks passed
@cmonfortep cmonfortep deleted the feature/cristian/ad_attributed_metrics 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants