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

# Segment

> Send Converge events to Segment

## Overview

Destination Type: Client-side and Server-side

The Segment destination sends your Converge events to Segment, using event names from the [Segment Ecommerce spec](https://segment.com/docs/connections/spec/ecommerce/v2/) where one exists. From there, you can route them to any tool connected to Segment.

Converge sends events in two ways:

* **Client-side:** Converge loads Segment's analytics.js on your site with your client write key, then sends browsing events like `Product Viewed` and `Checkout Started` from the browser.
* **Server-side:** Converge sends orders and subscription events from your server-side sources to the Segment Track API with your server write key.

Both use the same Segment `anonymousId` (the `ajs_anonymous_id` cookie), so Segment links browser and server events from the same visitor.

***

## Installation instructions

1. In Segment, copy the **write key** of the source you want browser events in. We recommend a **JavaScript** source. This is your client write key.

2. In Segment, copy the **write key** of the source you want server events in. We recommend an **HTTP API** source. This is your server write key.

3. In the Converge sidebar, click on **Destinations** and then click **Create new destination**.

4. Select the **Segment** destination and click **Next**.

5. Give your destination a **name** (e.g. Segment) and click **Next**.

6. Fill in the **Client write key** and **Server write key** and click **Next**.

7. If your Segment workspace uses EU data residency, open **Advanced configuration (optional)** and set **Segment region** to **EU**. Otherwise, server-side events won't arrive in your Segment source. Click **Next**.

8. Select **Use default mapping** and click **Next**.

> [!NOTE]
>
> You can find the default mapping for the Segment destination [here](#event-mapping). For more information on setting up custom mappings, look [here](https://docs.runconverge.com/destinations/event-mapping.md).

9. Select the sources you want to forward events from, then click **Next**.

10. Review any issues and click **Submit**.

> [!WARNING]
>
> Converge loads analytics.js for you. Remove any Segment snippet you added to your site yourself, or Segment receives events from both.

***

## Configuration

Open your Segment destination, click **Configuration**, and open the **Advanced configuration (optional)** or **Custom properties (optional)** section.

| Setting | What it does |
| - | - |
| Conversion amount | Which revenue value Converge sends with conversion events. See [Conversion amount](https://docs.runconverge.com/destinations/conversion-amount.md). |
| Segment region | **US** (default) or **EU**. Sets the endpoint for server-side events. Must match your Segment workspace's data residency, or server-side events won't arrive. |
| Enable OneTrust consent wrapper | Loads analytics.js through Segment's [OneTrust consent wrapper](https://www.twilio.com/docs/segment/privacy/consent-management/configure-consent-management). Use it if you manage consent with OneTrust. |
| Custom Event Properties | Map a Converge event property to a Segment event property name. |
| Custom Product Properties | Map a Converge product property to a Segment product property name. |

***

## Converge functionality

This integration supports the following Converge destination functionality.

| Converge Feature | Supported |
| :- | :-: |
| [Custom Events](https://docs.runconverge.com/destinations/event-mapping.md#event-mapping-modes) | |
| [Filters](https://docs.runconverge.com/destinations/filters.md) | |
| [Server-side Conversions](https://docs.runconverge.com/destinations/event-mapping.md#forwarding-modes) | |
| [Conversion amount](https://docs.runconverge.com/destinations/conversion-amount.md) | |

***

## Event mapping

Converge automatically maps the following events to Segment. Events without a link aren't documented in the [Converge event spec](https://docs.runconverge.com/sources/converge-spec.md) yet, but Converge forwards them when your sources send them.

| Converge Event Name | Segment Event Name | Sent from |
| - | - | - |
| [\$page\_load](https://docs.runconverge.com/sources/converge-spec.md#%24page_load) | `Page` (a Segment page call) | Browser |
| [Viewed Product](https://docs.runconverge.com/sources/converge-spec.md#viewed-product) | `Product Viewed` | Browser |
| Selected Product | `Product Clicked` | Browser |
| [Viewed Collection](https://docs.runconverge.com/sources/converge-spec.md#viewed-collection) | `Product List Viewed` | Browser |
| [Added To Cart](https://docs.runconverge.com/sources/converge-spec.md#added-to-cart) | `Product Added` | Browser |
| [Removed From Cart](https://docs.runconverge.com/sources/converge-spec.md#removed-from-cart) | `Product Removed` | Browser |
| Added To Wishlist | `Product Added to Wishlist` | Browser |
| Removed From Wishlist | `Product Removed from Wishlist` | Browser |
| [Viewed Cart](https://docs.runconverge.com/sources/converge-spec.md#viewed-cart) | `Cart Viewed` | Browser |
| [Started Checkout](https://docs.runconverge.com/sources/converge-spec.md#started-checkout) | `Checkout Started` | Browser |
| Added Contact Info | `Checkout Step Completed` | Browser |
| Added Shipping Info | `Checkout Step Completed` | Browser |
| [Added Payment Info](https://docs.runconverge.com/sources/converge-spec.md#added-payment-info) | `Payment Info Entered` | Browser |
| [Searched](https://docs.runconverge.com/sources/converge-spec.md#searched) | `Products Searched` | Browser |
| [Logged In](https://docs.runconverge.com/sources/converge-spec.md#logged-in) | `Signed In` | Browser |
| [Signed Up](https://docs.runconverge.com/sources/converge-spec.md#signed-up) | `Signed Up` | Browser |
| Subscribed To Newsletter | `Newsletter Subscribed` | Browser |
| [Placed Order](https://docs.runconverge.com/sources/converge-spec.md#placed-order) | `Order Completed` | Server |
| Received Refund | `Order Refunded` | Server |
| [Started Subscription](https://docs.runconverge.com/sources/converge-spec.md#started-subscription) | `Subscription Started` | Server |
| [Placed Recurring Subscription Order](https://docs.runconverge.com/sources/converge-spec.md#placed-recurring-subscription-order) | `Recurring Subscription Order Completed` | Server |
| [Cancelled Subscription](https://docs.runconverge.com/sources/converge-spec.md#cancelled-subscription) | `Subscription Cancelled` | Server |
| Activated Subscription | `Subscription Activated` | Server |

***

## FAQ

> **Why don't server-side events show up in Segment?**
>
> Check the **Segment region** setting first. If your Segment workspace uses EU data residency and the destination is set to **US**, Converge sends server-side events to Segment's US endpoint, so your EU workspace never receives them. Also check that the **Server write key** belongs to the source you expect.

> **Does Converge send user IDs or traits to Segment?**
>
> No. Converge sends events with Segment's `anonymousId` only. Browser events use the `ajs_anonymous_id` cookie. Server events use the same ID when Converge has seen it for that visitor, otherwise an ID based on the Converge profile.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.