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
@@ -783,11 +795,19 @@ The arguments to <a method for=Attribution>measureConversion()</a> are as follow
783
795
<dt><dfn>matchValue</dfn></dt>
784
796
<dd>A match value that can be used to select this [=impression=].</dd>
785
797
<dt><dfn>impressionSites</dfn></dt>
786
-
<dd>A [=set=] of impression sites. Only [=impressions=] recorded where the [=impression site=] is in this set are eligible to match this [=conversion=]. If empty, any site will match.</dd>
787
-
<dt><dfn>intermediarySites</dfn></dt>
788
798
<dd>
789
-
A [=set=] of sites which called the <a method for=Attribution>saveImpression()</a> API.
790
-
Only [=impressions=] recorded by scripts originating from one of the [=intermediary sites=]
799
+
A [=set=] of impression sites.
800
+
Only [=impressions=] recorded where the [=impression site=] is in this set
801
+
are eligible to match this [=conversion=].
802
+
If empty, any site will match.
803
+
</dd>
804
+
<dt><dfn>impressionCallers</dfn></dt>
805
+
<dd>
806
+
A [=set=] of sites,
807
+
both [=impression sites=] and [=intermediary sites=],
808
+
that might have called the <a method for=Attribution>saveImpression()</a> API.
809
+
If not empty,
810
+
only [=impressions=] recorded by one of the listed sites
791
811
are eligible to match this [=conversion=].
792
812
</dd>
793
813
<dt><dfn>logic</dfn></dt>
@@ -810,8 +830,81 @@ The arguments to <a method for=Attribution>measureConversion()</a> are as follow
810
830
</dd>
811
831
</dl>
812
832
833
+
834
+
## Role of Intermediaries ## {#intermediaries}
835
+
836
+
This API has support for its operation by [=intermediaries=]
837
+
on behalf of [=top-level origin|top-level=][[#sites|sites]].
838
+
Advertising is frequently delegated to independent operators
839
+
that are responsible for placement, bidding, and measurement.
840
+
841
+
[=Impressions=] that are saved by an intermediary
842
+
record the identity of the [=intermediary site=].
843
+
When [[#logic-matching|selecting]] impressions
844
+
for [[#measure-conversion-api-operation|conversion measurement]],
845
+
the [=intermediary site|intermediary site identity=] can be used to select impressions.
846
+
847
+
848
+
## Histogram Construction ## {#histogram-definition}
849
+
850
+
Conceptually, each saved [=impression=] has a single histogram definition.
851
+
Each [=impression=] has a single [=impression/Histogram Index=] attribute
852
+
that determines where the [=validated conversion options/Value|value=]
853
+
allocated to that [=impression=] appears in [[#histograms|the resulting histgram]].
854
+
855
+
Each invocation of {{PrivateAttribution/measureConversion()}}
856
+
therefore needs to select [=impressions=] that have the same histogram definition.
857
+
Though this applies to all uses of the API,
858
+
consistent definition of histograms is especially important when [=impressions=]
859
+
are [[#save-impression-api|saved]] and [[#measure-conversion-api|measured]]
860
+
by multiple [=intermediaries=].
861
+
862
+
All [=impressions=] that might be [=common matching logic|selected=]
863
+
when invoking {{PrivateAttribution/measureConversion()}}
864
+
need to use the same histogram definition.
865
+
The API provides several tools
866
+
for ensuring that only the right [=impressions=] are chosen.
867
+
868
+
For saved [=impressions=]:
869
+
870
+
* [=impression/Match Value|Match values=] can be used to separate [=impressions=]
871
+
by histogram definition.
872
+
873
+
* Use of an [=impression=] for [=conversion=] can be restricted
874
+
to be visible only to {{PrivateAttribution/measureConversion()}}
875
+
on a [=impression/Conversion Sites|set of conversion sites=].
876
+
877
+
* Use of an [=impression=] for [=conversion=] can be restricted
878
+
to be visible only to {{PrivateAttribution/measureConversion()}}
879
+
invoked by a [=impression/Conversion Callers|set of sites=].
880
+
881
+
As part of [=common matching logic=] at the point of [=conversion=]:
882
+
883
+
* [=validated conversion options/Match Values|a set of match values=],
884
+
limits the set of [=impressions=].
885
+
886
+
* A set of [=validated conversion options/Impression Sites=],
887
+
restricts the [=impression sites=] where [=impressions=] were saved.
888
+
889
+
* A set of [=validated conversion options/Impression Callers=],
890
+
restricts the set of [=conversion sites=] or [=intermediary sites=]
891
+
that saved [=impressions=].
892
+
893
+
These options provide sites with flexibility in how attribution selects histograms.
894
+
It does not preclude the use of different histograms by a [=conversion site=].
895
+
Multiple [=impressions=] can be saved
896
+
with different histogram definitions
897
+
provided that {{PrivateAttribution/measureConversion()}} invocations
898
+
never [=common matching logic|select=][=impressions=] with different histogram definitions.
899
+
This ensures that [=conversions=] can be [=attribution|attributed=] to multiple histograms
900
+
by invoking {{PrivateAttribution/measureConversion()}} multiple times.
is controlled by [[#permission-policy|Permission Policy]].
907
+
815
908
This specification defines two [=policy-controlled features=]:
816
909
817
910
* Invocation of the <a method for=Attribution>saveImpression()</a> API,
@@ -861,6 +954,9 @@ The [=impression store=] is a [=set=] of [=impression|impressions=]:
861
954
<dfn>Intermediary Site</dfn>: The [=intermediary site=] that called <a>saveImpression()</a>,
862
955
or `undefined` if the API was invoked by the [=impression site=].
863
956
<dfn>Conversion Sites</dfn>: The [=set=] of [=conversion sites=] that were passed to <a>saveImpression()</a>.
957
+
<dfn>Conversion Callers</dfn>: The [=set=] of sites,
958
+
either [=conversion sites=] or [=intermediary sites=],
959
+
that can select this [=impression=] when invoking <a>measureConversion()</a>.
864
960
<dfn>Timestamp</dfn>: The time at which <a>saveImpression()</a> was called.
865
961
<dfn>Lifetime</dfn>: The [=duration=] an [=/impression=] remains eligible for attribution, either from the call to <a>saveImpression()</a>, or a [=/user agent=]-defined limit.
866
962
<dfn>Histogram Index</dfn>: The histogram index passed to <a>saveImpression()</a>.
@@ -1255,6 +1351,11 @@ The <dfn method for=Attribution>saveImpression(|options|)</dfn> method steps are
1255
1351
for each value in |options|.{{AttributionImpressionOptions/conversionSites}}.
1256
1352
1. If any result in |conversionSites| is failure, return
1257
1353
[=a promise rejected with=] a {{"SyntaxError"}}{{DOMException}} in |realm|.
1354
+
1. Let |conversionCallers| be the [=set=] that is the result
1355
+
of invoking [=parse a site=]
1356
+
for each value in |options|.{{AttributionImpressionOptions/conversionCallers}}.
1357
+
1. If any result in |conversionCallers| is failure, return
1358
+
[=a promise rejected with=] a {{"SyntaxError"}}{{DOMException}} in |realm|.
1258
1359
1. Run the following steps [=in parallel=]:
1259
1360
1. Construct |impression| as a [=impression|saved impression=] comprising:
1260
1361
: [=impression/Match Value=]
@@ -1265,6 +1366,8 @@ The <dfn method for=Attribution>saveImpression(|options|)</dfn> method steps are
1265
1366
:: |intermediarySite|
1266
1367
: [=impression/Conversion Sites=]
1267
1368
:: |conversionSites|
1369
+
: [=impression/Conversion Callers=]
1370
+
:: |conversionCallers|
1268
1371
: [=impression/Timestamp=]
1269
1372
:: |timestamp|
1270
1373
: [=impression/Lifetime=]
@@ -1305,13 +1408,12 @@ The <dfn method for=Attribution>measureConversion(|options|)</dfn> method steps
1305
1408
1. Let |now| be |settings|' [=environment settings object/current wall time=].
1306
1409
1. Let |topLevelSite| (the [=conversion site=]) be the result of
1307
1410
[=obtain a site|obtaining a site=] from the [=top-level origin=].
1308
-
1. The [=intermediary site=] is set to
1411
+
1. Let |intermediarySite| be:
1309
1412
1. a value of `undefined` if the [=origin=] is [=same site=]
1310
1413
with the [=top-level origin=],
1311
1414
1. otherwise, the result of
1312
1415
[=obtain a site|obtaining a site=]
1313
1416
from |settings|' [=environment settings object/origin=].
1314
-
<!-- TODO: the intermediary site is currently unused -->
0 commit comments