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

Replace conversion registration well-known redirect with a response header

Open johnivdel opened this issue 4 years ago • 5 comments

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 avatar Dec 15 '20 21:12 johnivdel

@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

maudnals avatar Jun 17 '21 08:06 maudnals

@johnivdel Is this still something we're considering?

apasel422 avatar Oct 06 '21 16:10 apasel422

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.

johnivdel avatar Oct 14 '21 18:10 johnivdel

+1 we should align this as best as possible with https://github.com/WICG/conversion-measurement-api/issues/261

csharrison avatar Nov 11 '21 16:11 csharrison

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.

csharrison avatar Jan 08 '22 02:01 csharrison

This has been implemented via Attribution-Reporting-Register-Trigger.

apasel422 avatar Sep 14 '22 12:09 apasel422