attribution-reporting-api
attribution-reporting-api copied to clipboard
Replace conversion registration well-known redirect with a response header
The API currently supports legacy tracking pixels by allowing them to redirect to a well known url which the browser intercepts. While this works fine, this mechanism is a confusing and abnormal.
Without looking deeply, it is hard to understand how the browser is actually handling the well-known redirect. For example, is it the browser processing the redirect response, and then triggering a conversion? Or is the browser processing the redirect request that triggers attribution?
A more typical mechanism would be having an HTTP header, that when parsed by the browser, is translated to a conversion event.
This could be implemented as a new structured response header of the form:
Register-Conversion: conversion-data=<string>, agg-conversion-data=<string>,...
In the context of #57, the header name could be Trigger-Attribution
.
The motivation for this is related to #74, but explicitly simplifies tracking pixel registration.
cc @maudnals @csharrison
@johnivdel I agree that a header may be an easier-to-understand mechanism than well-known redirects. Maybe this is a topic to bring to the wider group (meeting)?
EDIT: s/would be easier/may be easier
@johnivdel Is this still something we're considering?
I think this has very clear benefits still. We can file a layering issue against PCM as it would increase a large difference in API shape.
+1 we should align this as best as possible with https://github.com/WICG/conversion-measurement-api/issues/261
We spoke about this in the meeting on 2021-12-13 (minutes). If we align this we could do something like
<img src="..." attributiontrigger="https://adtech.example/attribution_trigger?id=1234">
This would invoke a fetch just like the attributionsrc
requests, and it enables us to make the same security guarantees as attribution sources.
This has been implemented via Attribution-Reporting-Register-Trigger
.