Skip to content

Commit

Permalink
[Spec] Add recency for generateBid(). (#711)
Browse files Browse the repository at this point in the history
  • Loading branch information
caraitto authored Jul 27, 2023
1 parent 893ea7e commit f57261b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ This is detectable because it can change the set of fields that are read from th
the currently stored one from the browser.
1. Set |interestGroup|'s [=interest group/joining origin=] to [=this=]'s
[=relevant settings object=]'s [=environment/top-level origin=].
1. Set |interestGroup|'s [=interest group/join time=] to the [=current wall time=].
1. If the most recent entry in |interestGroup|'s [=interest group/join counts=] corresponds to
the current day in UTC, increment its count. If not, [=list/insert=] a new [=tuple=]
the time set to the current UTC day and a count of 1.
Expand Down Expand Up @@ -1070,6 +1071,8 @@ an [=interest group=] |ig|, and a [=moment=] |auctionStartTime|:
with |ig|.
1. Set |browserSignals|["{{BiddingBrowserSignals/joinCount}}"] to the sum of |ig|'s
[=interest group/join counts=] for all days within the last 30 days.
1. Set |browserSignals|["{{BiddingBrowserSignals/recency}}"] to the [=current wall time=]
minus |ig|'s [=interest group/join time=], in milliseconds.
1. [=map/Set=] |browserSignals|["{{BiddingBrowserSignals/bidCount}}"] to the sum of |ig|'s
[=interest group/bid counts=] for all days within the last 30 days.
1. Let |prevWins| be a new <code>[=sequence=]<{{PreviousWin}}></code>.
Expand Down Expand Up @@ -2802,6 +2805,7 @@ dictionary BiddingBrowserSignals {
required USVString seller;
required long joinCount;
required long bidCount;
required long recency;

USVString topLevelSeller;
sequence<PreviousWin> prevWinsMs;
Expand Down Expand Up @@ -3010,6 +3014,9 @@ An interest group is a [=struct=] with the following [=struct/items=]:
is calculated based on UTC time. The join count is a count of the number of
times {{Navigator/joinAdInterestGroup()}} was called for this interest group on the
corresponding day.
: <dfn>join time</dfn>
:: A [=moment=] at which the browser joined this interest group, updated upon each join and
re-join.
: <dfn>bid counts</dfn>
:: A [=list=] containing [=tuples=] of the day and per day bid count. The day
is calculated based on UTC time. The bid count is a count of the number of
Expand Down

0 comments on commit f57261b

Please sign in to comment.