Skip to content

Comments

Rtd/datamage contextual provider#14485

Open
leiforion wants to merge 4 commits intoprebid:masterfrom
Ops-Mage:rtd/datamage-contextual-provider
Open

Rtd/datamage contextual provider#14485
leiforion wants to merge 4 commits intoprebid:masterfrom
Ops-Mage:rtd/datamage-contextual-provider

Conversation

@leiforion
Copy link

Type of change

  • Other - New RTD provider

Description of change

@leiforion
Copy link
Author

Minor update to example files

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: 5ab88c8629

ℹ️ 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 +309 to +311
(adUnitArray || []).forEach((au) => {
const code = au && au.code;
if (!code) return;

Choose a reason for hiding this comment

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

P1 Badge Handle string ad unit codes in getTargetingData

The RTD core calls submodules with auction.adUnitCodes (an array of ad unit code strings), but this function assumes each entry is an object and reads au.code. With the real input shape, code is always undefined and the returned map stays empty, so DataMage keys never get attached through Prebid’s ad-unit targeting path.

Useful? React with 👍 / 👎.

Comment on lines +179 to +180
.then((resJson) => {
if (!resJson) return;

Choose a reason for hiding this comment

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

P2 Badge Reset cached targeting when the fetch yields no payload

On non-2xx (or other no-payload paths), the code returns without clearing lastTargeting, so a previous auction’s contextual values remain active and can be reused by getTargetingData in later auctions. This causes stale targeting to be sent when the endpoint is down or when page context changes but the latest request fails.

Useful? React with 👍 / 👎.

import { submodule } from '../src/hook.js';
import { logError, logWarn, generateUUID } from '../src/utils.js';

// eslint-disable-next-line no-console
Copy link
Collaborator

Choose a reason for hiding this comment

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

do not disable our linting

Copy link
Collaborator

@patmmccann patmmccann left a comment

Choose a reason for hiding this comment

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

fix the linting and see the bot feedback; other feedback might come later

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.

2 participants