Skip to content

Reading TCF consent from within a module #3587

@EskelCz

Description

@EskelCz

Regarding this segment: https://docs.prebid.org/dev-docs/integrate-with-the-prebid-analytics-api.html#reading-tcf2-enforcement-actions

The doc states that analytics adapter can listen for TCF events, but when I add an event listener for CONSTANTS.EVENTS.TCF2_ENFORCEMENT (had to look for it in the prebid codebase), it doesn't fire. I assume it should fire with every page load, but the docs are vague. I also tried getting all events before the module is loaded, still the event wasn't there either.

Can you please clarify when is the event fired and add a working example how to get the stated TCF consent information from within an analytics module?
Thank you.

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