From 163ac2bb09dcf14f74b8400c5b9c8a37f0f35895 Mon Sep 17 00:00:00 2001 From: grzgm <125459798+grzgm@users.noreply.github.com> Date: Mon, 3 Nov 2025 14:09:02 +0100 Subject: [PATCH 1/2] docs: update documentation for url cleaning Update module documentation to include: - URL cleaning configuration options and examples - Parameter table with stripAllQueryParams, stripQueryParamsForDomains, stripQueryParams, stripFragments - Update contact information --- dev-docs/modules/neuwoRtdProvider.md | 91 +++++++++++++++++++++------- 1 file changed, 68 insertions(+), 23 deletions(-) diff --git a/dev-docs/modules/neuwoRtdProvider.md b/dev-docs/modules/neuwoRtdProvider.md index 3120f6b520..78a7a570c1 100644 --- a/dev-docs/modules/neuwoRtdProvider.md +++ b/dev-docs/modules/neuwoRtdProvider.md @@ -1,13 +1,13 @@ --- layout: page_v2 title: Neuwo RTD Module -display_name: Neuwo RTD Module +display_name: Neuwo RTD Module description: Enrich bids with contextual data from the Neuwo API. page_type: module module_type: rtd -module_code : neuwoRtdProvider -enable_download : true -sidebarType : 1 +module_code: neuwoRtdProvider +enable_download: true +sidebarType: 1 --- # Neuwo RTD Module @@ -71,38 +71,83 @@ ortb2: { } ``` -To get started, you can generate your API token at [https://neuwo.ai/generatetoken/](https://neuwo.ai/generatetoken/) or [contact us here](https://neuwo.ai/contact-us/). +To get started, you can generate your API token at [https://neuwo.ai/generatetoken/](https://neuwo.ai/generatetoken/), send us an email to [neuwo-helpdesk@neuwo.ai](mailto:neuwo-helpdesk@neuwo.ai) or [contact us here](https://neuwo.ai/contact-us/). ## Configuration -> **Important:** You must add the domain (origin) where Prebid.js is running to the list of allowed origins in Neuwo Edge API configuration. If you have problems, [contact us here](https://neuwo.ai/contact-us/). +> **Important:** You must add the domain (origin) where Prebid.js is running to the list of allowed origins in Neuwo Edge API configuration. If you have problems, send us an email to [neuwo-helpdesk@neuwo.ai](mailto:neuwo-helpdesk@neuwo.ai) or [contact us here](https://neuwo.ai/contact-us/). This module is configured as part of the `realTimeData.dataProviders` object. ```javascript pbjs.setConfig({ - realTimeData: { - dataProviders: [{ - name: 'NeuwoRTDModule', - params: { - neuwoApiUrl: '', - neuwoApiToken: '', - iabContentTaxonomyVersion: '3.0', - } - }] - } + realTimeData: { + auctionDelay: 500, // Value can be adjusted based on the needs + dataProviders: [ + { + name: "NeuwoRTDModule", + waitForIt: true, + params: { + neuwoApiUrl: "", + neuwoApiToken: "", + iabContentTaxonomyVersion: "3.0", + }, + }, + ], + }, }); ``` **Parameters** -| Name | Type | Required | Default | Description | -| :--------------------------------- | :----- | :------- | :------ | :------------------------------------------------------------------------------------------------ | -| `name` | String | Yes | | The name of the module, which is `NeuwoRTDModule`. | -| `params` | Object | Yes | | Container for module-specific parameters. | -| `params.neuwoApiUrl` | String | Yes | | The endpoint URL for the Neuwo Edge API. | -| `params.neuwoApiToken` | String | Yes | | Your unique API token provided by Neuwo. | -| `params.iabContentTaxonomyVersion` | String | No | `'3.0'` | Specifies the version of the IAB Content Taxonomy to be used. Supported values: `'2.2'`, `'3.0'`. | +| Name | Type | Required | Default | Description | +| :---------------------------------- | :------- | :------- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | String | Yes | | The name of the module, which is `NeuwoRTDModule`. | +| `params` | Object | Yes | | Container for module-specific parameters. | +| `params.neuwoApiUrl` | String | Yes | | The endpoint URL for the Neuwo Edge API. | +| `params.neuwoApiToken` | String | Yes | | Your unique API token provided by Neuwo. | +| `params.iabContentTaxonomyVersion` | String | No | `'3.0'` | Specifies the version of the IAB Content Taxonomy to be used. Supported values: `'2.2'`, `'3.0'`. | +| `params.stripAllQueryParams` | Boolean | No | `false` | If `true`, strips all query parameters from the URL before analysis. Takes precedence over other stripping options. | +| `params.stripQueryParamsForDomains` | String[] | No | `[]` | List of domains for which to strip **all** query parameters. When a domain matches, all query params are removed for that domain and all its subdomains (e.g., `'example.com'` strips params for both `'example.com'` and `'sub.example.com'`). This option takes precedence over `stripQueryParams` for matching domains. | +| `params.stripQueryParams` | String[] | No | `[]` | List of specific query parameter names to strip from the URL (e.g., `['utm_source', 'fbclid']`). Other parameters are preserved. Only applies when the domain does not match `stripQueryParamsForDomains`. | +| `params.stripFragments` | Boolean | No | `false` | If `true`, strips URL fragments (hash, e.g., `#section`) from the URL before analysis. | + +### URL Cleaning Options + +The module provides optional URL cleaning capabilities to strip query parameters and/or fragments from the analyzed URL before sending it to the Neuwo API. This can be useful for privacy, caching, or analytics purposes. + +**Example with URL cleaning:** + +```javascript +pbjs.setConfig({ + realTimeData: { + auctionDelay: 500, // Value can be adjusted based on the needs + dataProviders: [ + { + name: "NeuwoRTDModule", + waitForIt: true, + params: { + neuwoApiUrl: "", + neuwoApiToken: "", + iabContentTaxonomyVersion: "3.0", + + // Option 1: Strip all query parameters from the URL + stripAllQueryParams: true, + + // Option 2: Strip all query parameters only for specific domains + // stripQueryParamsForDomains: ['example.com', 'another-domain.com'], + + // Option 3: Strip specific query parameters by name + // stripQueryParams: ['utm_source', 'utm_campaign', 'fbclid'], + + // Optional: Strip URL fragments (hash) + stripFragments: true, + }, + }, + ], + }, +}); +``` ## Installation From 87123e7bb1f8014069b3c79f95e0d17726c65872 Mon Sep 17 00:00:00 2001 From: grzgm <125459798+grzgm@users.noreply.github.com> Date: Wed, 12 Nov 2025 10:45:19 +0100 Subject: [PATCH 2/2] Neuwo RTD Module docs: add caching documentation --- dev-docs/modules/neuwoRtdProvider.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dev-docs/modules/neuwoRtdProvider.md b/dev-docs/modules/neuwoRtdProvider.md index 78a7a570c1..1148c09e20 100644 --- a/dev-docs/modules/neuwoRtdProvider.md +++ b/dev-docs/modules/neuwoRtdProvider.md @@ -91,6 +91,7 @@ pbjs.setConfig({ neuwoApiUrl: "", neuwoApiToken: "", iabContentTaxonomyVersion: "3.0", + enableCache: true, // Default: true. Caches API responses to avoid redundant requests }, }, ], @@ -107,14 +108,19 @@ pbjs.setConfig({ | `params.neuwoApiUrl` | String | Yes | | The endpoint URL for the Neuwo Edge API. | | `params.neuwoApiToken` | String | Yes | | Your unique API token provided by Neuwo. | | `params.iabContentTaxonomyVersion` | String | No | `'3.0'` | Specifies the version of the IAB Content Taxonomy to be used. Supported values: `'2.2'`, `'3.0'`. | +| `params.enableCache` | Boolean | No | `true` | If `true`, caches API responses to avoid redundant requests for the same page during the session. Set to `false` to disable caching and make a fresh API call on every bid request. | | `params.stripAllQueryParams` | Boolean | No | `false` | If `true`, strips all query parameters from the URL before analysis. Takes precedence over other stripping options. | | `params.stripQueryParamsForDomains` | String[] | No | `[]` | List of domains for which to strip **all** query parameters. When a domain matches, all query params are removed for that domain and all its subdomains (e.g., `'example.com'` strips params for both `'example.com'` and `'sub.example.com'`). This option takes precedence over `stripQueryParams` for matching domains. | | `params.stripQueryParams` | String[] | No | `[]` | List of specific query parameter names to strip from the URL (e.g., `['utm_source', 'fbclid']`). Other parameters are preserved. Only applies when the domain does not match `stripQueryParamsForDomains`. | | `params.stripFragments` | Boolean | No | `false` | If `true`, strips URL fragments (hash, e.g., `#section`) from the URL before analysis. | +### API Response Caching + +By default, the module caches API responses during the page session to optimise performance and reduce redundant API calls. This behaviour can be disabled by setting `enableCache: false` if needed for dynamic content scenarios. + ### URL Cleaning Options -The module provides optional URL cleaning capabilities to strip query parameters and/or fragments from the analyzed URL before sending it to the Neuwo API. This can be useful for privacy, caching, or analytics purposes. +The module provides optional URL cleaning capabilities to strip query parameters and/or fragments from the analysed URL before sending it to the Neuwo API. This can be useful for privacy, caching, or analytics purposes. **Example with URL cleaning:**