> ## Documentation Index
> Fetch the complete documentation index at: https://docs.claimr.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Analytics Client ID

> Enhance your Claimr widget's Google Analytics integration by passing the GA4 Client ID for more accurate, cross-session user tracking.

## Why Client ID?

Claimr can automatically retrieve the Google Analytics Client ID for more accurate user tracking within your widget. This provides a more complete picture of user behavior in your Google Analytics 4 reports.

* **Improved cross-session tracking:** Accurately track user behavior even if they close and reopen the browser or switch devices.
* **More accurate user counts:** Avoid counting the same user multiple times.
* **Richer data in Google Analytics:** Get a complete picture of user engagement within your Claimr widget.

## Automatic Client ID retrieval (recommended)

Once you integrated your Claimr widget with Google Analytics 4 (using either the `data-ga4` attribute in your embed script or the `ga4` URL parameter, as described in [Google Analytics integration](/widget/claimr-widget-integrations/google-analytics-integration)), Claimr usually finds the Client ID automatically.

<Note>
  How it works: Claimr checks for the standard Google Analytics cookie (`_ga`). This cookie contains the Client ID in the format `GA1.1.USER_ID`. Claimr extracts the `USER_ID` portion and uses it for tracking. You generally do not need to add any extra code.
</Note>

## Manual Client ID passing (alternative)

If the automatic retrieval doesn't work, or if you need more control, you can manually pass the Client ID using a URL parameter:

* Add `?ga4cid=USER_ID` to your Claimr campaign URL, replacing `USER_ID` with the actual Client ID from the `_ga` cookie.

**Example**

```
https://campaign?ga4cid=123456789.987654321
```

Replace `123456789.987654321` with the actual Client ID and `https://campaign` with your base campaign URL.

## Verification

To check the integration, you can use tools from Google Analytics.
