Install coview on your site

Add the coview snippet to your website or web app, allow its domains, and check that visitors, recordings and the chat widget show up.

One script tag loads everything coview runs on your site: the chat widget, session recording, co-browsing and calls. Each site in your workspace has its own snippet with its own public key.

Get your snippet

  1. Sign in to the console at coview.work/app. New here? Signing in creates your account, and setting up a workspace shows your snippet straight away.
  2. Open Settings › Install & widget. The Install tab shows the install code for your site.
  3. Click Copy code.

The snippet looks like this, with your own key in place of pk_live_…:

<script async src="https://coview.work/assets/cv-sdk.js?v=4" data-coview-key="pk_live_…"></script>

Copy it from the console rather than typing it: the key belongs to one site.

Where to put it

Paste the snippet before </body> on every page of your site. Loading it once per page is enough: if the same page loads it twice, the second copy does nothing.

  • A tag manager. Add the snippet as a custom HTML tag that runs on every page. Keep the data-coview-key attribute on the script tag.
  • React, Next.js, Vue and other single-page apps. Add the snippet once, in the HTML or root layout that every route shares, not in a component that renders per page. Client-side navigation counts as page views on its own (the Single-page navigation switch in the Tracking tab, on by default), and a recording carries on across route changes.
  • Calling coview from your code. Because the snippet loads asynchronously, add this one line before the snippet if your pages call coview(…) early, for example to identify a signed-in user. Calls made before the script has loaded wait in a queue and run when it starts.
<script>
  window.coview = window.coview || function () { (coview.q = coview.q || []).push(arguments); };
</script>

Every command is listed in the coview() JavaScript API.

Allow your domains

A site's key works only on the domains you list for it. Requests from any other site are refused, which protects your public key.

  1. In Settings › Install & widget, open the Sites & domains tab.
  2. Click Edit on the site, or Add site for a new one.
  3. Under Allowed domains, enter one domain per line. A domain also covers its subdomains, and *.example.com says so explicitly. For local development, add localhost:3000 (with your port).

A workspace can have up to 20 sites, each with up to 20 domains. Pick the site from the Site menu to get its snippet.

Content Security Policy

If your site sends a Content-Security-Policy header, allow scripts from https://coview.work and connections to https://api.coview.work and wss://api.coview.work. If your snippet's script tag carries a nonce, coview passes the same nonce to the scripts it loads. Voice and video calls also connect to a media server: if calls don't connect under a strict policy, your browser's console names the address it refused.

Check that it works

  1. Open your site in an ordinary browser window and click, scroll or type. coview waits for a person's first interaction (or the page staying in front for 10 seconds) before it records, and it skips automated browsers such as headless Chrome, Puppeteer, Playwright, Selenium, Cypress and Lighthouse. Testing with those shows nothing.
  2. In the console, open Live now. Visitors appear a few seconds after they open a page with the snippet.
  3. Open Sessions. The recording of your visit appears within seconds, marked Recording while it goes on.
  4. The chat launcher shows in the corner of your page. See The chat widget.

On Home, the Finish setting up list ticks off Install coview on your site once a visitor or a recording arrives.

If nothing shows up

  • Open your browser's developer console on your site. A message starting with [coview] says what went wrong: a key that isn't known, or a domain that isn't in the site's allowed domains.
  • Check that recording is on for the site in Settings › Privacy, and that your page isn't one of its Pages not recorded. See Privacy, masking and retention.
  • If your site withdrew analytics consent for your browser, nothing is recorded. See consent.
Still stuck?

A person from coview will help — send us a message, or book a demo and we'll walk through it with you.