Segment

Destination/Base URL: To send data to your Xoal account from Segment, use the following API endpoint as your destination:

https://api.xoal.io/ingest/v1/segment/event

HTTP Method:

POST

Authentication: Use the following key: value pairs in your headers to authenticate requests:

{
  “Authorization” : “Bearer your_ingestion_API_Key”,
  “Content-Type” : “application/json”
}

Pay attention to capitalisation used in the headers.

Get data ingestion key

To obtain your_ingestion_API_Key, click the "Settings" bottom left of your Xoal dashboard, select ‘Webhook & API’. In the API section, click ‘New API key’ in the top right corner. In the box that appears, give the API Key a name, e.g ‘API key for Segment ingestion then select ‘Data ingestion’ for the API type and click ‘Create key’ as shown below:

Once the key is created, copy it and use in your header. A typical ingestion key looks like this:

ing_9busllahgyplx8d7vzaxbaut9eox75yu

In SUMMARY, your setup should look like this:

{
 “Authorization” : “Bearer ing_9busllahgyplx8d7vzaxbaut9eox75yu”, 
 “Content-Type” : “application/json”
}

Setting up Segment to send data to Xoal

Login to your Segment dashboard > Connections. On the Destinations, click on “+Add More”.

Type “webhook” in the search bar and select Webhooks (Actions). Click Next to continue.

Select a source or create a new one. Then click Next to continue.

Give this destination a name. Eg. Send data to Xoal

Then click on Done.

Now that we have created the destination, it is time to set it up to send data to Xoal. Go to Connection > Destinations and select the destination you just created now.

Click on Mapping, then New Mapping.

Select Send HTTP request.

Select all the event types to send. We currently accept 3 event types:

  • Identify

  • Track

  • Page

Scroll down to configure the webhook request. Enter the values below in each of the fields.URL: https://api.xoal.io/ingest/v1/segment/eventMethod: POSTBatch size: 100Headers:

{
   “Authorization” : “Bearer your_ingestion_API_Key”, 
   “Content-Type” : “application/json”
}

Click Save when you are done.

Click save and that’s it! You have configured Segment to work with Xoal.

Last updated