Rehearsals

Configuration Options

Customize Rehearsals behavior to match your specific needs.

Basic Configuration

The window.deepPredictionSettings object controls how Rehearsals operates on your site.

Required Settings

Setting Type Description
apiKey string Your project API key (starts with dp_proj_)
organizationId string Your organization ID (starts with dp_org_)

Optional Settings

Setting Type Default Description
cookieDomain string null Share sessions across subdomains

Example Configuration

Cross-Subdomain Tracking

Track users across all your subdomains (e.g., www., app., shop.):

<script>
  window.deepPredictionSettings = {
    apiKey: 'dp_proj_xxxxx',
    organizationId: 'dp_org_xxxxx',
    cookieDomain: '.yoursite.com'  // Note the leading dot
  };
</script>
<script async defer src="https://app.runrehearsals.com/recorder.js"></script>

Development vs Production

For different environments, we recommend creating separate projects in your Rehearsals dashboard:

  • Development Project: Create a project specifically for your development environment with its own API key and organization ID
  • Production Project: Create a separate project for your live site with different credentials

This approach allows you to:

  • Keep development and production data separate
  • Test new features without affecting production analytics
  • Have different access controls for each environment

You can then use your framework's environment variables or conditional logic to load the appropriate credentials for each environment.

Liam Bolling·CEO & Co‑Founder
Created June 15, 2025·Updated September 12, 2025