Environments

How to test Coframe changes safely without affecting live visitors

Guide~2 min read

Copy this guide and your current settings as a prompt for your AI agent.

Preview agent promptSee the guide, code and settings included when you copy.

The Coframe SDK does not have a built-in staging or production mode. There is no environment switch, no per-environment endpoint, and no second projectId for a staging deployment. A project is simply identified by its projectId; the same install script runs across your site.

To test changes safely — without affecting live visitors or polluting experiment data — use the preview and disable controls built into the install script and browser SDK.

On this page
  1. 01Testing without affecting production
  2. 02Project identification
  3. 03Related

01Testing without affecting production

Disable Coframe for a session. Append ?cf_disabled (or any string containing cf_disable) to any page URL. The install-script IIFE exits before the SDK is fetched or executed, so no variants are applied and no events are sent. Use this to get a clean baseline page-load measurement or to verify your site works correctly when Coframe is inactive.

Preview a specific variant. Append ?coframe_variant_id=<variant_id> to a page URL. The edge worker serves a preview version of the project built from that variant, and the browser SDK sets isPreviewVariant = true, which suppresses event sending so the preview session does not appear in live experiment data.

Force events in preview when needed. If you also need to verify that analytics hooks fire correctly while previewing, add &coframe_should_send_events=true. This overrides the preview event gate and sends events normally — use this in a controlled QA environment, not against your production experiment.

For step-by-step instructions and URL examples, see Preview and Debugging.

02Project identification

Every Coframe install is tied to a projectId set in the config block of the installation script. The SDK uses this value as the key to fetch project data from the edge and to tag the events it sends. There is one projectId per project; the same value appears in every copy of your install script.

See Config Reference for the full CoframeConfig field list and JavaScript Installation for the standard install script.

03Related

Related reading

Content and video lessons from Coframe documentation. Code examples are not executed on this page.

BACK TOConfiguration

Documentation

Open Coframe App

Search documentation

Search all guides and references↑ ↓ Navigate · Esc Close