Skip to main content
Wendung.getConsent() returns the state passed to init() or the latest setConsent() call. It does not read browser storage or your consent manager; it reports what the SDK is doing right now. Returns granted before init() is called, which is the default state.

Parameters

None.

Returns

'pending' | 'granted' | 'denied'

Examples

A settings toggle

Flushing queued events

No consent guard is needed. With trackPageviews: 'auto', flush() can send aggregate pageviews while pending. With no active collection, it does nothing.