# Segment

## Configuring Segment Integration

* Navigate to your organization's integration settings.
* Select the Segment integration option.

<figure><img src="https://2399115798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWsdxCCToJ5K2nk2ZZvqc%2Fuploads%2FAzCdjJtql8mlaq5NMmWX%2FScreenshot%202024-10-01%20at%201.41.28%E2%80%AFPM.png?alt=media&#x26;token=19790c87-0a17-4bfc-a8f1-67ddcc4c6f63" alt="" width="563"><figcaption></figcaption></figure>

* Enter your Segment Write Key.
* Choose the specific events you want to send to Segment.
* Save your configuration.

<figure><img src="https://2399115798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWsdxCCToJ5K2nk2ZZvqc%2Fuploads%2FmLsR2UxznQRGrrdOBs69%2FScreenshot%202024-10-01%20at%201.38.39%E2%80%AFPM.png?alt=media&#x26;token=b12cb0d6-25d0-40dd-b777-56e940fc99d7" alt="" width="375"><figcaption></figcaption></figure>

When creating an inference, add a `segment` attribute to the `additional_metadata` field with the following structure:

<pre class="language-json"><code class="lang-json">{
    additional_metadata:{
        segment:{
            user_id:"82az9ddoi34fski29375fjnafd",
            event:"Evaluation Pass",
            properties: {
            },
<strong>            integrations: {    
</strong>            }
        }
    }
}
</code></pre>

The `segment` object should include a `user_id` which is required and represents the ID of the user you're tracking.&#x20;

You can optionally specify an `event` name (if not provided, it uses the default event names).&#x20;

The `properties` object can contain any additional properties you want to track.&#x20;

The `integrations` object allows you to specify which integrations to send this event to.

Refer to Segment documentation for more details on properties and integrations.
