Frigade supports bidirectional reads and writes from Segment. This guide shows you how to get started with both in a few minutes.

Sending Segment data to Frigade

You can set up Frigade as a destination for Segment identify, group, and track calls by using Webhooks as a destination.

Step 1: Add webhook destination

Log in to your Segment account, open workspace, and select source. Click on Add Destination and search and select Webhooks.

Step 2: Create mapping

Next after creating the destination, click the Mappings tab and add a new mapping:

Step 3: Select event types to send to Frigade

Select the event types you want to send to Frigade. In this example we select identify, group, and track, but you can select any event type you want to send to Frigade.

Step 4: Add Frigade Webhook URL

Fill out the Select mappings as shown below using:

  • https://api.frigade.com/v1/thirdParty/cdp/segment as the URL
  • POST as Method
  • 100 as Batch Size. Note: if you send fewer than 500 events per day, it is recommended to set this to a lower value to avoid delays in sending events to Frigade.
  • Your secret Frigade API key (it will be the one prefixed with api_private). This key can be found in the dashboard under API Keys
  • Authorization as the key

Finally, set Enable Batching? to Yes. Optionally, you can send a test event to verify that the webhook is working. Click Save to save the webhook.

Step 5: Turn on the webhook

Finally, turn on the webhook by turning on the mapping you just created. Then, open the Settings tab and enable the Destination.

Congratulations! You have successfully set up Frigade as a destination for Segment. You can now use Frigade’s Targeting with your Segment data to create personalized experiences for your users.

Sending Frigade data to Segment

Frigade also supports sending user and organization events from Frigade Flows to Segment.

To send events to your Segment instance, select Add Source and then HTTP API. Then, copy your Segment write key.

Next, go to your Frigade dashboard and select Integrations. Click Add Integration and select Segment.

You will be asked to enter your Segment write key. Click Save to save the integration. Shortly after, events will start streaming from Frigade in real-time.

Latency

There will always be a lag between when an event is sent to Segment and when it is available in Frigade. This lag is usually less than 2 seconds, but can be more depending on the batch size and the number of events being sent to Segment. To decrease latency, you can decrease the batch size in Segment.

If you have a strong read-after-write consistency requirement, you can consider using the Frigade API to send events to Frigade directly or use the SDK to send events to Frigade from your application (such as the useFlows or useUser hook).