Heatmap preview

The Heatmaps tab draws the clicks and scroll depth over a live preview of your page: the portal loads https://<your site domain><page path> in a frame. The preview is for looking only: clicks on it never reach your page, and the WriteChoice script doesn’t count it as a visit. Other analytics tools on your page (Google Analytics, for example) may count it.

If your site sends either of these headers, browsers refuse to show the page inside the portal, and the heatmap is drawn on a blank background instead:

  • X-Frame-Options: DENY or X-Frame-Options: SAMEORIGIN;
  • a Content-Security-Policy header with a frame-ancestors directive that doesn’t list the portal.

Allow the portal

Add the portal’s addresses to frame-ancestors in your Content-Security-Policy header:

Content-Security-Policy: frame-ancestors 'self' https://customer.writechoice.io https://analytics.writechoice.io
  • Keep the sources you already have ('self' and any other site that frames your pages) and add the portal’s addresses to the list. The notice in the Heatmaps tab names the exact address to add.
  • With frame-ancestors in place, current browsers ignore X-Frame-Options, so you can keep it for older browsers.
  • If you also view heatmaps in a platform’s own dashboard (such as WriteDocs), add that dashboard’s address to the same list.
  • If you set frame-ancestors 'none' or X-Frame-Options: DENY on purpose, you can keep it: the heatmap still works on the blank background.

Good to know

  • Pages that require signing in (the server answers 401 or 403, like a password-protected page) are never previewed: the heatmap is drawn on the blank background, and nothing needs to change.
  • The portal checks your page’s headers at most once an hour, so a change can take up to an hour to show.
  • The page is read from the domain registered for your site. If it redirects to another domain, including the www. version of the same domain, the preview isn’t shown: the domain registered for the site needs to be the one that serves the page (for example www.example.com, not example.com). Ask WriteChoice to change it.
  • Mintlify-hosted sites need Mintlify support to add the origins. See Install on Mintlify.