Skip to content

feat(addons): add abTestAssignment addon#306

Open
jrosendahl-opt wants to merge 2 commits into
masterfrom
abTestAssignment
Open

feat(addons): add abTestAssignment addon#306
jrosendahl-opt wants to merge 2 commits into
masterfrom
abTestAssignment

Conversation

@jrosendahl-opt

@jrosendahl-opt jrosendahl-opt commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Moved all of the client side A/B test management to a single add-on.

##Changes

  • Adds lib/edge/abTest.ts with determineABTest extracted from targeting.ts — keeps the core assignment logic in the edge layer where targeting can use it without depending on addons
  • Adds lib/addons/abTestAssignment.ts with setupAB: manages client-side A/B variant assignment with localStorage stickiness, sessionStorage override, and Prebid bid stamping via applyToAuctionEvent / setHooks
  • Removes determineABTest and the unused ABTestConfig re-export from targeting.ts
  • Moves determineABTest tests from targeting.test.js into abTestAssignment.test.ts
  • Adds lib/addons/abTestAssignment.md with usage docs

jrosendahl-opt and others added 2 commits July 17, 2026 15:01
…ineABTest to edge/abTest

- Add lib/edge/abTest.ts with determineABTest (moved from targeting.ts)
- Add lib/addons/abTestAssignment.ts with setupAB: handles variant assignment,
  localStorage stickiness, sessionStorage override, and prebid bid stamping
  via applyToAuctionEvent/setHooks
- Remove determineABTest and ABTestConfig re-export from targeting.ts
- Move determineABTest tests from targeting.test.js to abTestAssignment.test.ts
- Add usage README at lib/addons/abTestAssignment.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant