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

# Using Segment.io as a Source

[Segment](https://segment.com/) is one of the most popular available "customer data platform"s - "CDP" for short. Segment serves as a centralized repository of user data, sourced from, and available to a variety of marketing, and analytics platforms - including Dittofeed.

Feed user data from Segment into Dittofeed to start sending users messages.

## Using a Self-Hosted Webhook Destination

You can send a self-hosted Dittofeed installation user data with a Segment webhook Destination.

<Info>Segment's [webhook destination documentation](https://segment.com/docs/connections/destinations/catalog/webhooks/).</Info>
<Tip>Check out Dittofeed's [guide on self-hosting](/deployment/self-hosted).</Tip>

Dittofeed receives segment data from its `POST /api/public/webhooks/segment` [endpoint](/api-reference/endpoints/webhooks/segment). To receive data from Segment, this path needs to be exposed to the internet by public dns.

Configure Segment to send its event payloads to your Dittofeed installation, [`POST /api/public/webhooks/segment`](/api-reference/endpoints/webhooks/segment). For example, `https://my-dittofeed-host.com/api/public/webhooks/segment`.

<Frame>
  <img src="https://mintcdn.com/dittofeed/abmbv2I9puhRd1Zb/images/segment-webhook-url.png?fit=max&auto=format&n=abmbv2I9puhRd1Zb&q=85&s=736067b54da2221390ce4b20d236f5fe" alt="Segment Webhook URL" width="1692" height="526" data-path="images/segment-webhook-url.png" />
</Frame>

Next add a shared secret to Segment.

<Tip> You can generate shared secrets using password generators, like [1password's](https://1password.com/password-generator/)</Tip>

<Frame>
  <img src="https://mintcdn.com/dittofeed/abmbv2I9puhRd1Zb/images/segment-shared-secret.png?fit=max&auto=format&n=abmbv2I9puhRd1Zb&q=85&s=0ae1e7eccabc1d53d6b97881a70c4b7c" alt="Segment Shared Secret" width="1708" height="536" data-path="images/segment-shared-secret.png" />
</Frame>

Finally, add that same shared secret to Dittofeed on the settings page `/dashboard/settings#segment-source`.

<Frame>
  <img src="https://mintcdn.com/dittofeed/MR-erTsdiKcJhyyj/images/dittofeed-segment-shared-secret.png?fit=max&auto=format&n=MR-erTsdiKcJhyyj&q=85&s=44c913f3e5e5b9d9a99a1cfc777c4ed8" alt="Dittofeed Segment Shared Secret" width="1104" height="624" data-path="images/dittofeed-segment-shared-secret.png" />
</Frame>

That's it. At this point your Segment payloads should be flowing through Dittofeed.
