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

Fail to report click data from cross-origin subframe using ARA #1399

Closed
shaojieg opened this issue Aug 26, 2024 · 2 comments
Closed

Fail to report click data from cross-origin subframe using ARA #1399

shaojieg opened this issue Aug 26, 2024 · 2 comments

Comments

@shaojieg
Copy link

This is a Protected Audience project. We want to collect click time signals in a click handler. This is in a cross-origin subframe.

When we use reportEvent API to send back the click data, it works fine.

However, it doesn't work when we use setReportEventDataForAutomaticBeacons. The data of setReportEventDataForAutomaticBeacons() called in the cross-origin subframe doesn't overwrite the data set in the top frame.

The code structure is below.
Main document that embeds an ad
CompanyA-owned ad top frame (calls setReportEventDataForAutomaticBeacons() with crossOriginExposed:true)
CompanyA-owned cross-origin subframe (calls setReportEventDataForAutomaticBeacons() in the click handler and performs navigation)

@shaojieg
Copy link
Author

Possible solutions.
Option 1. Let the cross-origin sub frame send a message to top frame using postMessage. And the top frame calls setReportEventDataForAutomaticBeacons() after it receives the message.
Concerns:
A. More complex code structure; Multi-level iframes might involve.
B. We would like to have the navigation ping sent after the top frame receives the message and updates the data. This might not be straightforward to support.
Option 2. The cross-origin restriction is relaxed for such cases.
Concerns: Should be very careful of the privacy issues.

@johnivdel
Copy link
Collaborator

This looks to be a duplicate of WICG/fenced-frame#185. It seems like the problem here is more relevant to fenced frames / PA behavior than ARA. Closing this for now, but feel free to re-open if there are any ARA specific issues with this integration.

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

No branches or pull requests

3 participants
@johnivdel @shaojieg and others