Skip to content

Permutive RTD: support msft bidder custom cohorts#14655

Open
AntonioGargaro wants to merge 5 commits intoprebid:masterfrom
AntonioGargaro:agent/permutive-msft-bidder-support
Open

Permutive RTD: support msft bidder custom cohorts#14655
AntonioGargaro wants to merge 5 commits intoprebid:masterfrom
AntonioGargaro:agent/permutive-msft-bidder-support

Conversation

@AntonioGargaro
Copy link
Copy Markdown
Contributor

@AntonioGargaro AntonioGargaro commented Mar 30, 2026

Summary

  • Adds a configurable bidders param to the Permutive RTD module that allows per-bidder custom cohort storage sources
  • Enables the msft bidder (Microsoft/Xandr) to read custom cohorts from the same localStorage key (_papns) used by appnexus
  • Refactors updateOrtbConfig to receive resolved customCohortsData directly, centralizing segment resolution in setBidderRtb

Background

Publishers migrating from the appnexus bidder to msft (per Microsoft's instructions) lost custom cohort targeting (permutive= keywords) because segmentData.msft doesn't exist — custom cohorts from _papns are stored under segmentData.appnexus. Standard AC cohorts (p_standard=) continued to work. This change introduces a bidders config with a customCohortsFrom field that specifies the localStorage key to read from, defaulting msft to _papns.

Test plan

  • gulp lint passes
  • gulp test --nolint --file test/spec/modules/permutiveCombined_spec.js — all 47 tests pass
  • Verify msft bidder receives custom cohorts in ortb2.user.data and ortb2.user.keywords on a publisher page

🤖 Generated with Claude Code

@review-assignment-bot review-assignment-bot bot requested a review from gwhigs March 30, 2026 11:45
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 82bdf2ea4b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@AntonioGargaro AntonioGargaro force-pushed the agent/permutive-msft-bidder-support branch 2 times, most recently from 61e9fd4 to 2dd62c8 Compare March 30, 2026 11:52
…orage read

Add a `bidders` config to the Permutive RTD module that allows configuring
per-bidder custom cohort storage sources. This enables the msft bidder
(Microsoft/Xandr) to read custom cohorts from the same localStorage key
(`_papns`) used by appnexus, resolving an issue where publishers migrating
from appnexus to msft lost custom cohort targeting.

Refactors `updateOrtbConfig` to receive resolved `customCohortsData` directly
instead of performing the lookup internally, keeping segment resolution
centralized in `setBidderRtb`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AntonioGargaro AntonioGargaro force-pushed the agent/permutive-msft-bidder-support branch from 2dd62c8 to 399c45c Compare March 30, 2026 11:53
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Mar 30, 2026

Coverage Report for CI Build 24198265083

Coverage increased (+0.001%) to 96.344%

Details

  • Coverage increased (+0.001%) from the base build.
  • Patch coverage: 27 of 27 lines across 2 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 224971
Covered Lines: 216746
Line Coverage: 96.34%
Relevant Branches: 52486
Covered Branches: 42629
Branch Coverage: 81.22%
Branches in Coverage %: No
Coverage Strength: 71.13 hits per line

💛 - Coveralls

@AntonioGargaro
Copy link
Copy Markdown
Contributor Author

Hey @gwhigs @patmmccann, I wonder if I can bump this for a review 🙏 Appreciate you're both busy, so thank you

Copy link
Copy Markdown
Collaborator

@gwhigs gwhigs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to update docs as well:

Add msft to supported custom cohort bidders list, document the new
params.bidders configuration, and note the appnexus-to-msft migration path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AntonioGargaro
Copy link
Copy Markdown
Contributor Author

AntonioGargaro commented Apr 9, 2026

@patmmccann @gwhigs Docs PR created: prebid/prebid.github.io#6522

Also, if you get a chance, could you review this one too? prebid/prebid.github.io#6352

@AntonioGargaro AntonioGargaro requested a review from gwhigs April 9, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants