Hosting & Embedding
Where a published web funnel runs — its slug, your own domain, and what a page that embeds it can hear.
A web funnel is published to a URL. A native funnel has none — it is served to a placement inside the app instead.
The funnel's own URL
A published web funnel is served at its slug by the public runner route,
which answers without a dashboard session. A web funnel's slug is unique
only within its project (funnels_project_slug_unique), so the URL
names both:
https://<your-dashboard-domain>/f/<projectId>/<slug>(apps/dashboard/src/routes/f.$projectId.$slug.tsx). The public loader
(GET /public/projects/:projectId/funnels/:slug) resolves the funnel by
project and slug and answers only for target = 'web'
(apps/api/src/routes/public/funnels.ts — loadPublishedConfigFromDb,
findBySlug): a converted-away row keeps its history, but no web URL
reaches it anymore. Only a funnel whose status is published with a
current version is served; anything else gets one of the pages in
Offline and missing funnels.
Your own domain
Attach a custom domain to the project under Settings → Domains: add
the hostname, add the DNS records the page shows — a CNAME to the
deployment's edge host (CUSTOM_DOMAIN_EDGE_HOST) and a TXT record at
_rovenue.<hostname> with the verification token — then click Verify.
Verification checks the hostname and stamps it verified, while the
certificate stays pending until the issuer produces it
(apps/api/src/routes/dashboard/custom-domains.ts). A host resolves to a
funnel only once it is verified and its certificate is issued — an
unknown, unverified, or not-yet-issued host answers 404.
A verified domain serves every published web funnel of the project, one path per funnel:
https://<domain>/<slug>You can also pick one funnel as the domain's root funnel (same
Settings → Domains page); https://<domain>/ then serves it. Clearing the
root funnel, or archiving/deleting it, makes / 404 again — every other
/<slug> path is unaffected. On cloud, a project may verify at most one
custom domain; self-hosted has no limit. Because an apex domain (e.g.
acme.com) cannot be CNAMEd, point a subdomain at the edge host instead
(e.g. app.acme.com or get.acme.com). If you manage DNS through
Cloudflare, set the CNAME and TXT records to DNS only (grey cloud) —
proxying them breaks certificate issuance and hostname verification.
Self-hosting: outbound DNS for verification
Verification asks each domain's own authoritative nameservers first,
so a wrong or not-yet-created record is caught without seeding a negative
answer in public resolver caches. That needs the API container to reach
arbitrary addresses on port 53, over both UDP and TCP — the
nameservers of whatever domain a customer attaches, not a fixed list.
CUSTOM_DOMAIN_DNS_RESOLVERS (default 1.1.1.1,8.8.8.8) are only the
public resolvers asked afterwards.
Without that egress verification still works: every nameserver query times out, and the check falls back to the public-resolver rule (every resolver must see both records). It is slower — part of the check's time budget is spent waiting on the nameservers — and a record created after a miss can sit in a resolver's negative cache until it expires.
Check it from inside the API container (the image ships BusyBox
nslookup and Node):
# UDP 53 to a root server (the same probe the API runs at boot)
docker compose exec api nslookup -type=NS . 198.41.0.4
# TCP 53
docker compose exec api node -e "require('net').connect(53,'198.41.0.4').on('connect',()=>{console.log('tcp 53 ok');process.exit(0)}).on('error',(e)=>{console.log('tcp 53 failed:',e.code);process.exit(1)})"The first should list the root nameservers and the second print
tcp 53 ok. When the boot probe fails, the API logs one warning:
authoritative nameservers unreachable from this host (outbound DNS port 53 blocked?) — custom-domain checks fall back to public resolvers, which is slower and cannot avoid seeding negative caches; open outbound UDP and TCP port 53with the lookup error in its code field.
The dashboard resolves GET /public/host/lookup?host=<h>&path=<p> to find
which funnel a request on a custom domain names: { projectId, slug } for
a verified, cert-issued host, matching only the first path segment (the
rest belongs to the funnel, so /quiz/step-2 and /quiz?x=1 both still
name quiz).
Self-hosting: server-side page heads
Each funnel page's <head> — tab title, icons, link-preview tags — is built
by the API and spliced into the page by the dashboard container, so that
link-preview crawlers (which never run JavaScript) see it. See
Sharing for what an author controls. Two
environment variables on the dashboard container decide how that works:
| Variable | Value | Effect |
|---|---|---|
ROVENUE_API_INTERNAL_URL | The API's internal listener as the dashboard container reaches it, scheme://host[:port] with no path. Default http://api:3001; the Helm chart sets it too | Where the container asks for each funnel page's head. Empty turns the lookup off: every funnel page gets a neutral head and no link preview. The listener is internal and never published |
ROVENUE_DASHBOARD_HOST | A bare hostname, optionally with :port (app.example.com) — not a URL; a value with https:// is rejected at start | Tells the container which host is the dashboard itself, so that every other host is treated as a customer's custom domain. Required for custom-domain heads: unset, only /f/<projectId>/<slug> links get the server-side head, a custom domain's funnel shows the dashboard's own title ("Rovenue Dashboard"), and the dashboard container logs a warning at start |
The container waits at most 800 ms for the API. A slower or unreachable API
does not break the page: it is served with a neutral head marked noindex,
and the runner replaces it with the real one once the funnel loads.
On a funnel host (a custom domain), Rovenue's own icon paths —
/favicon.ico, /favicon.svg and /apple-touch-icon.png — serve the
generic neutral icons, so a browser that falls back to them never shows the
dashboard's mark on a customer's domain. The variables are listed in .env.example; docker-compose.yml passes both.
The "Powered by Rovenue" badge
On any deployment, Rovenue Cloud or self-hosted, a hosted web funnel of a
project on the free plan (no paying subscription) carries a small "Powered by Rovenue" link at the bottom of every screen. It
sits in its own row under the page, so it never covers the CTA, a sticky
footer or the checkout, and it is plain text in the funnel's own colours —
no image, no request to anywhere (packages/funnel-renderer/src/powered-by.tsx).
The API decides it, never the browser: the published-funnel payload carries
branding.poweredBy, which is true only for a web
funnel, when the project's billing subscription is not active or
past_due (apps/api/src/services/funnel/branding.ts). Your own domain and
the /f/<projectId>/<slug> address show the same thing, and the builder's
Play through preview shows it exactly as visitors will.
To remove it, add a card under Settings → Billing: the next time the funnel loads, the badge is gone. The value is read on every request, not from the published-funnel cache, so there is no delay to wait out.
Native funnels never carry it — an app-store paywall is your app's own UI. A self-hosted install has no billing subscription, so it is always on the free plan and its hosted web funnels always show the badge.
Offline and missing funnels
When a funnel address serves nothing, the visitor gets a page in your brand instead of an error code. The runner and your custom domain show the same page, and it is chosen by the API's error code, never the HTTP status:
| Case | When | HTTP | Code | Title | Body |
|---|---|---|---|---|---|
| Not found | no web funnel with this slug in the project (an unknown slug, a native funnel's slug), or a custom-domain path that serves nothing (/ with no root funnel) | 404 | FUNNEL_NOT_FOUND, CUSTOM_HOST_PATH_NOT_FOUND | We couldn't find this page | Check the link — it may have moved. |
| Ended | the funnel is archived — including while a visitor is in the middle of it | 410 | FUNNEL_ENDED | This offer has ended | — |
| Unavailable | the funnel exists but is not published (never published, or restored from the archive and not yet republished) | 404 | FUNNEL_UNAVAILABLE | This page isn't available right now | Please check back soon. |
| Something went wrong | the API could not be reached, answered 5xx, or answered something unreadable | — | — | Something went wrong | Please try again. (plus "Your answers are saved." mid-funnel) |
Every refusal carries X-Robots-Tag: noindex and Cache-Control: no-store,
so search engines drop the address and no cache keeps it. The refusal's
error.details.unavailable block carries what the page is drawn with: the
project name, the "Powered by" rule, and — for an ended or unavailable
funnel — the theme, logo and store links of its last published version
(draft edits never show) plus your offline settings below. A 5xx page shows
the response's x-request-id as "Reference: …", for you to look up.
The button. In order: your offline redirect URL ("Continue to
<host>"); on an iPhone or Android phone, the matching store link from the
funnel's Store links ("Get the app"); on a desktop, "App Store" and "Google
Play" text links. With none of these set, there is no button. Nothing
redirects on its own — the visitor clicks. The error page's button is
Try again: the runner retries a failed config fetch by itself three
times (after 1, 2 and 4 seconds) before showing it, but never re-sends a
failed session start or step, so a retry cannot open a second session.
When this funnel is offline
In the builder, Settings → When this funnel is offline sets two optional fields for an archived (or unpublished) funnel:
- Message — plain text, at most 280 characters. It replaces the page's body.
- Redirect URL — an
https://address, at most 2048 characters. It becomes the page's button. Anything else is refused on save (VALIDATION_ERROR), and a stored value that is nothttps://is never served.
They live outside the versioned document, so they take effect on Save,
with no publish — you can still change them after archiving. Leave both
empty to use the default copy. The section previews the page with the
same component visitors get, but drawn from the draft theme and store
links; visitors see the theme, logo and store links of the last
published version.
Each save is recorded in the audit log as funnel.inactive_settings.updated
(PATCH /dashboard/projects/:projectId/funnels/:funnelId/inactive-settings).
Embedding
A web funnel can run in an iframe inside your own page. Two things can
reach the host page, and nothing else — custom actions and the close event
travel out through window.postMessage
(apps/dashboard/src/runner/host-bridge.ts:5-10):
| Message | When |
|---|---|
custom_action | A custom action ran, with its actionId and params |
close_funnel | The funnel ended |
(apps/dashboard/src/runner/host-bridge.ts:20-28).
function onCustomAction(actionId: string | undefined, params: Record<string, string> | undefined): void {
void actionId;
void params;
}
function onFunnelClosed(): void {}
window.addEventListener("message", (event) => {
const msg = event.data as {
source?: string;
type?: string;
actionId?: string;
params?: Record<string, string>;
} | null;
if (msg?.source !== "rovenue-funnel") return;
if (msg.type === "custom_action") onCustomAction(msg.actionId, msg.params);
if (msg.type === "close_funnel") onFunnelClosed();
});Custom actions are also pushed to window.dataLayer as
rovenue_funnel_custom_action, so a tag manager can pick them up without
any code (apps/dashboard/src/runner/host-bridge.ts:14,
apps/dashboard/src/runner/host-bridge.ts:40-45).
The envelope deliberately carries no session id and no visitor id. Messages
are posted to any origin, so anything in them would be readable by whoever
embeds the page — identifiers are capabilities, and none are sent
(apps/dashboard/src/runner/host-bridge.ts:6-10).
Talking to a running funnel
Only to grant consent: the one message a funnel listens for is
rovenue:consent (see Consent). Everything else it reads once,
from the URL that opened it:
utm_*, the referrer, and the declared app values seeded from the query
string (apps/dashboard/src/runner/session-inputs.ts:30-39,
apps/dashboard/src/runner/session-inputs.ts:40-53). Set them on the
iframe's src and they are there before the first screen renders — a
marketing link, an embed, and a native WebView all write the same query
string (apps/dashboard/src/runner/session-inputs.ts:7-12).
This is also how the funnel runs inside a native WebView: the app builds
the same URL, with the same query string. There is no separate mobile
embed (apps/dashboard/src/runner/session-inputs.ts:7-12).
Web funnel experiments
A web funnel A/B test runs at its control funnel's address, so nothing about the links above changes when one starts. What hosting adds is two query parameters, a storage setting and a consent signal.
QA and consent parameters
| Parameter | Effect |
|---|---|
?rv_variant=<variantId> | Opens that arm of the experiment at this address, while it is DRAFT, PAUSED or RUNNING. The session is recorded as forced: no token, never counted |
?rv_consent=1 | Grants consent for experiment storage (below) |
?rv_consent=<categories> | Grants the listed categories, comma-separated: analytics, ads, experiments (for example ?rv_consent=analytics,experiments). Unknown names are ignored |
The runner strips both parameters before it reads app values and campaign parameters, so neither is ever stored as one.
Visitor storage
The runner keeps a random visitor id and the arm tokens it is handed. The
project setting experiment visitor storage (experimentVisitorStorage
on PATCH /dashboard/projects/:id) decides where:
| Value | Where the id and tokens live |
|---|---|
persistent (default) | localStorage: every tab and every later visit on the same address is one visitor, in one arm |
after_consent | sessionStorage — this tab only, gone when it closes — until consent for experiments is granted; then they are moved to localStorage. Before that nothing of the runner's is in localStorage, and each new tab is a new visitor |
The setting reaches the runner with the funnel's config
(experiment_visitor_storage) only while the deployment's
WEB_FUNNEL_EXPERIMENTS_ENABLED flag is on. When storage is blocked
altogether (some private windows, a sandboxed iframe), each page load is a
new visitor; nothing breaks.
Rovenue does not show a consent banner. Whether persistent is lawful for
your visitors, or whether you need after_consent and a consent
management platform, is your decision under ePrivacy, GDPR or KVKK — you
are responsible for the consent basis. The visitor id is random: it is
never derived from the IP, the user agent or a fingerprint.
Consent
Consent is granted in one of two ways:
- the
?rv_consent=parameter above, on the link that opens the funnel; - the host message
rovenue:consent, posted to the funnel's window by the page that embeds it in aniframe, or by an app's WebView injecting it into the funnel's own window:
const frame = document.querySelector<HTMLIFrameElement>("iframe#rovenue-funnel");
frame?.contentWindow?.postMessage({ type: "rovenue:consent", experiments: true }, "*");The message carries any of analytics, ads and experiments, each
true to grant it. Only a literal true counts, and nothing revokes: the
message is a grant channel, so a frame that can post to the funnel can
grant no more than a ?rv_consent= link could. Messages from any other
window (a popup, a child frame) are ignored. Grants are kept in one
record, rovenue.funnel-consent, with where each came from. Experiments
read only the experiments category.
Page heads and indexing
The address's <head> — title, icons, link preview — is the control's,
for every arm. A variant's own slug keeps its own head but is served
noindex while it is an arm of a live experiment, so search engines do
not index a second copy of the page. After a stop with a winner, the
address's head follows the winner.
Two addresses, two visitors
Browser storage belongs to one origin. The same person opening
https://<your-dashboard-domain>/f/<projectId>/<slug> and
https://<your-domain>/<slug> is two visitors to the experiment, and
may be shown two different arms. The same holds across browsers and
devices: there is no cross-origin or cross-device visitor identity. Use
one address — normally your custom domain — in every campaign of a running
experiment.
Payments and Apple Pay
A web funnel's checkout takes payment on the page through your connected
Stripe account — see Checkout. Apple Pay
appears in that sheet only when the host the page was served from is
registered as a payment-method domain on the account taking the charge, so
registration runs per connected account
(apps/api/src/services/stripe/apple-pay-domain.ts:12-17).
The domain check is proved by an association file: one platform-wide copy
served from the funnel host verifies that host for every connected
account (apps/api/src/services/stripe/apple-pay-domain.ts:42-48). The
host registered is the one the paywall is served from — registering any
other host succeeds at the API level and Apple Pay silently never appears
(apps/api/src/services/stripe/apple-pay-domain.ts:99-110).
Publishing
What a funnel is checked for before it goes live, which findings block a publish and which only warn, and what visitors see while you keep editing.
Checkout
How a web funnel sells — the checkout action on its own screen, the Stripe gate on publish, and what the runner and the server do when the visitor pays.