attribution-reporting-api icon indicating copy to clipboard operation
attribution-reporting-api copied to clipboard

Consider marking attribution triggers with a specific header

Open maudnals opened this issue 3 years ago • 1 comments

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).

maudnals avatar Feb 24 '22 11:02 maudnals

@apasel422 @johnivdel What do you think?

maudnals avatar Feb 24 '22 11:02 maudnals

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.

apasel422 avatar Sep 13 '22 13:09 apasel422