@@ -1985,9 +1985,10 @@ set on a response requesting that the user agent invoke the
19851985<a method for=Attribution>measureConversion()</a> API.
19861986
19871987<div class=example id=ex-measure-conversion-header>
1988- This is the HTTP equivalent of <a href=#ex-measure-conversion>the JavaScript `measureConversion` example</a> :
1988+ This is the HTTP equivalent of <a href=#ex-measure-conversion>the JavaScript `measureConversion` example</a> ,
1989+ with the addition of a `report-url` to which the resulting report will be `POST`ed:
19891990<xmp highlight=http>
1990- Measure-Conversion: aggregation-service="https://aggregator.example/tee", histogram-size=20, epsilon=1.0, lookback-days=14, impression-sites=("publisher.example" "other.example"), impression-callers=("ad-tech.example"), match-values=(2), credit=(0.25 0.25 0.5), value=3, max-value=7
1991+ Measure-Conversion: aggregation-service="https://aggregator.example/tee", histogram-size=20, epsilon=1.0, lookback-days=14, impression-sites=("publisher.example" "other.example"), impression-callers=("ad-tech.example"), match-values=(2), credit=(0.25 0.25 0.5), value=3, max-value=7, report-url="https://report-handler.example/foo"
19911992</xmp>
19921993</div>
19931994
@@ -2056,13 +2057,18 @@ optional keys are populated the same way as the corresponding
20562057 Value of <a dict-member for=AttributionConversionOptions>maxValue</a> ,
20572058 a positive [=structured header/integer=] . This key is optional.
20582059 </dd>
2060+ <dt> <dfn noexport><code>report-url</code></dfn> </dt>
2061+ <dd>
2062+ A [=structured header/string=] containing the [=potentially trustworthy URL=]
2063+ to which the resulting report, if any, will be `POST`ed. The URL may be
2064+ relative to the request URL, and its [=url/scheme=] must be "`http`" or "`https`".
2065+ This key is required.
2066+ </dd>
20592067</dl>
20602068
2061- Issue: Add a required field indicating where to send the resulting report.
2062-
20632069<div algorithm>
20642070To <dfn noexport>parse a `Measure-Conversion` header</dfn> given a [=header value=]
2065- |input|, run these steps:
2071+ |input| and [=URL=] |baseUrl| , run these steps:
20662072
206720731. Let |dict| be the result of [=structured header/parsing structured fields=]
20682074 with <var ignore> input_bytes</var> set to |input| and
@@ -2072,6 +2078,12 @@ To <dfn noexport>parse a `Measure-Conversion` header</dfn> given a [=header valu
207220781. If |aggregationService| is not a [=structured header/string=] , return an error.
207320791. Let |histogramSize| be |dict|["<code>[=measure-conversion/histogram-size=] </code> "] [=map/with default=] `undefined`.
207420801. If |histogramSize| is not a positive [=structured header/integer=] , return an error.
2081+ 1. Let |reportUrlString| be |dict|["<code>[=measure-conversion/report-url=] </code> "] [=map/with default=] `undefined`.
2082+ 1. If |reportUrlString| is not a [=structured header/string=] , return an error.
2083+ 1. Let |reportUrl| be the result of applying the [=URL parser=] to |reportUrlString|, with |baseUrl|.
2084+ 1. If |reportUrl| is failure, return an error.
2085+ 1. If |reportUrl| is not a [=potentially trustworthy URL=] , return an error.
2086+ 1. If |reportUrl|'s [=url/scheme=] is not "`http`" or "`https`", return an error.
207520871. Let |opts| be a new {{AttributionConversionOptions}} with the following items:
20762088 : {{AttributionConversionOptions/aggregationService}}
20772089 :: |aggregationService|
@@ -2117,7 +2129,7 @@ To <dfn noexport>parse a `Measure-Conversion` header</dfn> given a [=header valu
21172129 1. Let |maxValue| be its [=map/value=] .
21182130 1. If |maxValue| is not a positive [=structured header/integer=] , return an error.
21192131 1. Set |opts|.{{AttributionConversionOptions/maxValue}} to |maxValue|.
2120- 1. Return |opts|.
2132+ 1. Return ( |opts|, |reportUrl|) .
21212133
21222134</div>
21232135
0 commit comments