-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adds attributed metric for ad clicks #6956
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
Merged
cmonfortep
merged 2 commits into
feature/cristian/retention_attributed_metric
from
feature/cristian/ad_attributed_metrics
Nov 6, 2025
Merged
Adds attributed metric for ad clicks #6956
cmonfortep
merged 2 commits into
feature/cristian/retention_attributed_metric
from
feature/cristian/ad_attributed_metrics
Nov 6, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Oct 17, 2025
Contributor
Author
bd049c1 to
b0586cd
Compare
marcosholgado
approved these changes
Oct 20, 2025
Contributor
marcosholgado
left a comment
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
7c10354 to
8763abc
Compare
b0586cd to
d5957c1
Compare
38 tasks
8763abc to
8f0cbda
Compare
d5957c1 to
f88ee1d
Compare
This was referenced Oct 29, 2025
8f0cbda to
7c167da
Compare
f88ee1d to
6633627
Compare
7c167da to
90451f9
Compare
6633627 to
c380017
Compare
90451f9 to
d238a5c
Compare
c380017 to
3a497dd
Compare
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)|
8220682
into
feature/cristian/retention_attributed_metric
4 of 6 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

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
Client status running: true -> isActive: true, isEnabled: trueCollected event ad_clickAttributed Metrics Dev SettingsFired pixel user_average_ad_clicks_past_weekUI changes