Troubleshooting and FAQs

Last updated:

Having trouble with recordings? Below are some tips for getting past some common issues

My browser freezes / crashes when recordings are enabled

Some Cookie banners or "CMP"s modify the webpage in reaction to any changes to cookies, which can cause an infinite loop. If you are using a tool like this and experience the webpage becoming unresponsive or slow then try configuring posthog to use persistence: "localStorage+cookie". This will use localStorage for the majority of storage needs, bypassing the infinite loop issue sometimes caused by cookie management tools.

Recordings are not being captured

There are a few common reasons that you may not see recordings appear in your project.

Permitted domain setting

In your project settings page, there's a section for 'Authorized URLs'. This is the list of domains where posthog will capture recordings. You should make sure it's not too restrictive.

For example, you may have https://www.example.com in the list. This will stop PostHog from capturing recordings on https://example.com.

If no domains are set here, PostHog will capture recordings on all domains.

posthog-js configurations

If you had previously disabled session recordings, you may have set the disable_session_recording option to true in posthog-js.

To re-enable session recordings you want to either remove the disable_session_recording option or set it to false.

You can read more about posthog-js configurations here.

Content security policy

When recordings are enabled, postHog-js will fetch a recorder.js script from the PostHog server. (This is not included in the default posthog-js to minimize the default bundle size)

Depending on your content security policy, this script may be blocked. If you have a default-src, script-src, script-src-elem, or connect-src directive in your CSP, you may need to add https://app.posthog.com (or your host URL if you are self hosted) to your list.

If PostHog is being blocked by your content security policy, you should see an error message in your developer console with more details.

Ad/tracking blockers

Some ad/tracking blockers will block PostHog from fetching posthog-js. If you're testing your app locally, you may need to disable any ad/tracking blockers that you're running in your browser.

Website is not recording properly

If you're having issues with recordings not looking correct, there are a couple things to do.

Update posthog-js

We're always making improvements to the recordings feature, so you'll want to make sure that you're running the latest version of posthog-js on your website.

To check the version that you're using, you can run the following in your console:

JavaScript
window.posthog.LIB_VERSION

Report your specific issue

To report a specific problem, you can open a GitHub issue. To help us figure it out as quickly as possible, please include the following information:

  • The URL of the page that you're trying to record
  • The version of posthog that you're using
  • The version of posthog-js that you're using
  • Details about the specific issue with your recording (e.g. how it looks and how it should look)
  • If you're on posthog-cloud, a link to the specific recording
  • Any unique details about your website (e.g. the frameworks that you're using etc.)

Questions?

Was this page useful?