Skip to content
This repository was archived by the owner on Aug 3, 2025. It is now read-only.

Support 'wait-for-update' when applying default consent  #653

@jesspanni

Description

@jesspanni

It's currently possible to specify a default consent which is useful in circumstances when users are required to explicitly opt-in before sending user data to GA.

<GoogleAnalytics defaultConsent='denied' />

When a user has previously given consent it's important to allow for consent preferences to be applied before tags are fired, otherwise the default consent will be used . Google gtag consent API provides a wait-for-update argument that allows time for cookie consent libraries and platforms to apply previous consent preferences before tags are fired via a call to consent.

It is not currently possible to take advantage of this feature and as a result is likely to result in initial page load analytics from not being collected.

Allowing users to specify a value via GoogleAnalyticsProps seems like a logical option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions