Learn how to install the client side code on your website
To install the script you need a project so make sure you have created one.
If you haven’t, you can create one here.Once you have your project, click on the Settings icon -> Setup instructions and add the domain name where you wish to install the script.Copy the Public API key form that window and paste it in the script below by replacing <project-public-api-key> with it.
Keep in mind that, for security reasons, a Public API key will only work when the request originates from the domain that you have added in the project settings.
We recommend using a unique session id for each user session. This can be a random string or a unique identifier that you generate.
The session should not be long lived, this is not something like a cookie that you store for a long time.
It should change if the user closes the tab/window.
Failing to do so could lead to a lot of fals positives when checking the session data due to pollution from other sessions of the same user.
Once you have installed the script, you can create a pageview on your website and the results should start showing in the project’s page in the dashboard.
To programatically check a user’s session data, use our REST APIs.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"VisitorQuery docs","colors":{"primary":"#19191C","light":"#cccccc","dark":"#19191C"},"logo":{"light":"https://mintcdn.com/visitorquery/fKjJgme3qPA3BWPy/images/logo.svg?fit=max\u0026auto=format\u0026n=fKjJgme3qPA3BWPy\u0026q=85\u0026s=22fcd607dc0702fe2c5819b3cb2faef2","dark":"https://mintcdn.com/visitorquery/fKjJgme3qPA3BWPy/images/logo-dark.svg?fit=max\u0026auto=format\u0026n=fKjJgme3qPA3BWPy\u0026q=85\u0026s=9faddfb80f7b775daf7de12f4fac2636"},"favicon":"/favicon.svg","navbar":{"links":[],"primary":{"type":"button","label":"Dashboard","href":"https://visitorquery.com/dashboard"}},"footer":{"socials":{"x":"https://x.com/visitorquery","github":"https://github.com/visitorquery"}},"navigation":{"global":{"anchors":[{"anchor":"Homepage","icon":"house","href":"https://visitorquery.com/"},{"anchor":"Pricing","icon":"table-list","href":"https://visitorquery.com/pricing"},{"anchor":"Support","icon":"slack","href":"https://visitorquery.com/support"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"visitorquery","hasAudioNarration":false,"actualSubdomain":"visitorquery","customDomains":["docs.visitorquery.com"],"gitSource":{"type":"github","owner":"visitorquery","repo":"docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a20c7e3743c2d338e660e32","collectionId":"25d2a9d7-f585-4e64-9752-339f48525c99","schemaVersion":"v2"},"entitlements":{},"buildId":"6a20c7e3743c2d338e660e32:success","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"Integrations","count":6},{"language":"default","tag":"API Reference","count":6},{"language":"default","tag":"Docs","count":5},{"language":"default","tag":"Client install","count":3},{"language":"default","tag":"Detect","count":2},{"language":"default","tag":"Webhooks","count":2},{"language":"default","tag":"API","count":1},{"language":"default","tag":"Main","count":1},{"language":"default","tag":"Plans","count":1},{"language":"default","tag":"Projects","count":1}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"client/javascript","slug":"/client/javascript","pageMetadata":{"title":"Javascript","description":"Learn how to install the client side code on your website","href":"/client/javascript"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to install the client side code on your website\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`To install the script you need a project so make sure you have created one.\nIf you haven’t, you can create one `,_jsx(_components.a,{href:`https://visitorquery.com/dashboard/projects`,children:`here`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Once you have your project, click on the `,_jsx(_components.code,{children:`Settings icon -> Setup instructions`}),` and add the domain name where you wish to install the script.`]}),`\n`,_jsxs(_components.p,{children:[`Copy the `,_jsx(_components.code,{children:`Public API key`}),` form that window and paste it in the script below by replacing `,_jsx(_components.code,{children:`\u003cproject-public-api-key>`}),` with it.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://cdn.visitorquery.com/visitorquery.js\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text/javascript\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\twindow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addEventListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'load'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\twindow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`VisitorQuery`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\t\tApiKey :`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cproject-public-api-key>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\t\tSessionId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"session-id-of-the-user\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t\t});`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Keep in mind that, for security reasons, a Public API key will only work when the request originates from the domain that you have added in the project settings.`}),`\n`,_jsx(Heading,{level:`2`,id:`the-session-id`,children:`The session id`}),`\n`,_jsx(_components.p,{children:`We recommend using a unique session id for each user session. This can be a random string or a unique identifier that you generate.\nThe session should not be long lived, this is not something like a cookie that you store for a long time.\nIt should change if the user closes the tab/window.\nFailing to do so could lead to a lot of fals positives when checking the session data due to pollution from other sessions of the same user.`}),`\n`,_jsx(Heading,{level:`2`,id:`install-complete`,children:`Install complete`}),`\n`,_jsxs(_components.p,{children:[`Once you have installed the script, you can create a pageview on your website and the results should start showing in the project’s page in the dashboard.\nTo programatically check a user’s session data, use our `,_jsx(_components.a,{href:`/api/guide`,children:`REST APIs`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Javascript","description":"Learn how to install the client side code on your website","href":"/client/javascript"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"The session id","slug":"the-session-id","depth":2,"children":[]},{"title":"Install complete","slug":"install-complete","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"visitorquery","siteName":"VisitorQuery docs","title":"Javascript - VisitorQuery docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T07:04:05.515Z","originalFileLocation":"client/javascript.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to install the client side code on your website\">\u003cmeta data-mint-head name=\"application-name\" content=\"VisitorQuery docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/visitorquery/4FVGnuIR19eQ8TC0/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/visitorquery/4FVGnuIR19eQ8TC0/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/visitorquery/4FVGnuIR19eQ8TC0/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/visitorquery/4FVGnuIR19eQ8TC0/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/visitorquery/4FVGnuIR19eQ8TC0/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/visitorquery/4FVGnuIR19eQ8TC0/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/visitorquery/4FVGnuIR19eQ8TC0/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/visitorquery/4FVGnuIR19eQ8TC0/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/visitorquery/4FVGnuIR19eQ8TC0/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Javascript - VisitorQuery docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to install the client side code on your website\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"VisitorQuery docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.visitorquery.com/client/javascript\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://visitorquery.mintlify.app/_mintlify/api/og/v2?division=Client+install\u0026amp;title=Javascript\u0026amp;description=Learn+how+to+install+the+client+side+code+on+your+website\u0026amp;theme=6475cf85eaa32343affb5be2\u0026amp;signature=83fce41863f35feb32ae631317ee1370bc6bea0a0a819af516df5456b6a1d7aa\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Javascript - VisitorQuery docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to install the client side code on your website\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://visitorquery.mintlify.app/_mintlify/api/og/v2?division=Client+install\u0026amp;title=Javascript\u0026amp;description=Learn+how+to+install+the+client+side+code+on+your+website\u0026amp;theme=6475cf85eaa32343affb5be2\u0026amp;signature=83fce41863f35feb32ae631317ee1370bc6bea0a0a819af516df5456b6a1d7aa\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/visitorquery/4FVGnuIR19eQ8TC0/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"VisitorQuery docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#19191C\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.visitorquery.com/client/javascript\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/client/javascript.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.visitorquery.com/#organization\",\"name\":\"VisitorQuery docs\",\"url\":\"https://docs.visitorquery.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/visitorquery/fKjJgme3qPA3BWPy/images/logo.svg?fit=max\u0026auto=format\u0026n=fKjJgme3qPA3BWPy\u0026q=85\u0026s=22fcd607dc0702fe2c5819b3cb2faef2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.visitorquery.com#website\",\"name\":\"VisitorQuery docs\",\"url\":\"https://docs.visitorquery.com\",\"publisher\":{\"@id\":\"https://docs.visitorquery.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.visitorquery.com/client/javascript#webpage\",\"url\":\"https://docs.visitorquery.com/client/javascript\",\"name\":\"Javascript\",\"description\":\"Learn how to install the client side code on your website\",\"dateModified\":\"2026-01-07T07:04:05.515Z\",\"isPartOf\":{\"@id\":\"https://docs.visitorquery.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.visitorquery.com/client/javascript#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.visitorquery.com/client/javascript#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Client install\",\"item\":\"https://docs.visitorquery.com/client/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Javascript\",\"item\":\"https://docs.visitorquery.com/client/javascript\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.visitorquery.com/client/javascript#article\",\"headline\":\"Javascript\",\"name\":\"Javascript\",\"description\":\"Learn how to install the client side code on your website\",\"url\":\"https://docs.visitorquery.com/client/javascript\",\"mainEntityOfPage\":{\"@id\":\"https://docs.visitorquery.com/client/javascript#webpage\"},\"dateModified\":\"2026-01-07T07:04:05.515Z\",\"publisher\":{\"@id\":\"https://docs.visitorquery.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.visitorquery.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"VisitorQuery docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"VisitorQuery docs","nav":{"global":{"anchors":[{"anchor":"Homepage","icon":"house","href":"https://visitorquery.com/"},{"anchor":"Pricing","icon":"table-list","href":"https://visitorquery.com/pricing"},{"anchor":"Support","icon":"slack","href":"https://visitorquery.com/support"}]},"tabs":[{"tab":"Docs","groups":[{"group":"Main","pages":[{"title":"Documentation","href":"/introduction"}]},{"group":"Client install","pages":[{"title":"Introduction","description":"Learn about the multiple ways to integrate VisitorQuery with your website or app","href":"/client/introduction"},{"title":"Javascript","href":"/client/javascript"},{"title":"No Javascript","description":"Simpler, faster but less accurate way to check if a connection is behind a proxy","href":"/client/no-javascript"}]},{"group":"API","pages":[{"title":"Guide","mode":"wide","href":"/backend-api/guide"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/detect/get-check-session-results"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/introduction"}]}]},"title":"Javascript - VisitorQuery docs","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":[],"chunks":[]}