--- title: getClientBrowserParameters description: Gathers client browser values commonly used for analytics api_version: 2025-07 api_name: hydrogen source_url: html: >- https://shopify.dev/docs/api/hydrogen/latest/utilities/getclientbrowserparameters md: >- https://shopify.dev/docs/api/hydrogen/latest/utilities/getclientbrowserparameters.md --- # get​Client​Browser​Parameters Gathers client browser values commonly used for analytics ## get​Client​Browser​Parameters() If executed on server, this method will return empty string for each field. ### Returns * ClientBrowserParameters ### ClientBrowserParameters * navigationApi string Navigation api: `'PerformanceNavigationTiming' | 'performance.navigation'`. Use `getClientBrowserParameters()` to collect this value. * navigationType string Navigation type: `'navigate' | 'reload' | 'back_forward' | 'prerender' | 'unknown'`. Use `getClientBrowserParameters()` to collect this value. * path string Value of `window.location.pathname`. Use `getClientBrowserParameters()` to collect this value. * referrer string Value of `window.document.referrer`. Use `getClientBrowserParameters()` to collect this value. * search string Value of `window.location.search`. Use `getClientBrowserParameters()` to collect this value. * title string Value of `document.title`. Use `getClientBrowserParameters()` to collect this value. * uniqueToken string Shopify unique user token: Value of `_shopify_y` cookie. Use `getClientBrowserParameters()` to collect this value. * url string Value of `window.location.href`. Use `getClientBrowserParameters()` to collect this value. * userAgent string Value of `navigator.userAgent`. Use `getClientBrowserParameters()` to collect this value. * visitToken string Shopify session token: Value of `_shopify_s` cookie. Use `getClientBrowserParameters()` to collect this value. ### ClientBrowserParameters * navigationApi Navigation api: \`'PerformanceNavigationTiming' | 'performance.navigation'\`. Use \`getClientBrowserParameters()\` to collect this value. ```ts string ``` * navigationType Navigation type: \`'navigate' | 'reload' | 'back\_forward' | 'prerender' | 'unknown'\`. Use \`getClientBrowserParameters()\` to collect this value. ```ts string ``` * path Value of \`window\.location.pathname\`. Use \`getClientBrowserParameters()\` to collect this value. ```ts string ``` * referrer Value of \`window\.document.referrer\`. Use \`getClientBrowserParameters()\` to collect this value. ```ts string ``` * search Value of \`window\.location.search\`. Use \`getClientBrowserParameters()\` to collect this value. ```ts string ``` * title Value of \`document.title\`. Use \`getClientBrowserParameters()\` to collect this value. ```ts string ``` * uniqueToken Shopify unique user token: Value of \`\_shopify\_y\` cookie. Use \`getClientBrowserParameters()\` to collect this value. ```ts string ``` * url Value of \`window\.location.href\`. Use \`getClientBrowserParameters()\` to collect this value. ```ts string ``` * userAgent Value of \`navigator.userAgent\`. Use \`getClientBrowserParameters()\` to collect this value. ```ts string ``` * visitToken Shopify session token: Value of \`\_shopify\_s\` cookie. Use \`getClientBrowserParameters()\` to collect this value. ```ts string ``` ```ts { /** * Shopify unique user token: Value of `_shopify_y` cookie. * * Use `getClientBrowserParameters()` to collect this value. **/ uniqueToken: string; /** * Shopify session token: Value of `_shopify_s` cookie. * * Use `getClientBrowserParameters()` to collect this value. **/ visitToken: string; /** * Value of `window.location.href`. * * Use `getClientBrowserParameters()` to collect this value. **/ url: string; /** * Value of `window.location.pathname`. * * Use `getClientBrowserParameters()` to collect this value. **/ path: string; /** * Value of `window.location.search`. * * Use `getClientBrowserParameters()` to collect this value. **/ search: string; /** * Value of `window.document.referrer`. * * Use `getClientBrowserParameters()` to collect this value. **/ referrer: string; /** * Value of `document.title`. * * Use `getClientBrowserParameters()` to collect this value. **/ title: string; /** * Value of `navigator.userAgent`. * * Use `getClientBrowserParameters()` to collect this value. **/ userAgent: string; /** * Navigation type: `'navigate' | 'reload' | 'back_forward' | 'prerender' | 'unknown'`. * * Use `getClientBrowserParameters()` to collect this value. **/ navigationType: string; /** * Navigation api: `'PerformanceNavigationTiming' | 'performance.navigation'`. * * Use `getClientBrowserParameters()` to collect this value. **/ navigationApi: string; } ``` ### Examples * #### Example code ##### Description I am the default example ##### JavaScript ```jsx import * as React from 'react'; import {useEffect} from 'react'; import {getClientBrowserParameters} from '@shopify/hydrogen'; export default function App({Component, pageProps}) { useEffect(() => { getClientBrowserParameters(); }); return ; } ``` ##### TypeScript ```tsx import * as React from 'react'; import {useEffect} from 'react'; import {getClientBrowserParameters} from '@shopify/hydrogen'; export default function App({Component, pageProps}) { useEffect(() => { getClientBrowserParameters(); }); return ; } ``` ## Related [Utility - sendShopifyAnalytics](https://shopify.dev/api/hydrogen/utilities/sendShopifyAnalytics) [Hook - useShopifyCookies](https://shopify.dev/api/hydrogen/hooks/useShopifyCookies)