Insticator Bid Adapter: Add support for 2.6rtb request/response#14373
Insticator Bid Adapter: Add support for 2.6rtb request/response#14373patmmccann merged 8 commits intoprebid:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for OpenRTB 2.6 request/response fields and video ad-pod handling to the Insticator Bid Adapter. The changes enable the adapter to handle advanced video advertising use cases including ad pods with sequential ads.
Changes:
- Added support for ORTB 2.6 ad-pod video parameters (podid, podseq, poddur, slotinpod, mincpmpersec, maxseq, rqddurs)
- Enhanced response handling to map ORTB 2.6 fields (category, seat/dsp, creative attributes, deal ID, billing/notice URLs, video duration)
- Added publisherId query parameter support for endpoint URLs
- Updated TTL logic to use MAX of bid.exp and configured BID_TTL
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| modules/insticatorBidAdapter.js | Added ORTB 2.6 video ad-pod parameter validation, request mapping for ad-pod fields, response mapping for new ORTB 2.6 fields, and publisherId query parameter handling |
| test/spec/modules/insticatorBidAdapter_spec.js | Added comprehensive test coverage for publisherId query parameters, ad-pod video parameters, ORTB 2.6 response field mapping, and edge cases for empty responses |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const publisherId = deepAccess(validBidRequests[0], 'params.publisherId'); | ||
| if (publisherId) { | ||
| const urlObj = new URL(endpointUrl); | ||
| urlObj.searchParams.set('publisherId', publisherId); | ||
| endpointUrl = urlObj.toString(); | ||
| } |
There was a problem hiding this comment.
The publisherId check on line 724 does not filter out empty strings. When publisherId is an empty string, it will still be added as a query parameter. Based on the test on line 838-848, empty strings should not be included in the URL.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e09f726566
ℹ️ 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".
modules/insticatorBidAdapter.js
Outdated
| // TTL: Use MAX of bid.exp and BID_TTL to ensure minimum 5 minutes | ||
| const configTTL = config.getConfig('insticator.bidTTL') || BID_TTL; | ||
| const bidExp = bid.exp || 0; | ||
| const ttl = Math.max(bidExp, configTTL); |
There was a problem hiding this comment.
Honor bid.exp as an upper TTL bound
When the exchange includes bid.exp, OpenRTB treats it as the maximum time (seconds after the auction) that the bid is valid. Using Math.max(bid.exp, configTTL) can extend TTL beyond what the bidder allowed (e.g., exp=60 becomes ttl=300), which risks serving expired creatives and violating bidder contracts. This is introduced by the new MAX logic; consider using Math.min or otherwise treating bid.exp as an upper bound so shorter expirations are respected.
Useful? React with 👍 / 👎.
modules/insticatorBidAdapter.js
Outdated
| const durationRangeSec = deepAccess(bidRequest, 'mediaTypes.video.durationRangeSec'); | ||
| if (durationRangeSec && isArrayOfNums(durationRangeSec) && durationRangeSec.length > 0) { | ||
| optionalParams['rqddurs'] = durationRangeSec; |
There was a problem hiding this comment.
Validate durationRangeSec values before mapping
durationRangeSec is mapped directly to rqddurs with only isArrayOfNums checks, which allows zero or negative values through. That bypasses the adapter’s own validation rule for rqddurs (positive-only in OPTIONAL_VIDEO_PARAMS) and can send invalid ORTB 2.6 requests when publishers misconfigure ranges (e.g., [0, -15]). Consider reusing the rqddurs validator or filtering out non-positive entries before assignment.
Useful? React with 👍 / 👎.
Pull Request Test Coverage Report for Build 21300423597Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
…Prebid.js into update-insticator-for-2.6rtb
|
Hey @ncolletti, just checking in. Have you had a chance to review this PR? Thanks! |
modules/insticatorBidAdapter.js
Outdated
| 'pos': (value) => isInteger(value) && [0, 1, 2, 3, 4, 5, 6, 7].includes(value), | ||
| 'api': (value) => isArrayOfNums(value)}; | ||
| 'api': (value) => isArrayOfNums(value), | ||
| // Ad Pod specific parameters (ORTB 2.6) |
There was a problem hiding this comment.
you're not supporting the adpod mediatype above, however we're getting rid of it in 11
There was a problem hiding this comment.
@patmmccann thanks for checking. Okay I see
Is there any document I can refer to check, and see what fields are being removed from bidrequest/response related to ad pod? Or in general too.
Thank you
There was a problem hiding this comment.
do you have customers using the adpod media type? we're just deleting it altogether in #14451
There was a problem hiding this comment.
Thanks for the sharing the PR.
If I understand correct, we need to remove the adpod mediatype mappings. I've removed the Prebid adpod field mappings (adPodDurationSec → poddur, durationRangeSec → rqddurs) from the adapter. The remaining params (poddur, rqddurs, podid, etc.) are kept as standard ORTB 2.6 video fields that can be passed directly.
Please let me know, if I missed anything.
@patmmccann
Type of change
Bugfix
Feature
New bidder adapter
Updated bidder adapter
Code style update (formatting, local variables)
Refactoring (no functional changes, no api changes)
Build related changes
CI related changes
Does this change affect user-facing APIs or examples documented on http://prebid.org?
Other
Description of change
Other information