Skip to content

Conversation

@ncolletti
Copy link
Contributor

This pull request introduces support for overriding the "group" parameter in both the IntentIQ Analytics Adapter and IntentIQ ID System modules. The changes ensure that if a "group" value is provided in the configuration, it takes precedence over values stored in local storage or returned by the server, and is properly reflected in analytics payloads and GAM targeting.

Copilot AI review requested due to automatic review settings December 10, 2025 00:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request introduces support for allowing publishers to override the "group" parameter in both the IntentIQ Analytics Adapter and IntentIQ ID System modules. When a "group" value is provided in the configuration, it takes precedence over values stored in local storage or returned by the server, ensuring consistent group assignment across analytics payloads and GAM targeting.

Key changes:

  • Added manual group override functionality that prevents server responses from changing the configured group value
  • Implemented config fallback logic to support group configuration via both userSync.userIds and enableAnalytics options
  • Added comprehensive test coverage for group override behavior and config fallback scenarios

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
modules/intentIqIdSystem.js Implements group override logic to preserve manually configured group values and prevent server responses from overwriting them
modules/intentIqAnalyticsAdapter.js Adds group parameter support in analytics initialization and implements config fallback mechanism
test/spec/modules/intentIqIdSystem_spec.js Adds comprehensive tests for group override functionality including server response handling and GAM targeting
test/spec/modules/intentIqAnalyticsAdapter_spec.js Adds tests for group override, payload inclusion, and config fallback behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ncolletti
Copy link
Contributor Author

@DimaIntentIQ could you review?

@DimaIntentIQ
Copy link
Contributor

@DimaIntentIQ could you review?

Hi @ncolletti,
I reviewed your code, and it appears that changes from our server team will also be necessary. As things currently work, the implementation won’t function correctly, not due to your code, but because of how our server processes the data.
There is an alternative approach that could work, and I believe Dror will reach out to you shortly with more details.

localStorage.setItem(FIRST_PARTY_KEY, '{"pcid":"testpcid", "group": "B"}');
localStorage.setItem(FIRST_PARTY_KEY + '_' + partner, '{"data":"testdata"}');

events.emit(EVENTS.BID_WON, wonRequest);
Copy link
Collaborator

Choose a reason for hiding this comment

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

these tests are failing with wonRequest is undefined

@patmmccann patmmccann marked this pull request as draft December 17, 2025 18:26
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.

3 participants