Skip to content
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

Feature: Use network request for gathering attribution reporting data #972

Draft
wants to merge 32 commits into
base: develop
Choose a base branch
from

Conversation

amovar18
Copy link
Collaborator

@amovar18 amovar18 commented Feb 25, 2025

Description

This PR aims to gather attribution reporting data from network requests.

Relevant Technical Choices

  • Any source or trigger that has to be registered in the browser has to send it via network request with appropriate headers.
  • We can parse the required headers in the network request from the header and add some of the data that is not yet available via CDP API of Storage.attributionReportingTriggerRegistered as this API doesn't give the “Destination” and the “Reporting Origin” of the trigger.
  • To keep the data in sync with what chrome://attribution-internals/ page shows, we can do the following process:
    • For trigger data, once data is parsed from the network request and added to the store, we listen to the Storage.attributionReportingTriggerRegistered event. This method fires after a delay because the browser has to store the trigger in a private cache after validation.
    • Once Storage.attributionReportingTriggerRegistered event is fired we take this data and use eventTriggerData in registration and compare it with the data in trigger that was registered from the network request and merge both the data to get values like debugKey, eventLevel, aggregable etc.

Testing Instructions

  • Pull this branch.
  • In the terminal run npm i && npm run build:ext.
  • Now in the terminal run chrome-pat.
  • Load the built extension.
  • Go to the DevTools, open PSAT and navigate to attribution reporting section.
  • Now go to india.com and check that the data is being populated in the tables.

Additional Information:

Screenshot/Screencast


Checklist

  • I have thoroughly tested this code to the best of my abilities.
  • I have reviewed the code myself before requesting a review.
    - [ ] This code is covered by unit tests to verify that it works as intended. N/A
  • The QA of this PR is done by a member of the QA team (to be checked by QA).

mohdsayed and others added 30 commits February 17, 2025 10:47
@amovar18 amovar18 self-assigned this Feb 25, 2025
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