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/0/1204186595873227/1208775176602791/f
Tech Design URL: https://app.asana.com/0/1204186595873227/1208682592686299
CC:
Description: Implements PixelExperimentKit to provide Experiment metrics API to clients and fires pixel for preset experiment metrics
Optional E2E tests:
Check this to run the Personal Information Removal end to end tests. If updating CCF, or any PIR related code, tick this.
Steps to test this PR:
Assign the cohort somewhere (for example in HomePageContinueSetUpModel initialiser)
let cohort = Application.appDelegate.featureFlagger.getCohortIfEnabled(for: CredentialsSavingFlag())
In AppConfigurationURLProvider on line 57 change the url with https://www.jsonblob.com/api/jsonBlob/1313198249494110208
Run the app and check that the following pixel is sent: m_mac_experiment_enroll_credentialsSaving_blue (or control) with the expected parameters
Perform 4 searches and check that only one experiment pixel is fired: m_mac_experiment_metrics_credentialsSaving_blue ["pixelSource": "browser-dmg", "metric": "search", "enrollmentDate": "2024-12-04", "value": "1", "conversionWindowDays": "0”]
Move the system date to the following day and perform 4 searches and 4 site visits, only 2 pixels should be fired:
m_mac_experiment_metrics_credentialsSaving_blue ["pixelSource": "browser-dmg", "metric": "search", "enrollmentDate": "2024-12-05", "value": "1", "conversionWindowDays": “1”]
m_mac_experiment_metrics_credentialsSaving_blue ["pixelSource": "browser-dmg", "metric": “ app_use", "enrollmentDate": "2024-12-05", "value": "1", "conversionWindowDays": “1”]
7 Try the same up to day 4
8 On day 5 do the same and in this case you should see multiple pixels:
👾[Unique By Name And Parameters-Fired] m_mac_experiment_metrics_credentialsSaving_control ["conversionWindowDays": "5", "value": "1", "enrollmentDate": "2024-12-04", "metric": "search", "pixelSource": "browser-dmg"]
👾[Unique By Name And Parameters-Fired] m_mac_experiment_metrics_credentialsSaving_control ["pixelSource": "browser-dmg", "conversionWindowDays": "5-7", "enrollmentDate": "2024-12-04", "value": "1", "metric": "search"]
👾[Unique By Name And Parameters-Fired] m_mac_experiment_metrics_credentialsSaving_control ["pixelSource": "browser-dmg", "value": "1", "conversionWindowDays": "5", "metric": "app_use", "enrollmentDate": "2024-12-04"]
👾[Unique By Name And Parameters-Fired] m_mac_experiment_metrics_credentialsSaving_control ["metric": "app_use", "conversionWindowDays": "5-7", "pixelSource": "browser-dmg", "enrollmentDate": "2024-12-04", "value": "1"]
👾[Unique By Name And Parameters-Fired] m_mac_experiment_metrics_credentialsSaving_control ["value": "4", "pixelSource": "browser-dmg", "conversionWindowDays": "5-7", "metric": "search", "enrollmentDate": "2024-12-04"]
👾[Unique By Name And Parameters-Fired] m_mac_experiment_metrics_credentialsSaving_control ["value": "4", "enrollmentDate": "2024-12-04", "metric": "app_use", "pixelSource": "browser-dmg", "conversionWindowDays": "5-7”]
Note: I recommend Filter by Unique By Name And Parameters-Fired
<!—
Tagging instructions
If this PR isn't ready to be merged for whatever reason it should be marked with the
DO NOT MERGE
label (particularly if it's a draft)If it's pending Product Review/PFR, please add the
Pending Product Review
label.If at any point it isn't actively being worked on/ready for review/otherwise moving forward (besides the above PR/PFR exception) strongly consider closing it (or not opening it in the first place). If you decide not to close it, make sure it's labelled to make it clear the PRs state and comment with more information.
—>
Definition of Done:
—
Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation