v134 ยท javascript
Allow reading interest groups in Shared Storage Worklet
An interestGroups() method is added to the shared storage worklet, to return the Protected Audience interest groups associated with the shared storage origin's owner, with some additional metadata.
concepts
-
IGs in Worklet
Shared Storage worklets can read Protected Audience interest groups. Lets aggregation jobs incorporate audience signals.
-
Reach measurement
The motivating use case: filter audiences by
timeSinceLastUpdateMs+ campaign tag, then contribute a single aggregate to the reporting endpoint. -
Audience Segment Builder
Build a worklet that filters mock IGs by owner / name / lookback, contributes per-segment counts. Live histogram + worklet code update.
-
Cross-campaign Deduplication
A worklet that reads interestGroups() can deduplicate reach across campaigns โ avoiding double-counting users who saw multiple campaigns. Simulate a worklet run across a mock user population.
-
Dedup on vs off
Flip a toggle and watch the per-campaign reach histogram change. With dedup OFF (pre-v134 baseline), a user in three campaigns is counted three times; with dedup ON the v134 worklet reads
interestGroups()and counts each user once. Shows the overcount factor and the worklet code for both modes. -
Reach Before vs After v134
Before v134, reach measurement required per-campaign
sharedStorage.append()calls that over-count users in multiple campaigns. After v134, a single worklet readsinterestGroups()to emit an exact deduplicated count. Side-by-side simulation with a reshuffling user population shows the overcount factor grow with campaign overlap. -
Window vs fenced frame context
In a normal publisher page,
interestGroups()returns all IGs owned by the origin. Inside a fenced frame loaded for a winning ad, the same call returns only the one IG that won the auction. Side-by-side mock comparison shows the structural difference in what the worklet sees.
why it shipped
An interestGroups() method is added to the shared storage worklet, to return the Protected Audience interest groups associated with the shared storage origin's owner, with some additional metadata.