> For the complete documentation index, see [llms.txt](https://docs.ownlayer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ownlayer.com/integrations/segment.md).

# Segment

## Configuring Segment Integration

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

<figure><img src="/files/n82ihIQZtV1SkjiKKx2r" 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="/files/YejNMPkTftzhmEq6QrG2" 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.
