From e75e95d0a0e343919af43df9259cc7a83004e5c1 Mon Sep 17 00:00:00 2001 From: gonsolvis-mxp Date: Tue, 17 Feb 2026 15:56:14 +0100 Subject: [PATCH] Update javascript.mdx If you set persistence: 'localStorage', cross-subdomain tracking will not work because localStorage is not shared across subdomains. --- pages/docs/tracking-methods/sdks/javascript.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/docs/tracking-methods/sdks/javascript.mdx b/pages/docs/tracking-methods/sdks/javascript.mdx index 6515dd732d..7110827ab5 100644 --- a/pages/docs/tracking-methods/sdks/javascript.mdx +++ b/pages/docs/tracking-methods/sdks/javascript.mdx @@ -935,7 +935,7 @@ mixpanel.init('YOUR_PROJECT_TOKEN', { If you configure your instance to send data over HTTP (instead of HTTPS) but set `secure_cookie: true`, then your cookie data will not sent to the server. #### Hosted Subdomains -By default, Mixpanel cookie works across subdomain, keeping Mixpanel's Distinct ID and [Super Properties](/docs/tracking-methods/sdks/javascript#setting-super-properties) consistent across your sub-domains. For hosted subdomains (see [complete list of affected domains](https://publicsuffix.org/list/effective_tld_names.dat)) that don't allow cross-subdomain cookies, disable cross-subdomain cookie by setting the `cross_subdomain_cookie` configuration option to `false`. Alternatively, you can also use a `CNAME` to change from `yourdomain.hostapp.com` to `yourdomain.com`. +By default, Mixpanel cookie works across subdomain, keeping Mixpanel's Distinct ID and [Super Properties](/docs/tracking-methods/sdks/javascript#setting-super-properties) consistent across your sub-domains. If you set persistence: 'localStorage', cross-subdomain tracking will not work because localStorage is not shared across subdomains. For hosted subdomains (see [complete list of affected domains](https://publicsuffix.org/list/effective_tld_names.dat)) that don't allow cross-subdomain cookies, disable cross-subdomain cookie by setting the `cross_subdomain_cookie` configuration option to `false`. Alternatively, you can also use a `CNAME` to change from `yourdomain.hostapp.com` to `yourdomain.com`. **Example Usage** ```javascript