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

# Segment Setup Guide

> This guide walks you through connecting PlayerZero to Segment to capture user sessions and events without changing your frontend code.

## Prerequisites

* Access to Segment’s **Destination catalog**
* Your PlayerZero [API Key](https://playerzero.ai/current-org/settings/projects/current-project/api-tokens).

## Step-by-Step Instructions

### 1. Visit the PlayerZero Destination Page in Segment

<Card
  title="PlayerZero destination in Segment"
  icon={
<svg
  className="h-6 w-6"
  xmlns="http://www.w3.org/2000/svg"
  width="64"
  height="64"
  viewBox="0 0 64 64"
>
  <g transform="matrix(.768307 0 0 .768307 0 2.304922)">
    <path
      d="M51.9 52.8H4c-2.2 0-4-1.8-4-4s1.8-4 4-4h47.9c2.2 0 4 1.8 4 4s-1.8 4-4 4z"
      fill="#99cfac"
    />
    <path
      d="M41.7 77.3c-3.9 0-7.8-.6-11.5-1.7-2.1-.7-3.3-2.9-2.6-5s2.9-3.3 5-2.6c2.9.9 6 1.4 9.1 1.4 13.6 0 25.4-8.7 29.3-21.7.6-2.1 2.9-3.3 5-2.7s3.3 2.9 2.7 5c-5.1 16.3-19.9 27.3-37 27.3z"
      fill="#49b881"
    />
    <path
      d="M79.3 32.5H31.4c-2.2 0-4-1.8-4-4s1.8-4 4-4h47.9c2.2 0 4 1.8 4 4s-1.8 4-4 4z"
      fill="#99cfac"
    />
    <path
      d="M8.5 32.5c-.4 0-.8-.1-1.2-.2-2.1-.6-3.3-2.9-2.7-5C9.7 11 24.5 0 41.7 0c3.9 0 7.8.6 11.5 1.7 2.1.7 3.3 2.9 2.6 5s-2.9 3.3-5 2.6c-2.9-.9-6-1.4-9.1-1.4-13.6 0-25.4 8.7-29.3 21.7-.6 1.8-2.2 2.9-3.9 2.9z"
      fill="#49b881"
    />
    <g fill="#99cfac">
      <circle r="4" cy="13.3" cx="65.4" />
      <circle r="4" cy="64.1" cx="17.9" />
    </g>
  </g>
</svg>
}
  href="https://app.segment.com/goto-my-workspace/destinations/catalog/actions-playerzero-web"
>
  Open destination
</Card>

Once on the page:

* Click **Configure PlayerZero Web**
* Select your **source** (your website’s data source)
* Name the destination, e.g. `PlayerZero Web`
* You’ll end up on a configuration screen like this:

<img src="https://mintcdn.com/player-zero/8Gd3sUTWamfGq-Px/images/Screen_Shot_2022-10-19_at_11.51.06_AM.png?fit=max&auto=format&n=8Gd3sUTWamfGq-Px&q=85&s=e69da536aa558d683bcfcbc0f0f98fb7" alt="Segment Setup Step 1" width="1578" height="924" data-path="images/Screen_Shot_2022-10-19_at_11.51.06_AM.png" />

### 2. Add Your PlayerZero Project ID

* In PlayerZero, open your project settings and copy your **Project ID**
* Find the **Segment** section if it appears in your workspace
* In Segment, paste it into the `PlayerZero Project Id` field

### 3. Enable the Destination

Once configured:

* Click **Enable Destination**
* Then hit **Save Changes**

<img src="https://mintcdn.com/player-zero/8Gd3sUTWamfGq-Px/images/Screen_Shot_2022-10-19_at_11.52.23_AM.png?fit=max&auto=format&n=8Gd3sUTWamfGq-Px&q=85&s=a6dc9ddb41b8d006443fa6586d5af731" alt="Segment Setup Step 2" width="1557" height="930" data-path="images/Screen_Shot_2022-10-19_at_11.52.23_AM.png" />

That’s it! PlayerZero is now live via Segment.

## Configure Your Domains

You can further configure what PlayerZero collects by visiting the\
[Web Configuration](/docs/domain-controls) section of the dashboard.

Most teams use default settings, but advanced teams can fine-tune behavior here.

## What Happens Under the Hood

When you enable the PlayerZero Web destination in Segment, 3 things happen:

1. **Automatic SDK Injection**\
   Segment injects the PlayerZero snippet into your frontend. It will automatically:
   * Capture basic analytics (page views, button clicks)
   * Monitor frontend JS and API errors

2. **Forwarded `track()` Calls**\
   Any `analytics.track()` call you make via Segment is forwarded to PlayerZero — giving PlayerZero insight into business-level events.

3. **Forwarded `identify()` Calls**\
   Users identified through Segment are also automatically identified in PlayerZero.

***

You're done! PlayerZero will now work behind the scenes without requiring any frontend changes.
