Skip to content

Floxis Bid Adapter (backport kit): add first-party fallback id at user.ext.floxisId#2

Merged
floxis-admin merged 1 commit into
floxis-adapter-backportfrom
floxis-adapter-backport-first-party-id
Jul 2, 2026
Merged

Floxis Bid Adapter (backport kit): add first-party fallback id at user.ext.floxisId#2
floxis-admin merged 1 commit into
floxis-adapter-backportfrom
floxis-adapter-backport-first-party-id

Conversation

@floxis-admin

Copy link
Copy Markdown
Owner

Summary

Ports the first-party fallback id feature (9ee83ddae from floxis-adapter-first-party-id) into the backport kit for old-wrapper publishers running Prebid.js 8.52–10.29 (G4G and similar).

Same mechanism: the adapter mints a random v4 UUID in the publisher's page context (localStorage + cookie, scoped to the publisher's origin) and places it at user.ext.floxisId when no id is already present via ortb2 FPD. Degrades to a no-op when storage access is disallowed (consent, deviceAccess, or bidderSettings.floxis.storageAllowed not set).

Old-core API compatibility

getStorageManager({ bidderCode }) and generateUUID were verified against old-core sources (commit fbb71ad1c, circa Prebid 7.x) — both APIs are identical across 8.52.2–10.29.1. No adaptation was needed; the {moduleType:'bidder', moduleName} verbose form is NOT required.

Build + test (Prebid 8.52.2, node 20)

git clone --depth 1 --branch 8.52.2 https://github.com/prebid/Prebid.js.git /tmp/prebid-8.52.2
./install.sh /tmp/prebid-8.52.2
cd /tmp/prebid-8.52.2 && PUPPETEER_SKIP_DOWNLOAD=true npm ci
node_modules/.bin/gulp build --modules=floxisBidAdapter
# grep bundle BEFORE tests wipe build/dist:
grep -c "flx_uid\|floxisId\|getStorageManager" build/dist/floxisBidAdapter.js  # → 1 (minified, all in one line)
node_modules/.bin/gulp test --nolint --file test/spec/modules/floxisBidAdapter_spec.js

Karma results (second run — definitive per kit docs):

  • 106 tests completed, 0 failed (prior baseline: 98; +8 = the new first-party-id suite)

Changes

  • floxis-backport-kit/modules/floxisBidAdapter.jsgetStorageManager, getOrCreateFloxisId, and mergeDeep(req,{user:{ext:{floxisId}}}) in the ortbConverter request hook
  • floxis-backport-kit/modules/floxisBidAdapter.md — First-Party Fallback Id section (mirrors main adapter)
  • floxis-backport-kit/test/spec/modules/floxisBidAdapter_spec.js — 8 new cases (identical to main spec): mint/reuse/localStorage-fallback/malformed-regenerate/no-storage/throw-guard/FPD-coexist/no-overwrite
  • floxis-backport-kit/INTEGRATION.md — new Section 5: "Enable first-party fallback id" documenting the storageAllowed: true opt-in, storage scope, and backend priority

🤖 Generated with Claude Code

…r.ext.floxisId

Ports 9ee83dd from floxis-adapter-first-party-id to the backport kit for Prebid 8.52-10.29. Same logic: getStorageManager + generateUUID from old-core paths; getOrCreateFloxisId with localStorage-first / cookie fallback; mergeDeep into user.ext.floxisId if not already set by FPD. getStorageManager({bidderCode}) API is identical on 8.52.2-10.29.1 cores (verified). Tested on Prebid 8.52.2 + node 20: 106 tests passed (second karma run), 0 failed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@floxis-admin floxis-admin marked this pull request as ready for review July 2, 2026 06:06
@floxis-admin floxis-admin merged commit 790c282 into floxis-adapter-backport Jul 2, 2026
94 of 98 checks passed
@floxis-admin floxis-admin deleted the floxis-adapter-backport-first-party-id branch July 2, 2026 06:06
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