-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Problem
The API currently requires a large amount of coordination to handle multiple ad-tech's registering impressions, especially when those impressions will be bundled and attributed together as one group at measureConversion time.
In the Sept 11 PATCG call, we discussed the need to support auditing in general to allow advertisers (and publishers to some extent) to better understand
- If ad-tech are misbehaving
- If ad-tech are making error in configuring the API
Some mistakes that we discussed were setting of histogram indices, priority, and other data which could affect attribution (e.g. future data to feed into worklet-based attribution).
Strawman API: monitoringEndpoints
Note: this is just a strawman to get a sense for what is possible here. The goal is to ensure that no impression is ever used for attribution if it does not property set the correct monitoring endpoints.
We can add a parameter to AttributionImpressionOptions to log the API call params to a set of distinct monitoringEndPoints:
navigator.attribution.saveImpression({
...
monitoringEndpoints: ["https://auditor1.example/path", "https://auditor2.example/path"]
});Upon receipt of the monitoring endpoints, the browser would immediately send a CORS request to the endpoints, where the payload would be some serialization of the exact call to saveImpression, possibly with some additional information like client wall clock time. This alone does not solve the problem, since a misbehaving intermediary site could neglect to set the correct monitoringEndpoints. However, we can fix this using filtering at conversion time to ensure we only consider events that properly added to the audit log.
const selectionDetails = {
...
// Only include impressions which set at least one endpoint below.
monitoringEndpoints: ["https://auditor1.example/path"]
};
const measurement = await navigator.attribution.measureConversion({
...
...selectionDetails,
});A few notes:
- This uses the term
monitoringrather thanreportingto distinguish that the collector may be a different entity than the one processing conversion reports - We need to support multiple auditors to gracefully handle migrations without data loss.
- In theory we could support more expressive filtering logic (i.e. force double logging), but I've intentionally punted on this. Unless extremely necessary we should punt more complexity to the worklet-based approaches discussed in Support for flexible filtering / attribution functionality #204 .
- Given that the data emitted is not cross-site, there should be no privacy concerns here
We can also consider how publishers / advertisers can automatically add monitoring endpoints to calls made on their sites (so e.g. publishers also get an audit log by default). This seems possible in theory either by auto-magically adding a monitoring endpoint to the call, or failing calls which don't have the endpoints prescribed by the top-level page. TBD on actual API surface.