You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api.bs
+26-4Lines changed: 26 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1528,6 +1528,14 @@ The <dfn method for=Attribution>measureConversion(|options|)</dfn> method steps
1528
1528
1529
1529
1. Let |implicitInputs| be the result of [=obtaining the implicit API inputs=] from [=this=].
1530
1530
1. [=Assert=]: |implicitInputs| is not null.
1531
+
1. Return the result of running [=measure a conversion=] with |options| and |implicitInputs|.
1532
+
1533
+
</div>
1534
+
1535
+
<div algorithm>
1536
+
To <dfn>measure a conversion</dfn> given {{AttributionConversionOptions}} |options|
1537
+
and [=implicit API inputs=] |implicitInputs|:
1538
+
1531
1539
1. Let |document| be |implicitInputs|'s [=implicit API inputs/associated document=].
1532
1540
1. Let |realm| be |document|'s [=relevant realm=].
1533
1541
1. If |document| is not [=allowed to use=] the [=policy-controlled feature=] named
@@ -2232,13 +2240,27 @@ and [=response=] |response|, run these steps:
2232
2240
2233
2241
1. Let |saveImpressionHeader| be the result of [=header list/get|getting=]<code>[:Save-Impression:]</code> from |response|'s [=response/header list=].
2234
2242
2235
-
1. If |saveImpressionHeader| is null, return.
2243
+
1. If |saveImpressionHeader| is not null:
2244
+
2245
+
1. Let |impressionOptions| be the result of [=parse a Save-Impression header|parsing=] |saveImpressionHeader|.
2246
+
2247
+
1. If |impressionOptions| is not an error, [=save an impression|Save=] |impressionOptions| with |implicitInputs|.
2248
+
2249
+
1. Let |measureConversionHeader| be the result of [=header list/get|getting=]<code>[:Measure-Conversion:]</code> from |response|'s [=response/header list=].
2250
+
2251
+
1. If |measureConversionHeader| is not null:
2252
+
2253
+
1. Let |parseConversionResult| be the result of [=parse a Measure-Conversion header|parsing=] |measureConversionHeader|.
2254
+
2255
+
1. If |parseConversionResult| is not an error:
2256
+
2257
+
1. Let (|conversionOptions|, |reportUrl|) be |parseConversionResult|.
2236
2258
2237
-
1. Let |impressionOptions| be the result of [=parse a Save-Impression header|parsing=]|saveImpressionHeader|.
2259
+
1. Let |reportPromise| be the result of running [=measure a conversion=]with |conversionOptions| and |implicitInputs|.
2238
2260
2239
-
1. If |impressionOptions| is an error, return.
2261
+
1. [=In parallel=], [=upon fulfillment=] of |reportPromise|, [=send a report=] with its value and |reportUrl|.
2240
2262
2241
-
1. [=save an impression|Save=] |impressionOptions| with |implicitInputs|.
2263
+
Issue: Confirm the desired semantics of [:Save-Impression:] and [:Measure-Conversion:] in the same response.
0 commit comments