Rovenue SDKBeta
FunnelsWeb

Pixel Consent

The consent policy, the three categories (analytics, ads, experiments), the consent sheet, rv_consent links, the host bridge and Google Consent Mode v2 regional defaults for web funnel pixels.

A web funnel keeps one consent record for ad pixels and web funnel A/B tests. Grants only add: nothing in the funnel revokes a category once granted (packages/shared/src/pixels/consent.ts:1-13).

You decide the legal basis (ePrivacy, GDPR, KVKK). Not required does not make a pixel lawful where your visitors need to opt in; it only stops the funnel from asking.

The policy

Set it per project under Apps → Ad pixels or the project settings (projects.funnel_tracking_consent, consent.ts:143-149):

  • Not required — pixels load after the first screen without asking. Google tags still follow Consent Mode defaults.
  • Required — the funnel shows a consent sheet before any pixel loads, and each vendor fires only when its category is granted.

Categories

CategoryGates
analyticsGA4
adsMeta, TikTok, Pinterest, X, Google Ads, Snapchat and Google Tag Manager
experimentsthe web A/B test visitor id (see the experiments guide)

GTM is gated by ads because a container can carry anything (consent.ts:25-31, :60-70). The ad cookies the runner reads after a vendor loads follow the same split: _ga needs analytics, the others ads.

All three channels end in the same record (apps/dashboard/src/runner/consent.ts:12-19):

  1. The consent sheet. Shown only under Required, only when the funnel has a pixel, only while no answer is recorded, and never when the funnel is embedded. Accept all grants every category, experiments included; Only necessary grants nothing and records that the visitor answered, persisted for this browser in localStorage, so a later tab does not ask again (a tab-only copy only when the browser refuses localStorage; consent.ts:100-126).
  2. A link parameter, ?rv_consent=. A comma list of category names grants those categories (?rv_consent=ads,analytics); unknown names are ignored. A bare 1 keeps its A/B-test meaning: experiments only (packages/shared/src/pixels/consent.ts:95-111).
  3. The host bridge. A page that embeds the funnel in an iframe, or an app that hosts it in a WebView, posts a message to the funnel window. Only a literal true grants a category, and messages from any window other than the parent are ignored (apps/dashboard/src/runner/host-bridge.ts:83-107):
host → funnel
{ "type": "rovenue:consent", "ads": true, "analytics": true }

The record is stored as rovenue.funnel-consent in sessionStorage until the first grant and in localStorage after it. Every grant is also posted to the session, so the server knows what the visitor allowed when it decides whether a server send may happen. If that post fails the server decides consent is missing, which fails closed (apps/dashboard/src/runner/consent.ts:26-36).

A grant loads the vendor for later events only. Events that happened before it are not replayed (apps/dashboard/src/runner/pixels/pixel-runtime.ts:29-30).

Embedded funnels

An embedded funnel never shows the sheet and never loads a pixel until the host grants ads; after that, the normal category rule applies (apps/dashboard/src/runner/consent.ts:38-43). The runner treats a session as embedded when it runs in an iframe, when the URL carries ?rv_embedded=1, when an app-bridge global (React Native WebView, Flutter InAppWebView) exists, or when the user agent is an app WebView. The ad platforms' own in-app browsers (Facebook, Instagram, TikTok, …) are not embedded: pixels are meant to work there (apps/dashboard/src/runner/pixels/embedded.ts:5-41).

An app that opens a funnel in its own WebView should append ?rv_embedded=1 and post rovenue:consent only after the user allowed tracking (App Tracking Transparency on iOS). A WebView that rewrites its user agent and uses none of these signals cannot be told from a browser.

When a Google vendor (GA4, Google Ads or GTM) is configured, the runner issues gtag('consent', 'default', …) before any Google config, for ad_storage, ad_user_data, ad_personalization and analytics_storage (packages/shared/src/pixels/consent.ts:188-215):

PolicyVisitor regionDefault
Requiredanydenied
Not requiredEEA, UK or Switzerlanddenied
Not requiredunknown countrydenied
Not requiredelsewheregranted

It follows with an update for whatever the record already grants, and with another update on each later grant. The restricted list is the EU-27, Iceland, Liechtenstein, Norway, the UK and Switzerland, 32 countries (consent.ts:151-171). An unknown country (no trusted country header, a blank or non-ISO value) is treated as restricted (consent.ts:181-186).

The region comes from the trusted country resolver only, never from the browser (apps/api/src/services/funnel/tracking-snapshot.ts:178-201). A self-hosted deployment without a country source therefore defaults every Google tag to denied; see the country lookup.

  • Under Required, the visitor's encrypted IP and user agent are stored only on the first ads grant (apps/api/src/services/funnel/ad-context.ts:12-15).
  • A purchase's server owner is funnel only when the session's consent allows the vendor's category (or the policy is Not required). Without it, the purchase keeps the revenue path.
  • A session whose visitor never granted ads sends no user data to any ad vendor: every server event of it — a funnel conversion, or the revenue path's purchase, renewal or refund — is skipped as no_ads_consent before a body is built, so not even the hashed external id or the subscriber's email leaves (apps/api/src/services/integrations/providers/pixel-conversion.ts, funnelSessionSkip).

On this page