Skip to content

Commit

Permalink
Merge pull request #9 from firecatapult/qxd-4991-update-opt-in-flag
Browse files Browse the repository at this point in the history
updates config param to be opt in
  • Loading branch information
rrochwick authored Sep 26, 2024
2 parents 9ff3e38 + 223fd3d commit 93d36c3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions modules/qortexRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function init (config) {
return false;
} else {
initializeModuleData(config);
if (!config?.params?.disableBidEnrichment) {
if (config?.params?.enableBidEnrichment) {
logMessage('Requesting Qortex group configuration')
getGroupConfig()
.then(groupConfig => {
Expand Down Expand Up @@ -324,10 +324,10 @@ export function initializeBidEnrichment() {
* @param {Object} config module config obtained during init
*/
export function initializeModuleData(config) {
const {apiUrl, groupId, bidders, disableBidEnrichment} = config.params;
const {apiUrl, groupId, bidders, enableBidEnrichment} = config.params;
const qortexUrlBase = apiUrl || DEFAULT_API_URL;
const windowUrl = window.top.location.host;
qortexSessionInfo.bidEnrichmentDisabled = disableBidEnrichment !== null ? disableBidEnrichment : false;
qortexSessionInfo.bidEnrichmentDisabled = enableBidEnrichment !== null ? !enableBidEnrichment : true;
qortexSessionInfo.bidderArray = bidders;
qortexSessionInfo.impressionIds = new Set();
qortexSessionInfo.currentSiteContext = null;
Expand Down
8 changes: 4 additions & 4 deletions modules/qortexRtdProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Maintainer: mannese@qortex.ai

The Qortex RTD module appends contextual segments to the bidding object based on the content of a page using the Qortex API.

If the `Qortex Group Id` provided during configuration is active and enabled for bid enrichment, the Qortex context API will analyze the bidder page (video, text, image, etc.) and will return a [Content object](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf#page=26). The module will then merge that object into the appropriate bidders' `ortb2.site.content`, which can be used by prebid adapters that use `site.content` data.
If the `Qortex Group Id` and module parameters provided during configuration is active and enabled for bid enrichment, the Qortex context API will analyze the bidder page and will return a [Content object](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf#page=26). The module will then merge that object into the appropriate bidders' `ortb2.site.content`, which can be used by prebid adapters that use `site.content` data.


## Build
Expand Down Expand Up @@ -40,7 +40,7 @@ pbjs.setConfig({
params: {
groupId: 'ABC123', //required
bidders: ['qortex', 'adapter2'], //optional (see below)
disableBidEnrichment: false, //optional (see below)
enableBidEnrichment: true, //optional (see below)
tagConfig: { // optional, please reach out to your account manager for configuration reccommendation
videoContainer: 'string',
htmlContainer: 'string',
Expand Down Expand Up @@ -69,5 +69,5 @@ pbjs.setConfig({

- If this parameter is not present, the Qortex integration can still be configured and loaded manually on your page outside of prebid. The RTD module will continue to initialize and operate as normal.

#### `disableBidEnrichment` - optional
- This optional parameter allows a publisher to opt out of the RTD module from using our API to enrich bids with first party data for contextuality
#### `enableBidEnrichment` - optional
- This optional parameter allows a publisher to opt-in to the features of the RTD module that use our API to enrich bids with first party data for contextuality. Enabling this feature will allow this module to collect and send the contextual components of the page (meta, video, header, and paragraph tags) to our AI contextuality server for indexing and analysis. Please use caution when adding this module to pages that may contain personal user data or proprietary information.
7 changes: 3 additions & 4 deletions test/spec/modules/qortexRtdProvider_spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as utils from 'src/utils.js';
import * as ajax from 'src/ajax.js';
import * as events from 'src/events.js';
import { EVENTS } from '../../../src/constants.js';
import {loadExternalScript} from 'src/adloader.js';
Expand Down Expand Up @@ -37,15 +36,15 @@ describe('qortexRtdProvider', () => {
params: {
groupId: defaultGroupId,
apiUrl: defaultApiHost,
bidders: validBidderArray
bidders: validBidderArray,
enableBidEnrichment: true
}
}
const bidEnrichmentDisabledModuleConfig = {
params: {
groupId: defaultGroupId,
apiUrl: defaultApiHost,
bidders: validBidderArray,
disableBidEnrichment: true
bidders: validBidderArray
}
}
const emptyModuleConfig = {
Expand Down

0 comments on commit 93d36c3

Please sign in to comment.