---
title: getClientBrowserParameters
description: Gathers client browser values commonly used for analytics
api_version: 2026-04
source_url:
  html: >-
    https://shopify.dev/docs/api/hydrogen-react/latest/utilities/getclientbrowserparameters
  md: >-
    https://shopify.dev/docs/api/hydrogen-react/latest/utilities/getclientbrowserparameters.md
api_name: hydrogen-react
---

# 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

  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
  ```

### 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-react';

  export default function App({Component, pageProps}) {
    useEffect(() => {
      getClientBrowserParameters();
    });

    return <Component {...pageProps} />;
  }
  ```

  ##### TypeScript

  ```tsx
  import * as React from 'react';
  import {useEffect} from 'react';
  import {getClientBrowserParameters} from '@shopify/hydrogen-react';

  export default function App({Component, pageProps}) {
    useEffect(() => {
      getClientBrowserParameters();
    });

    return <Component {...pageProps} />;
  }
  ```

***

## Related

[sendShopifyAnalytics](https://shopify.dev/docs/api/hydrogen-react/2026-04/utilities/sendshopifyanalytics)

[useShopifyCookies](https://shopify.dev/docs/api/hydrogen-react/2026-04/hooks/useshopifycookies)

***
