@@ -357,10 +357,10 @@ The histogram created by the [=conversion report=] is constructed as follows:
357357 or the [=privacy budget=] for the site is exhausted,
358358 a histogram consisting entirely of zeros (0) is constructed.
359359
360- * If one or more matching impressions is found, the browser runs the attribution
361- logic (default last-n-touch) to select the most recent impression. The provided conversion
360+ * If one or more matching impressions is found, the browser runs the last-n-touch
361+ attribution logic to select the relevant impression(s) . The provided conversion
362362 value is added to a histogram at the bucket that was specified at the time of the
363- attributed impression. All other buckets are set to zero.
363+ attributed impression(s) . All other buckets are set to zero.
364364
365365The browser updates the [=privacy budget store=] to reflect the reported conversion.
366366
@@ -720,16 +720,11 @@ contribute to the histogram, i.e., will be uniformly zero.
720720 };
721721 </xmp>
722722
723- 1. The choice of [=attribution logic=]
724- that the browser will apply,
725- plus any parameters that the logic needs.
723+ 1. The [=attribution logic=] parameters.
726724
727725 <xmp highlight=js>
728726 const attributionDetails = {
729- logic: "last-n-touch",
730- logicOptions: {
731- credit: [.25, .25, .5]
732- }
727+ credit: [.25, .25, .5]
733728 value: 3,
734729 maxValue: 7,
735730 };
@@ -767,20 +762,11 @@ dictionary AttributionConversionOptions {
767762 sequence<USVString> impressionSites = [];
768763 sequence<USVString> impressionCallers = [];
769764
770- AttributionLogic logic = "last-n-touch";
771- AttributionLogicOptions logicOptions;
765+ sequence<double> credit;
772766 unsigned long value = 1;
773767 unsigned long maxValue = 1;
774768};
775769
776- enum AttributionLogic {
777- "last-n-touch",
778- };
779-
780- dictionary AttributionLogicOptions {
781- sequence<double> credit;
782- };
783-
784770dictionary AttributionConversionResult {
785771 required Uint8Array report;
786772};
@@ -823,11 +809,8 @@ The arguments to <a method for=Attribution>measureConversion()</a> are as follow
823809 only [=impressions=] recorded by one of the listed sites
824810 are eligible to match this [=conversion=] .
825811 </dd>
826- <dt> <dfn>logic</dfn> </dt>
827- <dd>
828- A selection from <a enum>AttributionLogic</a> indicating the
829- [=attribution logic=] to use.
830- </dd>
812+ <dt> <dfn>credit</dfn> </dt>
813+ <dd> A [=list=] of numbers.</dd>
831814 <dt> <dfn>value</dfn> </dt>
832815 <dd>
833816 The [=conversion value=] . If an attribution is made and [[#dp|privacy]]
@@ -1558,8 +1541,7 @@ The <dfn method for=Attribution>measureConversion(|options|)</dfn> method steps
15581541<dfn>Match Values</dfn> : A [=set=] of [=32-bit unsigned integers=] .
15591542<dfn>Impression Sites</dfn> : A [=set=] of [=sites=] .
15601543<dfn>Impression Callers</dfn> : A [=set=] of [=sites=] .
1561- <dfn>Logic</dfn> : An {{AttributionLogic}} .
1562- <dfn>Logic Options</dfn> : An {{AttributionLogicOptions}} .
1544+ <dfn>Credit</dfn> : A [=list=] of numbers.
15631545<dfn>Value</dfn> : A [=32-bit unsigned integer=] .
15641546<dfn>Max Value</dfn> : A [=32-bit unsigned integer=] .
15651547</pre>
@@ -1582,25 +1564,15 @@ To <dfn>validate {{AttributionConversionOptions}}</dfn> |options|:
15821564 or is greater than the <dfn ignore>maximum aggregation-service histogram size</dfn> ,
15831565 if any, for |options|.{{AttributionConversionOptions/aggregationService}} ,
15841566 throw a {{RangeError}} .
1585- 1. Let |credit| be «1».
1586- 1. Switch on the value of |options|.{{AttributionConversionOptions/logic}} :
1587- <dl class="switch">
1588- : <a enum-value for=AttributionLogic>"last-n-touch"</a>
1589- :: Perform the following steps:
1590- 1. If |options|.{{AttributionConversionOptions/value}} is 0,
1591- throw a {{RangeError}} .
1592- 1. If |options|.{{AttributionConversionOptions/value}}
1593- is greater than |options|.{{AttributionConversionOptions/maxValue}} ,
1594- throw a {{RangeError}} .
1595- 1. If |options|.{{AttributionConversionOptions/logicOptions}} .{{AttributionLogicOptions/credit}} [=map/exists=] :
1596- 1. Set |credit| to |options|.{{AttributionConversionOptions/logicOptions}} .{{AttributionLogicOptions/credit}} .
1597- 1. If |credit| is not a [=list=] or [=list/is empty=] , throw a {{RangeError}} .
1598- 1. If any of the [=list/items=] of |credit| are less than or equal to 0, throw a {{RangeError}} .
1599- 1. If the [=list/size=] of |credit| exceeds an [=implementation-defined=] maximum, throw a {{RangeError}} .
1600- </dl>
1601- 1. Let |validatedLogicOptions| be a {{AttributionLogicOptions}} with the following fields:
1602- : {{AttributionLogicOptions/credit}}
1603- :: |credit|
1567+ 1. If |options|.{{AttributionConversionOptions/value}} is 0,
1568+ throw a {{RangeError}} .
1569+ 1. If |options|.{{AttributionConversionOptions/value}}
1570+ is greater than |options|.{{AttributionConversionOptions/maxValue}} ,
1571+ throw a {{RangeError}} .
1572+ 1. Let |credit| be |options|.{{AttributionConversionOptions/credit}} if it [=map/exists=] , «1» otherwise.
1573+ 1. If |credit| [=list/is empty=] , throw a {{RangeError}} .
1574+ 1. If any of the [=list/items=] of |credit| are less than or equal to 0, throw a {{RangeError}} .
1575+ 1. If the [=list/size=] of |credit| exceeds an [=implementation-defined=] maximum, throw a {{RangeError}} .
160415761. Let |lookback| be |options|.{{AttributionConversionOptions/lookbackDays}} [=days=]
16051577 if it [=map/exists=] , the [=implementation-defined=] maximum otherwise.
160615781. Set |lookback| to the [=implementation-defined=] maximum
@@ -1640,10 +1612,8 @@ To <dfn>validate {{AttributionConversionOptions}}</dfn> |options|:
16401612 :: |impressionSites|
16411613 : [=validated conversion options/Impression Callers=]
16421614 :: |impressionCallers|
1643- : [=validated conversion options/Logic=]
1644- :: |options|.{{AttributionConversionOptions/logic}}
1645- : [=validated conversion options/Logic Options=]
1646- :: |validatedLogicOptions|
1615+ : [=validated conversion options/Credit=]
1616+ :: |credit|
16471617 : [=validated conversion options/Value=]
16481618 :: |options|.{{AttributionConversionOptions/value}}
16491619 : [=validated conversion options/Max Value=]
@@ -1654,14 +1624,7 @@ To <dfn>validate {{AttributionConversionOptions}}</dfn> |options|:
16541624
16551625### Attribution Logic ### {#s-logic}
16561626
1657- A site that measures conversions can specify <dfn>attribution logic</dfn> ,
1658- which determines how the [=conversion value=] is allocated to histogram buckets.
1659- The <a method for=Attribution>measureConversion()</a> function
1660- accepts a <a dict-member for=AttributionConversionOptions>logic</a> parameter
1661- that specifies the [=attribution logic=] .
1662-
1663- Each attribution logic specifies a process for allocating values to histogram buckets,
1664- after the [=common matching logic=] is applied and privacy budgeting occurs.
1627+ <dfn>Attribution logic</dfn> determines how the [=conversion value=] is allocated to histogram buckets.
16651628
16661629<div algorithm>
16671630To <dfn>do attribution and fill a histogram</dfn> , given
@@ -1710,19 +1673,10 @@ To <dfn>do attribution and fill a histogram</dfn>, given
17101673 [=create an all-zero histogram=] with
17111674 |options|' [=validated conversion options/histogram size=] .
17121675
1713- 1. Let |histogram| be null.
1714-
1715- 1. Switch on |options|' [=validated conversion options/logic=] :
1716- <dl class="switch">
1717- : <a enum-value for=AttributionLogic>"last-n-touch"</a>
1718- :: Set |histogram| to the result of [=fill a histogram with last-n-touch attribution=] with |matchedImpressions|,
1719- |options|' [=validated conversion options/histogram size=] ,
1720- |options|' [=validated conversion options/value=] , and
1721- |options|' [=validated conversion options/logic options=] .{{AttributionLogicOptions/credit}} .
1722-
1723- </dl>
1724-
1725- 1. [=Assert=] : |histogram| is not null.
1676+ 1. Set |histogram| to the result of [=fill a histogram with last-n-touch attribution=] with |matchedImpressions|,
1677+ |options|' [=validated conversion options/histogram size=] ,
1678+ |options|' [=validated conversion options/value=] , and
1679+ |options|' [=validated conversion options/credit=] .
17261680
172716811. If |singleEpoch| is true:
17281682 1. Let |l1Norm| be the sum of the [=list/items=] in |histogram|.
0 commit comments