Mutiny has a robust integration with Segment that allows you to do a number of things, including building personalization based on your Segment data, tracking Segment events in Mutiny as conversion events, and working to better identify the users on your site. This document will give an overview of the integration.
Reading data from Segment
As part of this integration, you'll be setting up Mutiny as a destination for various sources that are already set up in your Segment account. Once completed, we'll be able to read different types of data to be used in Mutiny, specifically, traits and events.
Traits
Segment traits are essentially different pieces of information that you can attach to your users. A trait could indicate a user's email, or whether or not they're a current customer. You can learn more about Segment traits here.
Once you've set up the integration, you'll be able to pull in traits to Mutiny so that you can build Mutiny segments off of that data, or insert that data dynamically into your experiences.
Additionally, Mutiny can read your "email" trait in order to help further identify users and match them back to records in Salesforce. You can learn more about identification here.
Conversions
Once you set up your integration, you can set up any of your Segment events as conversions in Mutiny. Read more about setting up these conversions here.
Writing data to Segment
In addition to reading data from Segment, Mutiny will also automatically send data from your website into Segment.
Identify
Mutiny maintains a unique identifier for every visitor that comes to a webpage running the Mutiny JS client. This identifier is stored in a cookie and persisted across sessions and return visits. Segment also maintains an "anonymousId" that tracks visitors across sessions, and we associate Mutiny's visitor id and Segment's anonymousId using an identify call like this:
analytics.identify(null, { mutinyVisitorId: '1234' });
This allows the Mutiny visitor id to be associated with the user as a Segment trait, and later associated with events deeper in the funnel once the user has been identified or converted. By calling identify with null as the userId, we maintain the visitor's anonymous identity to allow you to associate your own database ID when they register.
Track
In addition to an identify call, Mutiny will also use a Segment "track" call to indicate when a user sees an experience. For a personalized view, track is called like this:
analytics.track('Mutiny Experience Viewed', {
experience: 'Corporate Website Experiment',
audienceSegment: 'Small company',
personalized: true,
});
For a control view, track is called like this:
analytics.track('Mutiny Experience Viewed', {
experience: 'Corporate Website Experiment',
audienceSegment: 'Small company',
personalized: false,
});
This allows downstream analytics sources to find all users who were identified in a particular audience segment, and see how conversion is affected for personalized vs control groups. We track these views as events, instead of associating traits on the user level, so we have a historical record that represents how experiences and audience segments change over time.
Next Steps
Now that you understand how Mutiny will use your Segment data, head on over to this article to set up your integration.
Comments
0 comments
Please sign in to leave a comment.