Articles on: Integrations

How to Connect Crisp with Segment.com

Articles on: Integrations


Crisp provides a Segment.com integration, that is included in all our Unlimited plan. The Segment integration lets you sync all your data from third-party sources to Crisp using Segment. Meaning Crisp is a destination.

Segment integration is available from the Crisp Unlimited plan


Connect to your Crisp Dashboard


  • Click “Connect to Segment”. You will be redirected, then select your workspace and source and click allow.

  • Crisp should be then able to receive data to Segment


Creating a contact on Crisp using Segment


To create a contact on Crisp using segment you need to use the Identify method. Here is an example:


undefined analytics.identify('userId123', { name: 'John Doe', email: 'john.doe@segment.com', phone: '012346789', avatar: 'https://pbs.twimg.com/profile_images/834424630630817795/TfyS4uXb_400x400.jpg' });


When you call identify, the name, email, avatar, and phone traits included in the call will be set to the current user in Crisp.

You can then see your contact using the Contact section on Crisp

Note that the email Trait is mandatory to create a Crisp contact.


Tracking events on a Crisp contact using segment


At this time, tracking Events has been disabled and is not available. Instead, use the Javascript SDK to push data and information about users.

To track events on a Crisp contact you need to use the Track method from the Segment SDK. An example call would look like:


undefined analytics.track('Completed Purchase', { revenue: 42.99, shippingMethod: '2-day', category: 'Conversion' });


This method is very similar to Event method from the Crisp JS SDK (https://help.crisp.chat/en/article/how-can-i-push-user-events-pxu9vm/)


How to identify conversations


The segment integration identifies contacts & events, however as conversations are located on the Frontend the only way to identify conversations is by using this snippet:


undefined analytics.on("identify", function(event, properties, options) { if (properties.email) { $crisp.push(["set", "user:email", properties.email]); } if (properties.name) { $crisp.push(["set", "user:nickname", properties.name]); } });


Updated on: 21/05/2024

Updated on: 19/07/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!