Skip to content

Comments

Neuwo Rtd Module: Version v2.0.0 and Quality of Life Improvements#14323

Open
gregneuwo wants to merge 25 commits intoprebid:masterfrom
neuwoai:neuwo/quality-of-life-improvements
Open

Neuwo Rtd Module: Version v2.0.0 and Quality of Life Improvements#14323
gregneuwo wants to merge 25 commits intoprebid:masterfrom
neuwoai:neuwo/quality-of-life-improvements

Conversation

@gregneuwo
Copy link
Contributor

@gregneuwo gregneuwo commented Jan 9, 2026

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

Quality of Life Improvements

  • Add documentation for accessing Neuwo data via Prebid.js events
  • Implement concurrent bid request handling with pending promise sharing
  • Standardise log message format across module
  • Add _neuwo_prod=PrebidModule product identifier to API requests
  • Add tests for concurrent requests and product identifier
  • Add IAB taxonomy filtering documentation with configuration examples
  • Standardise code style

v2.0.0 – New API architecture

  • Migrate Neuwo RTD Module to a new API architecture
  • Maintain backward compatibility with legacy V1 endpoints
  • Introduce buildIabFilterConfig() and shared filtering logic
  • Refactor data processing and category injection to work across all tiers
  • Add unit tests for new API and legacy paths
  • Update documentation to reflect new API behaviour and configuration
  • Introduce Module versioning

v2.1.0 – OpenRTB 2.5 category fields

  • Add OpenRTB 2.5 category fields support (site.cat, site.sectioncat, site.pagecat, site.content.cat)
  • Extend integration example page to display OpenRTB 2.5 category fields
  • Update documentation with OpenRTB 2.5 examples and production build notes
  • Bump module version to 2.1.0

Other information

grzgm added 13 commits December 17, 2025 12:45
- Convert single quotes to double quotes for consistency
- Format code with Prettier
- Add `// prettier-ignore` comment to preserve quoted keys in `IAB_CONTENT_TAXONOMY_MAP`
- Apply Prettier formatting to *modules/neuwoRtdProvider.js*
Add optional filtering configuration for IAB Content and Audience taxonomies, allowing publishers to control the quantity and quality of categories injected into bid requests.

- Add `iabTaxonomyFilters` parameter to module configuration for per-tier filtering
- Implement `filterIabTaxonomyTier()` function to filter taxonomies by relevance threshold and limit count
- Implement `filterIabTaxonomies()` function to apply filters across all tiers using tier key mapping
- Add integration example checkbox to enable/disable filtering with hardcoded filter values
- Add test for API URL construction when `neuwoApiUrl` contains existing query parameters
- Add tests for error response handling: 404 errors, pending request cleanup, and retry behaviour
- Add tests for concurrent requests with errors ensuring all callbacks are invoked
- Add tests for JSON parsing errors in success callback
- Add test for retry after JSON parsing error
- Add test for missing `marketing_categories` field in API response
- Add test for sorting items with undefined/null relevance values
- Reorganise test structure: nest caching, URL stripping, and filtering describes under main `getBidRequestData` block
- Add documentation for generating test coverage reports with viewing instructions
Copy link

@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: 9dbdc600e0

ℹ️ 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".

