Skip to content

Commit 2aa3fcf

Browse files
gregneuwogrzgm
andauthored
docs: Update Neuwo RTD module documentation with url cleaning information (#6319)
* 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 * Neuwo RTD Module docs: add caching documentation --------- Co-authored-by: grzgm <[email protected]>
1 parent 8e4be5e commit 2aa3fcf

File tree

1 file changed

+74
-23
lines changed

1 file changed

+74
-23
lines changed

dev-docs/modules/neuwoRtdProvider.md

Lines changed: 74 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
layout: page_v2
33
title: Neuwo RTD Module
4-
display_name: Neuwo RTD Module
4+
display_name: Neuwo RTD Module
55
description: Enrich bids with contextual data from the Neuwo API.
66
page_type: module
77
module_type: rtd
8-
module_code : neuwoRtdProvider
9-
enable_download : true
10-
sidebarType : 1
8+
module_code: neuwoRtdProvider
9+
enable_download: true
10+
sidebarType: 1
1111
---
1212

1313
# Neuwo RTD Module
@@ -71,38 +71,89 @@ ortb2: {
7171
}
7272
```
7373

74-
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/).
74+
To get started, you can generate your API token at [https://neuwo.ai/generatetoken/](https://neuwo.ai/generatetoken/), send us an email to [[email protected]](mailto:[email protected]) or [contact us here](https://neuwo.ai/contact-us/).
7575

7676
## Configuration
7777

78-
> **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/).
78+
> **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 [[email protected]](mailto:[email protected]) or [contact us here](https://neuwo.ai/contact-us/).
7979
8080
This module is configured as part of the `realTimeData.dataProviders` object.
8181

8282
```javascript
8383
pbjs.setConfig({
84-
realTimeData: {
85-
dataProviders: [{
86-
name: 'NeuwoRTDModule',
87-
params: {
88-
neuwoApiUrl: '<Your Neuwo Edge API Endpoint URL>',
89-
neuwoApiToken: '<Your Neuwo API Token>',
90-
iabContentTaxonomyVersion: '3.0',
91-
}
92-
}]
93-
}
84+
realTimeData: {
85+
auctionDelay: 500, // Value can be adjusted based on the needs
86+
dataProviders: [
87+
{
88+
name: "NeuwoRTDModule",
89+
waitForIt: true,
90+
params: {
91+
neuwoApiUrl: "<Your Neuwo Edge API Endpoint URL>",
92+
neuwoApiToken: "<Your Neuwo API Token>",
93+
iabContentTaxonomyVersion: "3.0",
94+
enableCache: true, // Default: true. Caches API responses to avoid redundant requests
95+
},
96+
},
97+
],
98+
},
9499
});
95100
```
96101

97102
**Parameters**
98103

99-
| Name | Type | Required | Default | Description |
100-
| :--------------------------------- | :----- | :------- | :------ | :------------------------------------------------------------------------------------------------ |
101-
| `name` | String | Yes | | The name of the module, which is `NeuwoRTDModule`. |
102-
| `params` | Object | Yes | | Container for module-specific parameters. |
103-
| `params.neuwoApiUrl` | String | Yes | | The endpoint URL for the Neuwo Edge API. |
104-
| `params.neuwoApiToken` | String | Yes | | Your unique API token provided by Neuwo. |
105-
| `params.iabContentTaxonomyVersion` | String | No | `'3.0'` | Specifies the version of the IAB Content Taxonomy to be used. Supported values: `'2.2'`, `'3.0'`. |
104+
| Name | Type | Required | Default | Description |
105+
| :---------------------------------- | :------- | :------- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
106+
| `name` | String | Yes | | The name of the module, which is `NeuwoRTDModule`. |
107+
| `params` | Object | Yes | | Container for module-specific parameters. |
108+
| `params.neuwoApiUrl` | String | Yes | | The endpoint URL for the Neuwo Edge API. |
109+
| `params.neuwoApiToken` | String | Yes | | Your unique API token provided by Neuwo. |
110+
| `params.iabContentTaxonomyVersion` | String | No | `'3.0'` | Specifies the version of the IAB Content Taxonomy to be used. Supported values: `'2.2'`, `'3.0'`. |
111+
| `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. |
112+
| `params.stripAllQueryParams` | Boolean | No | `false` | If `true`, strips all query parameters from the URL before analysis. Takes precedence over other stripping options. |
113+
| `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. |
114+
| `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`. |
115+
| `params.stripFragments` | Boolean | No | `false` | If `true`, strips URL fragments (hash, e.g., `#section`) from the URL before analysis. |
116+
117+
### API Response Caching
118+
119+
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.
120+
121+
### URL Cleaning Options
122+
123+
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.
124+
125+
**Example with URL cleaning:**
126+
127+
```javascript
128+
pbjs.setConfig({
129+
realTimeData: {
130+
auctionDelay: 500, // Value can be adjusted based on the needs
131+
dataProviders: [
132+
{
133+
name: "NeuwoRTDModule",
134+
waitForIt: true,
135+
params: {
136+
neuwoApiUrl: "<Your Neuwo Edge API Endpoint URL>",
137+
neuwoApiToken: "<Your Neuwo API Token>",
138+
iabContentTaxonomyVersion: "3.0",
139+
140+
// Option 1: Strip all query parameters from the URL
141+
stripAllQueryParams: true,
142+
143+
// Option 2: Strip all query parameters only for specific domains
144+
// stripQueryParamsForDomains: ['example.com', 'another-domain.com'],
145+
146+
// Option 3: Strip specific query parameters by name
147+
// stripQueryParams: ['utm_source', 'utm_campaign', 'fbclid'],
148+
149+
// Optional: Strip URL fragments (hash)
150+
stripFragments: true,
151+
},
152+
},
153+
],
154+
},
155+
});
156+
```
106157

107158
## Installation
108159

0 commit comments

Comments
 (0)