Compliance & consent

Control non-essential data scopes without blocking response collection.

Last reviewed

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

If you omit defaultConsent, the widget uses granted for its consent scopes. That customer-configured default is not evidence that a visitor has consented. When you use a cookie banner or consent manager, start the widget with defaultConsent: "pending" until it has a decision, then send that decision with configure(). Pending, denied, and revoked states restrict non-essential processing. An explicit scope list grants only its listed scopes, so [] grants none.

People can still submit feedback while analytics consent is pending or denied. Their answers remain available in survey results. Connecting feedback to a respondent profile or enriching that profile requires analytics.measurement to be allowed by the configured consent state. Hosted survey pages and their embeds currently collect feedback without respondent analytics.

You can follow up on feedback using contact details supplied with that response while analytics consent is pending or denied. Conversations and replies do not create an analytics profile or grant analytics permission. A response without a supported contact or reply channel can be collected, but cannot receive an external reply. An email supplied only to receive a submission receipt is not used for conversation follow-up.

SDK setup and runtime updates

Set defaultConsent before the SDK starts if it needs to wait for a consent decision. After your cookie banner or consent manager has a decision, call configure() with the new consent value; that update takes effect over the initial default.

JavaScript SDK

TypeScriptconsent.ts
import { createClient } from "@getuserfeedback/sdk";const client = createClient({apiKey: "YOUR_API_KEY",defaultConsent: "pending",});await 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"],}).catch((error) => console.error("Unable to update consent", error))}>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:await client.configure({consent: ["analytics.measurement", "analytics.storage"],});// User denies everything:await client.configure({ consent: "denied" });// User grants all:await 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.