Comment on lines +156 to +160
} else if (enableCache && pendingRequest) {
// Another caller started a request - wait for it instead of making a duplicate
logInfo(
MODULE_NAME,
"getBidRequestData():",

Choose a reason for hiding this comment

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

P2 Badge Key pending requests by URL before reusing

When enableCache is true, any concurrent call will attach to the single pendingRequest without checking whether it targets the same neuwoApiUrlFull (which depends on websiteToAnalyseUrl and stripping options). If those params differ between overlapping auctions or a config update mid-flight, the later request will reuse the first response and inject categories for the wrong URL. This can skew targeting data; consider keying pendingRequest by the request URL or comparing params before sharing.

Useful? React with 👍 / 👎.

grzgm added 9 commits January 12, 2026 12:17
- Update `buildIabData()` to only include `id` in segment objects
- Remove `label` requirement; segments now only need valid `ID`
- Update documentation examples to reflect simplified segment structure
- Update unit tests to match new segment format
…aintain backward compatibility

- Add version 2.0.0 with multi-version IAB Content Taxonomy support
- Implement automatic API capability detection from endpoint URL format
- Maintain backward compatibility with legacy GET endpoints
- Consolidate default IAB Content Taxonomy version to "2.2" constant
- Transform legacy API responses to unified segtax-based format
- Add `buildIabFilterConfig()` for filter configuration conversion
- Add `transformV1ResponseToV2()` and `transformSegmentsV1ToV2()` helpers
- Refactor `buildIabData()` to dynamically process all tiers
- Update `injectIabCategories()` to work with unified response format
- Enhance JSDoc documentation with format examples and API details
- Add conditional logging for POST request bodies
- Optimise filtering: apply once before caching for legacy endpoints
- Update all test mocks to use new segtax-based response format
- Add tests for `buildIabFilterConfig()` function
- Add tests for `injectIabCategories()` function
- Add tests for `transformV1ResponseToV2()` function
- Add tests for `transformSegmentsV1ToV2()` function
- Update `buildIabData()` tests to use new tierData parameter structure
- Add V1 API backward compatibility test suite with client-side filtering tests
- Verify POST method and iabVersions query parameters for new API
- Verify GET method and no iabVersions parameter for legacy V1 API
- Update edge case tests for empty responses and error handling
- Update integration tests for URL parameter handling with query strings
- Remove hardcoded tier array constants (CONTENT_TIERS, AUDIENCE_TIERS)
- Change default IAB Content Taxonomy version from "3.0" to "2.2"
- Add IAB Content Taxonomy version "1.0" to supported values list
- Add server-side filtering explanation to IAB Taxonomy Filtering section
- Update Available Tiers table to focus on taxonomy types instead of API internals
- Add recommended configuration comments for `auctionDelay` and `waitForIt`
- Update all configuration examples to use "2.2" as default taxonomy version
- Remove "How it works" section
Add support for populating OpenRTB 2.5 category fields (`site.cat`, `site.sectioncat`, `site.pagecat`, `site.content.cat`) with IAB Content Taxonomy 1.0 segments.

Changes:
- Add `enableOrtb25Fields` configuration parameter (default: true)
- Add `extractCategoryIds()` helper function to extract segment IDs from tier data
- Refactor `buildIabData()` to use `extractCategoryIds()` for code reuse
- Extend `buildIabFilterConfig()` to apply filters to IAB 1.0 when feature enabled
- Modify `getBidRequestData()` to request IAB 1.0 data (segtax 1) when feature enabled
- Add warning when feature enabled with legacy API endpoint
- Extend `injectIabCategories()` to populate four OpenRTB 2.5 category fields
- Update version to 2.1.0
Changes:
- Add checkbox UI control for `enableOrtb25Fields` option (default: checked)
- Add display section for OpenRTB 2.5 category fields data
- Extract and display `site.cat`, `site.sectioncat`, `site.pagecat`, and `site.content.cat` fields
- Update `bidRequested` event handler to capture category fields
- Add localStorage persistence for `enableOrtb25Fields` setting
- Pass `enableOrtb25Fields` parameter to module configuration
Changes:
- Add 11 new `buildIabFilterConfig()` tests for OpenRTB 2.5 feature (enabled/disabled scenarios)
- Add 11 new `extractCategoryIds()` tests covering all edge cases
- Add 11 new `injectIabCategories()` tests for category field injection
- Update 5 existing `buildIabFilterConfig()` tests
- Add 6 new `getBidRequestData()` integration tests for V2 API with feature enabled/disabled
- Move legacy API compatibility tests from V2 section to V1 section
…RTD Module

Changes:
- Add OpenRTB 2.5 feature description to module overview
- Add `enableOrtb25Fields` parameter to parameters table
- Add dedicated "OpenRTB 2.5 Category Fields" section with examples
- Update ORTB2 data structure examples to show category fields
- Add filtering section explaining IAB 1.0 filter application
- Update "Accessing Neuwo Data" section with category field extraction example
- Add "Building for Production" section with build command
- Update segtax value in example (7 → 6)
- Update version to 2.1.0
@gregneuwo gregneuwo changed the title Neuwo Rtd Module: Quality of life improvements and feautres Neuwo Rtd Module: Version v2.0.0 and Quality of Life Improvements Jan 23, 2026
grzgm and others added 3 commits January 23, 2026 14:29
…ry params

Replace POST request with GET and send IAB taxonomy filters as flattened URL query parameters instead of JSON body to avoid CORS preflight requests.

Changes:
- Replace `buildIabFilterConfig()` with `buildFilterQueryParams()` function
- Change output from nested object to array of query parameter strings (e.g., `["filter_6_1_limit=3"]`)
- Remove POST method and request body from ajax call
- Add filter parameters directly to URL for /v1/iab endpoint
- Maintain OpenRTB 2.5 filter application (ContentTier1/2 → segtax 1)
- Update all unit tests to test `buildFilterQueryParams()` instead of `buildIabFilterConfig()`
- Update tests expecting POST requests to expect GET requests
- Update tests checking request body to check URL parameters
- Update version to 2.2.0
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 22197432082

Details

  • 1379 of 1384 (99.64%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.02%) to 96.281%

Changes Missing Coverage Covered Lines Changed/Added Lines %
test/spec/modules/neuwoRtdProvider_spec.js 1196 1201 99.58%
Files with Coverage Reduction New Missed Lines %
modules/kinessoIdSystem.js 1 83.15%
test/spec/creative/crossDomainCreative_spec.js 1 93.75%
Totals Coverage Status
Change from base Build 22149413522: 0.02%
Covered Lines: 213531
Relevant Lines: 221780

💛 - Coveralls

@gregneuwo
Copy link
Contributor Author

All checks are passing. The assigned reviewer @lksharma appears to be inactive. Could this be reassigned to another reviewer?
@patmmccann

@patmmccann
Copy link
Collaborator

@codex review

Copy link

@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: c2882bb299

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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