Privacy controls

Last updated:

|Edit this page

PostHog offers a range of controls to limit what data is captured by product analytics. They are listed below in order of least to most restrictive.

EU-cloud hosting

PostHog offers hosting on EU cloud. To use this, sign up at eu.posthog.com.

If you've already created a US cloud instance and wish to migrate ticket, you must raise a support ticket in-app with the Data pipelines topic for the PostHog team to do this migration for you. This option is only available to customers on the team or enterprise plan as it requires significant engineering time.

Disable sensitive information with autocapture

If you're using autocapture, PostHog automatically attempts to prevent sensitive data capture. We specifically only collect the name, id, and class attributes from input tags.

If there are specific elements you don't want to capture, add the ph-no-capture class name.

HTML
<button class='ph-no-capture'>Sensitive information here</button>

Sanitize properties on the client

You can sanitize properties on the client side by setting the sanitize_properties config option. This is a function that enables you to modify the properties before they are sent to PostHog. For example:

Web
posthog.init('<ph_project_api_key>', {
api_host: 'https://us.i.posthog.com',
sanitize_properties: function(properties, event) {
if (properties['$ip']) {
properties['$ip'] = null;
}
return properties;
}
});

Use the property filter app

You can use the property filter app to prevent PostHog from certain properties on events. For example, you can configure the app to remove all GeoIP data from events.

We've also put together a tutorial to help you get started with the app.

Cookieless tracking

It's possible to use PostHog without cookies. Instead, PostHog can use in-memory storage. For more details on how to do this, read our tutorial on how to set up cookieless tracking.

Complete opt-out

You can completely opt-out users from data capture. To do this, there are two options:

  1. Opt users out by default in your PostHog initialization config.
posthog.init('<ph_project_api_key>', {
opt_out_capturing_by_default: true,
});
  1. Opt users out on a per-person basis.
posthog.opt_out_capturing()

Similarly, you can opt users in:

posthog.opt_in_capturing()

To check if a user is opted out:

posthog.has_opted_out_capturing()

Questions?

Was this page useful?

Next article

Web vitals autocapture

PostHog can automatically capture core web vitals like largest contentful paint, first input delay, cumulative layout shift, and first contentful paint. This means you don't need to manually add web vitals logging. How to enable web vitals autocapture Go to your Autocapture & heatmaps settings . Then, in the Web vitals autocapture section, click Enable . Note: Web vitals autocapture is separate from our regular autocapture feature. Web vitals can be captured regardless of whether…

Read next article