Troubleshooting and FAQs

Last updated:

|Edit this page

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

The most common solution is...

Update the PostHog snippet or JavaScript Web SDK

Surveys requires either the latest version of the PostHog snippet or version 1.81.3 or greater of posthog-js to be installed on your website.

We're always making improvements to the surveys feature, so you'll want to make sure that you're running the latest version.

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

JavaScript
window.posthog.LIB_VERSION

Surveys still not showing up

If updating PostHog doesn't solve your problem, there are a few reasons why your survey might not be showing up:

1. Configuration is off

Surveys are enabled through the surveys opt in toggle in the app. If you're not seeing any surveys, make sure that this toggle is enabled.

You can read more about posthog-js configurations here.

2. Content security policy

When surveys are enabled, posthog-js will fetch a survey.js script from the PostHog server. It is not included in the default posthog-js installation to minimize the default bundle size.

Depending on your content security policy, this script may be blocked. If it is, you should see an error message in your developer console with more details.

You may need to add https://app.posthog.com, https://eu.posthog.com, or your host URL if you are self hosted) to your allow list.

3. Proxies

If you're running behind a proxy, the /static/survey.js endpoint may be blocked. Read more about how to configure your proxy to allow this endpoint.

3. Ad or tracking blockers

Some ad or tracking blockers 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.

In production, using a reverse proxy can help prevent this.

Debugging surveys in console

You can call getActiveMatchingSurveys in your browser console to see which surveys are currently active for the user. If the method doesn't exist, it means that you're not running the latest version of posthog-js.

JavaScript
posthog.getActiveMatchingSurveys(surveys => console.log(surveys))

How are surveys priced?

Surveys are priced based on the number of responses received each month. However, because surveys utilize other parts of PostHog, such as events and feature flags, it's important to highlight the underlying costs too.

Surveys incur additional costs in two ways:

  1. Surveys create events when shown, dismissed, and responded to.
  2. Targeting surveys by user properties or linked flags uses a feature flag.

We have generous free allowances for events and feature flags each month, and costs per event or flag request are negligible beyond this. 10,000 survey responses per month would typically cost less than $10 per month for events and flags, for example.

Why do surveys use events and feature flags?

We built surveys in this way to enable maximum flexibility and ensure it combines well with other PostHog tools.

Storing responses as events means you can use them within insights or cohorts, for example. Unlike other tools, PostHog doesn't limit you to analyzing responses in a single way. Want to create a feature flag that targets users who responded to a survey in a particular way, or breakdown responses by geography? PostHog does that!

If you have any questions about pricing, please reach out to us through any of these support options.

Questions?

Was this page useful?

Next article

Customer data platform

Data connections include sources (data in) and destinations (data out), and are part of PostHog's CDP (officially coming soon). They allow anyone to extend and customize PostHog in order to better fit their needs. We have a comprehensive library of data connections , including data warehouses (Snowflake, BigQuery, Redshift) and marketing tools (HubSpot, Sendgrid, Customer.io, Salesforce). Pipelines can be used for a wide variety of use cases, such as: Sending the event data to a data warehouse…

Read next article