Skip to main content
Starting with SDK version 2.60.0, the Javascript SDK can autocapture events when you enable it. To do so, enable the autocapture configuration:
EU and India data residency: If your project uses EU or India data residency, you must explicitly set the API host in your init code: add api_host: 'https://api-eu.mixpanel.com' (EU) or api_host: 'https://api-in.mixpanel.com' (India) to mixpanel.init(). Otherwise, your data, including autocaptured events, will be dropped. If you send data through a proxy or custom domain, point it at your region’s host instead and keep the proxy URL in your init code. See EU Data Residency and India Data Residency.
If you’d like to change the default Autocapture settings, you can use custom configs. These are the default configs:
You can read more about custom configuration of Autocapture here.