attribution-reporting-api
attribution-reporting-api copied to clipboard
Consider marking attribution triggers with a specific header
This was qualified by the developer as a nice-to-have.
Use case: one may need to distinguish attribution requests from others requests in a straightforward way.
- On the source side, this can be done by checking for the presence of the
Attribution-Reporting-Source-Info
header. - On the trigger side though, there's no header.
One can use part of the attributionsrc
path to flag attribution trigger requests as such. For example, in the following attribution pixel, attribution_trigger
in the path tells the server this is an attribution triggering request:
<img src="https://ad-tech.example/conversionpixel"
attributionsrc=”https://adtech.example/attribution_trigger?purchase=13” />
This works, but: Instead, one may want to use the same URL for all conversion pixels, and route the process by sorting via a header.
(I think this would also enable developers to write more understandable code, by creating a symmetry with what's done on the source side).
@apasel422 @johnivdel What do you think?
This is effectively implemented via the Attribution-Reporting-Eligible
request header that is set when the attributionsrc
attribute is present on the tag, regardless of whether that attribute has a value.