Skip to content

Segment Consent Preference Updated event firing without changing consent choice #1308

@andyzuchettosonos

Description

@andyzuchettosonos

We use the Onetrust cookie banner on our website and we implemented the analytics-next consent-wrapper-onetrust following the documentation. It is working, however at times we receive the Segment Consent Preference Updated event even when the user does interact with cookie consent banner. We do not have the cookie banner showing our US website and yet we receive the event quite often.

It's difficult to reproduce in our lower environments because it is somewhat infrequent and seemingly happening randomly, but we are seeing there as well.

Here are the package versions we are using:

 "@segment/analytics-consent-wrapper-onetrust": "^1.1.2",
 "@segment/analytics-next": "^1.81.0",

and here is our implementation:

    const analytics = new AnalyticsBrowser()

    withOneTrust(analytics, { consentModel: () => 'opt-out' }).load({
      writeKey: SEGMENT_WRITE_KEY,
    })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions