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

# User Identifiers

> Understanding user identifiers and how to send them to OneView

User identifiers are unique values that help OneView match events to the same user across sessions, devices, and platforms. They are used to build the [Identity Graph](/docs/platform/features/processing/identity-resolution) that connects a user's actions.

## Overview

OneView automatically collects identifiers from your Google Tag Manager Server Container's [Common Event Data](https://developers.google.com/tag-platform/tag-manager/server-side/common-event-data). You can also explicitly configure additional identifiers in the OneView Server Tag template.

<Info>
  All identifiers sent to OneView are used to build your Identity Graph, which enables [Enhanced Conversions](/docs/platform/features/delivery/enhanced-conversions) and improves attribution accuracy.
</Info>

## Supported Identifier Types

The OneView Server Tag template supports the following identifier types:

| Type                | Icon | Description                                    | Format                             | Hashing             |
| ------------------- | ---- | ---------------------------------------------- | ---------------------------------- | ------------------- |
| **Client ID**       | 💻   | Anonymous browser or device identifier         | String                             | None (plaintext)    |
| **User ID**         | 👤   | Authenticated user identifier from your system | String                             | None (plaintext)    |
| **Organization ID** | 🏢   | Organization or account identifier             | String                             | None (plaintext)    |
| **Email Address**   | 📧   | User's email address                           | Valid email format                 | SHA-256 (automatic) |
| **Phone Number**    | 📞   | User's phone number                            | E.164 format (e.g., `+1234567890`) | SHA-256 (automatic) |

### Client ID

The Client ID is an anonymous identifier typically generated by Google Analytics or your analytics platform. It helps track users across sessions on the same device.

**Example values:**

* Google Analytics Client ID: `1234567890.1234567890`
* Custom client ID: `device-abc123`

<Note>
  Client IDs are sent as plaintext. They are anonymous identifiers and do not contain personally identifiable information.
</Note>

### User ID

The User ID is an authenticated identifier from your system. Use this when users are logged in to your application.

**Example values:**

* `user_12345`
* `usr_abc123def456`
* `12345`

<Tip>
  Use a consistent format for User IDs across all events to ensure reliable identity resolution.
</Tip>

### Organization ID

The Organization ID represents an organization, account, or workspace that the user belongs to. Useful for B2B scenarios where users belong to organizations.

**Example values:**

* `org_12345`
* `acct_abc123`
* `workspace_xyz789`

### Email Address

Email addresses are automatically hashed using SHA-256 before being sent to OneView. The template validates email format and normalizes to lowercase before hashing.

**Requirements:**

* Must be a valid email format
* Automatically trimmed and lowercased
* Hashed using SHA-256

**Example:**

* Input: `User@Example.com`
* Processed: `user@example.com`
* Hashed: `a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3`

<Warning>
  Email addresses must be provided in plaintext. The template handles hashing automatically. Do not send pre-hashed emails.
</Warning>

### Phone Number

Phone numbers must be provided in E.164 format and are automatically hashed in both E.164 and numeric formats.

**Requirements:**

* Must be in E.164 format (e.g., `+1234567890`)
* Must start with `+` followed by country code
* Automatically hashed in two formats:
  * E.164 format (with `+`)
  * Numeric format (without `+`)

**Example:**

* Input: `+1234567890`
* Hashed E.164: `sha256("+1234567890")`
* Hashed Numeric: `sha256("1234567890")`

<Note>
  The template validates phone numbers against the E.164 regex pattern. Invalid formats are ignored.
</Note>

## Automatic Collection

The OneView Server Tag template automatically collects identifiers from your Server Container's Common Event Data. The following fields are automatically extracted:

| Common Event Data Field        | Identifier Type | Notes                               |
| ------------------------------ | --------------- | ----------------------------------- |
| `client_id`                    | Client ID       | Anonymous browser identifier        |
| `user_id`                      | User ID         | Authenticated user identifier       |
| `user_data.email_address`      | Email           | Automatically hashed                |
| `user_data.phone_number`       | Phone           | Automatically hashed (E.164 format) |
| `user_data.address.first_name` | Name            | Automatically hashed                |
| `user_data.address.last_name`  | Name            | Automatically hashed                |

<Info>
  You don't need to manually configure identifiers that are already present in Common Event Data. The template automatically includes them.
</Info>

## Manual Configuration

Use the **User Identifiers** section in the tag template to add identifiers that are not available in Common Event Data:

<Steps>
  <Step title="Open tag configuration">
    Edit your OneView Server Tag and expand the **User Identifiers** section.
  </Step>

  <Step title="Add identifiers">
    Click **Add New** and select the identifier type from the dropdown, then enter the value.

    <Note>
      For email and phone identifiers, enter the plaintext value. The template handles hashing automatically.
    </Note>
  </Step>

  <Step title="Use variables">
    You can use GTM variables to dynamically populate identifier values. For example:

    * `{{User ID Variable}}` for user IDs
    * `{{Email Variable}}` for email addresses
    * `{{Phone Variable}}` for phone numbers
  </Step>
</Steps>

## Best Practices

<Tip>
  **Send multiple identifier types** when available. OneView's Identity Resolution works best when you provide multiple identifiers (e.g., client ID + email + user ID).
</Tip>

<Tip>
  **Use consistent formats** across all events. For example, always use the same User ID format or email normalization.
</Tip>

<Tip>
  **Include identifiers early** in the user journey. The sooner you send identifiers, the better OneView can build the Identity Graph.
</Tip>

<Warning>
  **Never send pre-hashed PII**. The template automatically hashes email addresses and phone numbers. Sending pre-hashed values will result in double-hashing and failed identity resolution.
</Warning>

## Identity Resolution

OneView uses these identifiers to build your [Identity Graph](/docs/platform/features/processing/identity-resolution), which:

* Links identifiers across devices and sessions
* Enables Enhanced Conversions with better match rates
* Improves attribution accuracy
* Supports cookieless advertising scenarios

Learn more about [Identity Resolution](/docs/platform/features/processing/identity-resolution) and how it works.

## Next Steps

<CardGroup cols={2}>
  <Card title="Basic Setup" icon="rocket" href="/docs/guides/sending-events/backend/gtm-server">
    Learn how to configure identifiers in the tag template.
  </Card>

  <Card title="Identity Resolution" icon="users-viewfinder" href="/docs/platform/features/processing/identity-resolution">
    Understand how OneView uses identifiers to build your Identity Graph.
  </Card>
</CardGroup>
