How can I automatically set user segments?
If you are using Crisp on a website where users are authenticated, you may want to set their segment.
This method uses the Crisp JavaScript API, that you can call from your own code. Thanks to segment, you'll be able to group users based on their interactions with your website or your software.
It will be then super useful when targeting them later on to send them marketing campaign.
**Here's how you would proceed to set the visitor's data: **
// Feed this call with your own internal segment.
$crisp.push(["set", "session:segments", [["registered_users", "lead"]]])
Updated on: 03/03/2025
Thank you!