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

  1. IGs in Worklet

    Shared Storage worklets can read Protected Audience interest groups. Lets aggregation jobs incorporate audience signals.

  2. Reach measurement

    The motivating use case: filter audiences by timeSinceLastUpdateMs + campaign tag, then contribute a single aggregate to the reporting endpoint.

  3. Audience Segment Builder

    Build a worklet that filters mock IGs by owner / name / lookback, contributes per-segment counts. Live histogram + worklet code update.

  4. 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.

  5. 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.

  6. 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 reads interestGroups() to emit an exact deduplicated count. Side-by-side simulation with a reshuffling user population shows the overcount factor grow with campaign overlap.

  7. 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.

references