Install with Cloudflare

View as Markdown

Connect Cloudflare from the dashboard and Telltale publishes a managed Cloudflare Zaraz installation for exact hostnames, without changing your application code.

Before you start

Selection is exact: choosing app.example.com does not include example.com or other subdomains. Telltale does not change DNS, proxy status, Workers or firewall settings.

Install and publish

  1. In Settings › Channels, open Advanced and choose Connect Cloudflare, authorize, then select the connection for this workspace.
  2. Choose the zone. Eligible hostnames are listed with the reason any hostname is not selectable. A hostname that another Site's Zaraz installation already targets is shown as unavailable ("Already installed for the Site …"; another workspace's Site is not named) and a preview that includes it is refused, because two loaders on one page would report every visit under two Site keys. Remove that installation first.
  3. Preview the installation. The preview shows the exact entries that will be added (a custom HTML tool, a page-load trigger, and identify and reset triggers) and expires after five minutes.
  4. Apply. The installer stages the reviewed change, publishes it and reads the published configuration back. Installed and verified means the published configuration matches; it does not mean a browser has loaded the script yet.
  5. Open one of the selected hostnames in another tab. Settings › Channels changes from Waiting for the first session to Activity received when the Telltale server receives the first events from a Zaraz-started session on that hostname (initialization alone does not count; sessions started by another installer are listed separately).

Repeat for another zone. Editing a zone's hostnames replaces only Telltale's own entries after a new preview.

Collection mode

The managed Zaraz installation starts collection automatically on the selected hostnames. It respects a refusal the SDK has already saved on that browser, but it does not synchronize with a consent manager. If your deployment needs consent-controlled collection, remove the Zaraz installation (Remove, then apply the removal preview) and use the direct held SDK with the Consent bridge, or Google Tag Manager with Let my CMP control collection. Never run both for the same Site.

Content Security Policy

The managed installation is a Zaraz custom HTML tool, which needs Zaraz's execute_unsafe_scripts permission: Zaraz inserts the loader script into the page, and the loader then adds the Telltale server's /sdk.js. That only works when your policy trusts scripts inserted by Zaraz:

When a policy blocks the loader, nothing is collected and Settings › Channels keeps showing Waiting for the first session. Compatibility of the managed installation with a strict CSP has not been verified against live Cloudflare delivery; test with Content-Security-Policy-Report-Only first.

Identify signed-in users

Identity is optional. After the SDK has initialized (window.Telltale?.getClient() succeeds), send stable internal IDs through Zaraz. The event names 'observatory.identify' and 'observatory.reset' are historical names, stable and kept on purpose so existing installs keep working (Renamed names); use them exactly as shown:

JavaScript
await zaraz.track('observatory.identify', { userId: 'usr_123', accountId: null });
// On logout or account switch, before someone else uses the page:
await zaraz.track('observatory.reset');

These IDs are browser-supplied labels, not verified identity, and pass through Cloudflare: never send tokens, secrets or personal data you are not allowed to share.

You can send these events before the SDK has loaded. Each identify or reset event waits in page memory, in order, and is applied as soon as the managed installation has initialized the SDK on that page. At most 20 events wait; when more arrive, the oldest are dropped. Nothing is stored or sent while they wait. A queued identity is applied only if collection is allowed at that moment: when the browser has a saved refusal, or collection is withdrawn, queued events are discarded, not kept for later, and nothing is identified before collection is permitted. The queue lasts only for the page, so send identity again after a full navigation. For ordering-critical changes, you can also await the client directly: await client.reset() and then await client.identify(...). Use POST /api/v1/identify from your backend for server-verified identity.

Use the client for protected actions

JavaScript
const client = window.Telltale.getClient();
const sessionToken = await client.getSessionToken();

Send the token only to your own backend with the protected request, and verify it there (Quickstart). getClient() throws when the page has no initialized client or more than one; keep the result of init() in that case.

Change or remove

Detach, remove or revoke the Cloudflare connection

None of these touches the published Zaraz configuration. Installed loaders keep running and collecting on their hostnames until you remove the installation (Remove, then apply the removal preview) while a working connection is selected.

Detach, remove or revoke the Cloudflare connection
ActionWhereWhat changesInstalled scriptsTo manage installations again
DetachSettings › Channels, Cloudflare connection (owner or admin)The workspace no longer uses that connection. The connection itself stays with its owner.Keep running unchanged.Select a connection again. Selecting one first checks that it can reach every zone with an installation; if it cannot, the old selection stays.
Remove connectionSettings › Channels, by the connection's owner onlyThe stored Cloudflare tokens are deleted, and every workspace that had selected the connection is detached.Keep running unchanged.Connect Cloudflare again (or select another connection), then select it.
Revoke at CloudflareYour Cloudflare profile, where the authorized application can be revokedCloudflare stops accepting the stored tokens. Telltale marks the connection Reconnect required the next time a call or token refresh is refused.Keep running unchanged.Reconnect with the same Cloudflare identity, which updates the existing connection, then retry.

To stop collection on a hostname, remove the installation before you detach, remove or revoke the connection. If the connection is already gone, delete Telltale's custom HTML tool and its triggers in the Zaraz dashboard yourself, or reconnect and apply a removal preview.

Troubleshooting