Compliance & consent

Control non-essential data scopes without blocking response collection.

Last reviewed

Compliance & consent

Consent controls non-essential data scopes. The widget respects your consent settings and integrates with your existing cookie banner or CMP.

Two things always work regardless of consent state:

  • response collection
  • flows opened from code

This means you can keep the feedback channel working while tightening analytics or storage behavior for GDPR, CCPA, or other regulations.

ScopeWhat it controls
analytics.measurementEvent tracking for targeting rules based on page context, timing, and session signals.
analytics.storagePersisted activity data used for cohort targeting and identity continuity across sessions.
personalization.storageStored preferences for personalized flow experiences.
ads.storageStorage used for advertising-related signals.
ads.user_dataUser data shared with advertising surfaces.
ads.personalizationPersonalized advertising signals.

Essential scopes (functionality.storage, security.storage) are always granted and can't be denied — they're required for the widget to work.

Default behavior

By default, the widget starts with all scopes granted. If you need a stricter default for GDPR, ePrivacy, or another consent-first rollout, set defaultConsent to "pending".

SDK setup and runtime updates

Set defaultConsent when the SDK starts. After your cookie banner or consent manager has a decision, call configure() with the new consent value.

JavaScript SDK

TypeScriptconsent.ts
import { createClient } from "@getuserfeedback/sdk";const client = createClient({apiKey: "YOUR_API_KEY",defaultConsent: "pending",});client.configure({consent: ["analytics.measurement", "analytics.storage"],});

React SDK

TypeScriptconsent.tsx
import {GetUserFeedbackProvider,useGetUserFeedback,} from "@getuserfeedback/react";function ConsentControls() {const client = useGetUserFeedback();return (<buttontype="button"onClick={() =>void client.configure({consent: ["analytics.measurement", "analytics.storage"],})}>Allow analytics</button>);}export function App() {return (<GetUserFeedbackProviderclientOptions={{ apiKey: "YOUR_API_KEY", defaultConsent: "pending" }}><ConsentControls /></GetUserFeedbackProvider>);}

React Native SDK

React Native client commands return promises, so await or handle the rejection from configure():

TypeScriptconsent.tsx
import { Button } from "react-native";import {GetUserFeedbackProvider,useGetUserFeedback,} from "@getuserfeedback/react-native";function ConsentControls() {const client = useGetUserFeedback();return (<Buttontitle="Allow analytics"onPress={() =>void client.configure({consent: ["analytics.measurement", "analytics.storage"],}).catch((error) => console.error("Unable to update consent", error))}/>);}export function App() {return (<GetUserFeedbackProviderclientOptions={{ apiKey: "YOUR_API_KEY", defaultConsent: "pending" }}><ConsentControls /></GetUserFeedbackProvider>);}

With pending, non-essential scopes are treated as denied until you update them.

For EU traffic, this is usually the safest starting point: keep response collection available, then grant measurement or storage scopes only after your cookie banner or CMP has recorded the user's choice.

Sync with your cookie banner or CMP when the user makes a choice:

TypeScriptconsent-banner.ts
// User grants analytics:client.configure({consent: ["analytics.measurement", "analytics.storage"],});// User denies everything:client.configure({ consent: "denied" });// User grants all:client.configure({ consent: "granted" });

You can also set "revoked" to explicitly revoke previously granted consent.

Impact on targeting

  • Context targeting (page URL, device type, timing) requires analytics.measurement only.
  • Cohort targeting (past behavior, identity continuity, stored signals) requires both analytics.measurement and analytics.storage.
  • Response collection and flows opened from code are never affected.

Practical rollout

If your product already has a CMP or cookie banner, keep getuserfeedback.com in sync with that source of truth. Don't create a second consent state machine.

SDK installation

The get-started guides cover installation and initial provider or client setup:

Privacy requests

If a customer or respondent needs access, deletion, correction, portability, or help with another privacy right, see Privacy rights and requests.

If your privacy review is about where data is stored or processed, see Data residency.