Optional store: string | StoreReadonly confReturns the consent for a given campaign, if any available.
The campaign ID to get the consent for.
the CampaignConsent for the given campaign or null, if consent unknown.
Returns the consent for a given feature, if any available.
The feature to get the consent for.
the FeatureConsent for the given feature or null, if consent unknown.
Track an event.
The event category. Must not be empty. (e.g. Videos, Music, Games...)
The event action. Must not be empty. (e.g. Play, Pause, Duration, Add Playlist, Downloaded, Clicked...)
The campaign ID as per your configuration, where this measurement belongs to.
Optional name: stringThe event name. OPTIONAL.
Optional value: numberThe event value. OPTIONAL.
Track a scene visit.
A hierarchical path best describing the structure of your scenes. E.g. ['Main', 'Settings', 'Some Setting'].
The campaign ID as per your configuration, where this measurement belongs to.
Persist accumulated data to the filesystem/local storage.
A website should call this in an onUnload event, a Node.JS app should call this when the
process exits for whatever reason. (See node-cleanup).
Optional completed: ((granted) => void)Optional completed: ((granted) => void)Checks the consent state of a campaign.
The campaign ID to check the consent state of.
the current state of consent.
Checks the consent state of a feature.
The feature to check the consent state of.
the current state of consent.
Sends an empty body to the server for easy debugging of server-related issues like TLS and CORS problems.
DON'T LEAVE THIS IN PRODUCTION, once you're done fixing any server issues. There's absolutely no point in pinging the server with this all the time, it will undermine your privacy promise to your users!
Optional done: ((error?) => void)Callback, when the operation is finished, either successfully or not.
Optional error: ErrorGenerated using TypeDoc
The Configuration provided as a
Configurationobject or as a plain dictionary.