Skip to content

Feature/remap group ids - #1402

Open
BishopCodes wants to merge 3 commits into
segmentio:masterfrom
BishopCodes:feature/Remap-Group-Ids
Open

BishopCodes wants to merge 3 commits into
segmentio:masterfrom
BishopCodes:feature/Remap-Group-Ids

Conversation

@BishopCodes

Copy link
Copy Markdown

This change introduces the capabilities to remap the one trust group ids in the case a given setup does not conform to what Segment expects. The example case is that the ids are 1,2,3,4,5 which map to necessary, performance, functional, targeting, and other. Since this wrapper initializes higher up in the call stack using middleware or plugins on the analytics side does not work correctly. Additionally, the Segment UI does not support the consent key to start with a number.

I have added two unit tests one being in the mock wrapper and the other on the getNormalizedCategories function directly, in which all pass.

This will be ideal to have available to avoid having to make a custom wrapper for this given situation.

  • I've included a changeset (psst. run yarn changeset. Read about changesets here).

@changeset-bot

changeset-bot Bot commented Sep 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 85ed136

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@segment/analytics-consent-wrapper-onetrust Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
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.

1 participant