{"version":3,"sources":["webpack:///./src/pages/help/how-to-track-users-across-multiple-subdomains.js"],"names":["related","link","title","description","frontmatter","metaTitle","metaDescription","canonical","Wrapped","Article","className","role","inline","lang","style","margin","section"],"mappings":"6FAAA,oGAoCMA,EAAU,CACd,CACEC,KAAM,0CACNC,MAAO,qCACPC,YAAa,yDAEf,CACEF,KAAM,kCACNC,MAAO,mCACPC,YAAa,iDAIJC,EAAc,CACzBC,UAAW,iDACXC,gBACE,kHACFC,UAAW,wDAGPC,EAAUC,aApDA,WACd,OACE,6BACE,iOAKA,6IAEwB,KAExB,uBAAGC,UAAU,gCAAgCC,KAAK,SAAlD,+DAC+D,IAC7D,kBAAC,IAAD,CAAMC,QAAM,GAAZ,gBAFF,aAE6C,IAC3C,gFAHF,oBAGiF,IAC/E,kBAAC,IAAD,CAAMA,QAAM,GAAZ,gBAJF,+EAOA,uCACA,kDACsB,4CADtB,kCAC0E,IACxE,iDAFF,MAIA,kBAAC,IAAD,CACEC,KAAK,aACLC,MAAO,CAAEC,OAAQ,WAFnB,2EA8BS,4BACb,kBAACP,EAAD,eAASR,QAASA,EAASgB,QAAQ,UAAUd,MAAOE,EAAYC,WAAeD","file":"component---src-pages-help-how-to-track-users-across-multiple-subdomains-js-d9add874af3bf55986c6.js","sourcesContent":["import React from 'react';\nimport Article from 'components/help/helpArticle';\nimport Code from 'components/help/codeSnippet';\n\nconst Content = () => {\n return (\n
\n Let’s say you install a script on domains example.com and blog.example.com. When the user\n goes from one domain to another, it will be registered as two separate sessions under two\n different IDs.\n
\n\n In this situation, LiveSession sees the same person as two separate users. Here’s how you\n can solve this issue:{' '}\n
\n\n To track users across multiple subdomains, you have to set a{' '}\n rootHostname
option to{' '}\n your top-level domain (eg. .your-domain.com) when calling the{' '}\n __ls("init")
method. Please note that the first character in\n .your-domain.com is a dot.\n
Example:
\n\n Your main domain is mywebsite.com but you also want to record on{' '}\n blog.mywebsite.com :\n
\n{`__ls(\"init\", \"YOUR_TRACK_ID\", { rootHostname: '.mywebsite.com' })`}
\n