Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/load/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ runs:
wdir="$(pwd)"
parent="$(dirname "$wdir")"
target="$(basename "$wdir")"
export MSYS=winsymlinks:lnk
tar ${{ steps.platform.outputs.result == 'win32' && '--force-local' || '' }} -C "$parent" -xf '${{ runner.temp }}/${{ inputs.name }}.tar' "$target"
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:
sessions: ${{ inputs.browserstack-sessions }}

- name: Run tests
uses: nick-fields/retry@v3
uses: nick-fields/retry@v4
with:
timeout_minutes: ${{ inputs.timeout }}
max_attempts: 3
Expand Down
6 changes: 0 additions & 6 deletions metadata/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@
"moduleName": "validationFpdModule",
"disclosureURL": "local://prebid/sharedId-optout.json"
},
{
"componentType": "prebid",
"componentName": "categoryTranslation",
"moduleName": "categoryTranslation",
"disclosureURL": "local://prebid/categoryTranslation.json"
},
{
"componentType": "prebid",
"componentName": "userId",
Expand Down
2 changes: 0 additions & 2 deletions modules/adxcgAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ function mapBidResponse (bidResponse, eventType) {
bidderCode: bidResponse.bidder,
transactionId: bidResponse.transactionId,
adUnitCode: bidResponse.adUnitCode,
statusMessage: bidResponse.statusMessage,
mediaType: bidResponse.mediaType,
renderedSize: bidResponse.size,
cpm: bidResponse.cpm,
Expand All @@ -97,7 +96,6 @@ function mapBidWon (bidResponse) {
return [{
bidderCode: bidResponse.bidder,
adUnitCode: bidResponse.adUnitCode,
statusMessage: bidResponse.statusMessage,
mediaType: bidResponse.mediaType,
renderedSize: bidResponse.size,
cpm: bidResponse.cpm,
Expand Down
2 changes: 1 addition & 1 deletion modules/consentManagementTcf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export type TCFConsentData = {
/**
* The response from the CMP.
*/
vendorData: Record<string, unknown>;
vendorData: Record<string, string>;
/**
* Additional consent string, if provided by the CMP.
* @see https://support.google.com/admanager/answer/9681920?hl=en
Expand Down
3 changes: 2 additions & 1 deletion modules/drawbridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { config } from '../src/config.js';
import { startAuction, addApiMethod, type StartAuctionOptions } from '../src/prebid.js';
import { getGlobal } from '../src/prebidGlobal.js';
import { PbPromise, delay } from '../src/utils/promise.js';
import { deepClone, deepSetValue, isArray, isNumber, isPlainObject, logError, logWarn, logInfo } from '../src/utils.js';
import { deepClone, deepSetValue, isArray, isPlainObject, logError, logWarn, logInfo } from '../src/utils.js';
import { isNumber } from '../src/utils/objects.js';
import { ACTIVITY_ENRICH_EIDS } from '../src/activities/activities.js';
import { isActivityAllowed } from '../src/activities/rules.js';
import { activityParams } from '../src/activities/activityParams.js';
Expand Down
9 changes: 0 additions & 9 deletions modules/magniteAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -830,15 +830,6 @@ magniteAdapter.track = ({ eventType, args }) => {
auctionData.floors = addFloorData(floorData);
}

// Identify chrome cookieless trafic
if (!cookieless) {
const cdep = deepAccess(args, 'bidderRequests.0.ortb2.device.ext.cdep');
if (cdep && (cdep.indexOf('treatment') !== -1 || cdep.indexOf('control_2') !== -1)) {
cookieless = 1;
auctionData.cdep = 1;
}
}

// GDPR info
const gdprData = deepAccess(args, 'bidderRequests.0.gdprConsent');
if (gdprData) {
Expand Down
1 change: 0 additions & 1 deletion modules/mobkoiAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ function pickKeyFields(objType, eventArgs) {
'requestTimestamp',
'responseTimestamp',
'seatBidId',
'statusMessage',
'timeToRespond',
'rejectionReason',
'ortbId',
Expand Down
4 changes: 2 additions & 2 deletions modules/nobidAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function cleanupObjectAttributes (obj, attributes) {
}
function sendBidWonEvent (event, eventType) {
const data = deepClone(event);
cleanupObjectAttributes(data, ['bidderCode', 'size', 'statusMessage', 'adId', 'requestId', 'mediaType', 'adUnitCode', 'cpm', 'currency', 'originalCpm', 'originalCurrency', 'timeToRespond']);
cleanupObjectAttributes(data, ['bidderCode', 'size', 'adId', 'requestId', 'mediaType', 'adUnitCode', 'cpm', 'currency', 'originalCpm', 'originalCurrency', 'timeToRespond']);
if (nobidAnalytics.topLocation) data.topLocation = nobidAnalytics.topLocation;
sendEvent(data, eventType);
}
Expand All @@ -94,7 +94,7 @@ function sendAuctionEndEvent (event, eventType) {

cleanupObjectAttributes(data, ['timestamp', 'timeout', 'auctionId', 'bidderRequests', 'bidsReceived']);
if (data) cleanupObjectAttributes(data.bidderRequests, ['bidderCode', 'bidderRequestId', 'bids', 'refererInfo']);
if (data) cleanupObjectAttributes(data.bidsReceived, ['bidderCode', 'width', 'height', 'adUnitCode', 'statusMessage', 'requestId', 'mediaType', 'cpm', 'currency', 'originalCpm', 'originalCurrency']);
if (data) cleanupObjectAttributes(data.bidsReceived, ['bidderCode', 'width', 'height', 'adUnitCode', 'requestId', 'mediaType', 'cpm', 'currency', 'originalCpm', 'originalCurrency']);
if (data) cleanupObjectAttributes(data.noBids, ['bidder', 'sizes', 'bidId']);
if (data.bidderRequests) {
data.bidderRequests.forEach(bidderRequest => {
Expand Down
1 change: 0 additions & 1 deletion modules/ooloAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ function mapBid({
delete bidObj['bidderWinsCount']
delete bidObj['schain']
delete bidObj['refererInfo']
delete bidObj['statusMessage']
delete bidObj['status']
delete bidObj['adUrl']
delete bidObj['ad']
Expand Down
50 changes: 21 additions & 29 deletions modules/overtoneRtdProvider.js
Original file line number Diff line number Diff line change
@@ -1,53 +1,46 @@
import { submodule } from '../src/hook.js';
import { ajaxBuilder } from '../src/ajax.js';
import { safeJSONParse, logMessage as _logMessage } from '../src/utils.js';
import { mergeDeep, safeJSONParse, logMessage } from '../src/utils.js';

export const OVERTONE_URL = 'https://prebid-1.overtone.ai/contextual';
export const OVERTONE_URL = 'https://prebid-1.overtone.ai/VendorService';

// eslint-disable-next-line no-restricted-syntax
const logMessage = (...args) => {
_logMessage('Overtone', ...args);
};
function log(...args) {
logMessage('Overtone', ...args);
}

export async function fetchContextData(url = window.location.href) {
const pageUrl = encodeURIComponent(url);
const requestUrl = `${OVERTONE_URL}?URL=${pageUrl}&InApp=False`;
const requestUrl = `${OVERTONE_URL}?pageUrl=${pageUrl}`;
const request = window.ajaxBuilder || ajaxBuilder();

return new Promise((resolve, reject) => {
logMessage('Sending request to:', requestUrl);
log('Sending request to:', requestUrl);
request(requestUrl, {
success: (response) => {
const data = safeJSONParse(response);
logMessage('Fetched data:', data);
log('Fetched data:', data);

if (!data || typeof data.status !== 'number') {
if (!data || !data.vendor) {
reject(new Error('Invalid response format'));
return;
}

switch (data.status) {
case 1: // Success
resolve({ categories: data.categories || [] });
break;
case 3: // Fail
case 4: // Ignore
resolve({ categories: [] });
break;
default:
reject(new Error(`Unexpected response status: ${data.status}`));
}
const segments = (data.sources && data.sources[0] && data.sources[0].segments)
? data.sources[0].segments.map(s => s.id)
: [];

resolve({ categories: segments });
},
error: (err) => {
logMessage('Error during request:', err);
log('Error during request:', err);
reject(err);
},
});
});
}

function init(config) {
logMessage('init', config);
log('init', config);
return true;
}

Expand All @@ -58,16 +51,15 @@ export const overtoneRtdProvider = {
fetchContextData()
.then((contextData) => {
if (contextData) {
if (!bidReqConfig.ortb2Fragments.global.site.ext) {
bidReqConfig.ortb2Fragments.global.site.ext = {};
}

bidReqConfig.ortb2Fragments.global.site.ext.data = contextData;
log('Fetched context data', contextData);
mergeDeep(bidReqConfig.ortb2Fragments.global, {
site: { ext: { data: { overtone: contextData } } }
});
}
callback();
})
.catch((error) => {
logMessage('Error fetching context data', error);
log('Error fetching context data', error);
callback();
});
},
Expand Down
4 changes: 0 additions & 4 deletions modules/pubwiseAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,6 @@ function filterBidResponse(data) {
if (typeof modified.ts !== 'undefined') {
modified.ts = '';
}
// clean up a property to make simpler
if (typeof modified.statusMessage !== 'undefined' && modified.statusMessage === 'Bid returned empty or error response') {
modified.statusMessage = 'eoe';
}
modified.auctionEnded = auctionEnded;
return modified;
}
Expand Down
4 changes: 0 additions & 4 deletions modules/pubxaiAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ const extractBid = (bidResponse) => {
responseTimestamp: bidResponse.responseTimestamp,
status: bidResponse.status,
sizes: parseSizesInput(bidResponse.size).toString(),
statusMessage: bidResponse.statusMessage,
timeToRespond: bidResponse.timeToRespond,
transactionId: bidResponse.transactionId,
bidId: bidResponse.bidId || bidResponse.requestId,
Expand Down Expand Up @@ -180,9 +179,6 @@ const track = ({ eventType, args }) => {
.map((i) => i?.bids.length && i.bids[0]?.floorData)
.find((i) => i) || {}
);
auctionCache[args.auctionId].deviceDetail.cdep = args.bidderRequests
.map((bidRequest) => bidRequest.ortb2?.device?.ext?.cdep)
.find((i) => i);
Object.assign(auctionCache[args.auctionId].auctionDetail, {
adUnitCodes: args.adUnits.map((i) => i.code),
timestamp: args.timestamp,
Expand Down
2 changes: 0 additions & 2 deletions modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@ export const spec = {
'l_pb_bid_id',
'p_screen_res',
'o_ae',
'o_cdep',
'rp_floor',
'rp_secure',
'tk_user_key'
Expand Down Expand Up @@ -502,7 +501,6 @@ export const spec = {
'x_source.tid': bidderRequest.ortb2?.source?.tid,
'x_imp.ext.tid': bidRequest.ortb2Imp?.ext?.tid,
'l_pb_bid_id': bidRequest.bidId,
'o_cdep': bidRequest.ortb2?.device?.ext?.cdep,
'ip': bidRequest.ortb2?.device?.ip,
'ipv6': bidRequest.ortb2?.device?.ipv6,
'p_screen_res': _getScreenResolution(),
Expand Down
8 changes: 8 additions & 0 deletions modules/startioIdSystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ The Start.io User ID submodule generates and persists a unique user identifier b

For integration support, contact prebid@start.io.

## Build

To build Prebid.js with the Start.io User ID submodule and bid adapter, include the following modules:

```bash
gulp build --modules=startioBidAdapter,userId,startioIdSystem,consentManagementTcf,consentManagementGpp,consentManagementUsp,...
```

### Prebid Params Enabling User Sync

To enable iframe-based user syncing for Start.io, include the `filterSettings` configuration in your `userSync` setup:
Expand Down
2 changes: 0 additions & 2 deletions modules/terceptAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ function mapBidResponse(bidResponse, status) {
width: bid.width,
height: bid.height,
mediaType: bid.mediaType,
statusMessage: bid.statusMessage,
status: bid.status,
renderStatus: getRenderStatus(),
timeToRespond: bid.timeToRespond,
Expand Down Expand Up @@ -185,7 +184,6 @@ function mapBidResponse(bidResponse, status) {
width: bidResponse.width,
height: bidResponse.height,
mediaType: bidResponse.mediaType,
statusMessage: bidResponse.statusMessage,
status: bidResponse.status,
renderStatus: 4,
timeToRespond: bidResponse.timeToRespond,
Expand Down
32 changes: 20 additions & 12 deletions modules/userId/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@ function mkPriorityMaps() {
const refreshing = new Set(addtlModules.map(mod => mod.submodule));
map.submodules = map.submodules.filter((mod) => !refreshing.has(mod.submodule)).concat(addtlModules);
update();
},
reset() {
map.submodules = [];
update();
}
}
function update() {
Expand Down Expand Up @@ -892,8 +896,24 @@ function updatePPID(priorityMaps) {
}
}

function hasOptedOut() {
if (coreStorage.getDataFromLocalStorage(PBJS_USER_ID_OPTOUT_NAME)) {
logInfo(`${MODULE_NAME} - opt-out localStorage found, userId disabled`);
return true;
}
if (coreStorage.getCookie(PBJS_USER_ID_OPTOUT_NAME)) {
logInfo(`${MODULE_NAME} - opt-out cookie found, userId disabled`);
return true;
}
return false;
}

function initSubmodules(priorityMaps, submodules, forceRefresh = false) {
return uidMetrics().fork().measureTime('userId.init.modules', function () {
if (hasOptedOut()) {
priorityMaps.reset();
return [];
}
if (!submodules.length) return []; // to simplify log messages from here on
submodules.forEach(submod => populateEnabledStorageTypes(submod));

Expand Down Expand Up @@ -987,25 +1007,13 @@ function canUseLocalStorage(submodule) {
if (!submodule.storageMgr.localStorageIsEnabled()) {
return false;
}

if (coreStorage.getDataFromLocalStorage(PBJS_USER_ID_OPTOUT_NAME)) {
logInfo(`${MODULE_NAME} - opt-out localStorage found, storage disabled`);
return false
}

return true;
}

function canUseCookies(submodule) {
if (!submodule.storageMgr.cookiesAreEnabled()) {
return false;
}

if (coreStorage.getCookie(PBJS_USER_ID_OPTOUT_NAME)) {
logInfo(`${MODULE_NAME} - opt-out cookie found, storage disabled`);
return false;
}

return true
}

Expand Down
Loading
Loading