Segment Integration
Segment simplifies collecting and using data from the users of your digital properties (websites, apps, etc). Using it, you can collect, transform, send, and archive your first-party customer data.
The Recombee destination in Segment can send your interaction data (views, purchases, plays, etc.) to Recombee.
This page describes the new version of the Recombee Destination in Segment, called just Recombee. For documentation of the old version, called Recombee AI, visit the Segment Documentation.
Getting Started
-
In the Segment web app, navigate to Connections > Destinations and click Add Destination.
-
Find and select Recombee and click Add Destination.
-
Select a Source to connect to the Recombee destination.
-
Navigate to the Recombee Admin UI and complete the following actions:
- Choose the Recombee Database where you want to send the interactions.
- Click Settings in the menu on the left.
- In the API ID & Tokens settings section, find the Database ID and the Private Token of the Database.
-
Back in the Segment app, navigate to the settings page of the Recombee destination you created.
- Copy the Database ID from the Recombee Admin UI and paste it into the Database ID field in the destination settings.
- Copy the Private Token from the Recombee Admin UI and paste it into the Private Token field in the destination settings.
Once you send the data from Segment to the Recombee destination, you can:
- Open the KPI console of the Recombee Admin UI to see the numbers of the ingested interactions (updated in realtime).
- Select the ID of an Item (or User) in the Items (or Users) catalog section in the Admin UI to view a specific ingested interaction.
Settings
The ID of the Recombee Database into which the interactions will be sent.
The private token for the Recombee Database used.
The Recombee cluster where your Database is located. Learn more
URI of the Recombee API that should be used. Keep this field empty unless you are calling the Recombee cluster based in a specific region or you were assigned a custom URI by the Recombee Support team.
Supported Mappings
Page
If you're new to the Segment Spec, check out the Page method documentation to understand how it works. Here's an example of a Page method call:
analytics.page();
Segment sends Page calls to Recombee as a Detail View.
Track
If you aren't familiar with the Segment Spec, take a look at the Track method documentation to learn about what it does. Here's an example:
analytics.track('Video Content Playing', {
session_id: '12345',
asset_id: '0129370',
position: 20,
total_length: 360,
recomm_id: 'ce52ada4-e4d9-4885-943c-407db2dee837',
});
The Recombee Destination can process several Semantic Events.
Supported Ecommerce events:
Segment Event | Sent Interaction |
---|---|
Product Viewed | Detail View |
Product Added | Cart Addition |
Product Removed | Delete Cart Addition |
Order Completed | Purchase for each of the ordered products |
Product Added to Wishlist | Bookmark |
Product Removed from Wishlist | Delete Bookmark |
Product Shared | Bookmark |
Supported Video events:
Segment Event | Sent Interaction |
---|---|
Video Playback Started | View Portion with portion = 0 |
Video Content Playing | View Portion with portion = position / total_length |
Video Playback Paused | View Portion with portion = position / total_length |
Video Playback Completed | View Portion with portion = 1 |
If you want to send interactions from other types of events, you can create your own custom mappings in the Segment web app. Learn more below
Screen
For more details on the Screen method, refer to the Screen method documentation. Here's an example call:
[[SEGAnalytics sharedAnalytics] screen:@"Home"];
Segment converts Screen calls to Detail View interactions.
Alias
For information about Alias, visit the Alias method documentation. Here's an example of an Alias call:
analytics.alias('507f191e81');
These Alias calls are mapped to Merge Users calls.
Delete User
Segment sends a Delete User call to Recombee on deleting a user. All the associated data associated with the user (including interactions) are removed from Recombee.
Custom Mappings
The new Action Destinations framework in Segment, which this integration uses, allows you to create custom mappings for your events directly in the Segment web app.
To create a custom mapping, open the destination in the Segment web app, navigate to the Mappings tab, and click New Mapping.
You can add a predefined mapping, but more importantly, right below the predefined mappings, there is a list of all available actions that you can use to create your own custom mappings.
After selecting an action, you can continue below the list and configure the mapping.
There you can define the event trigger, the fields of the event, and how they correspond to the fields of the interaction.
Reporting successful recommendations
You can inform Recombee that a specific interaction resulted from a successful recommendation
(meaning the recommendations were presented to a user, and the user clicked on one of the items)
by setting the ID of the successful recommendation request in the Recommendation ID
field of the action
(this is the recomm_id
property by default).
You can read more about this setting in Reported Metrics.
Sending the Recommendation ID
gives you precise numbers about successful recommendations
in the KPI section of the Recombee Admin UI.
This explicit feedback also helps improve the output of the recommendation models.