Segment>Split integration: Map identity to a trait?
Hi, I have Split set up on a B2C where all splits are at the "company" level.
In our Segment integration, users are uniquely identified with a user_id and the company_id is passed a trait.
I would like to send Segment events to Split in order build metrics. Unfortunately, I'm not able to map the Split company_id to the matching Segment trait. The current configuration page only allows matching to Segment's anonymous_id or user_id.
Any ideas on how to get company-level success metrics using segment data?
-
Hi Remi,
We have a doc article that provide steps how to send events from Segments account id trait to Split account traffic type: https://help.split.io/hc/en-us/articles/360021218331-Segment-Integrating-Segment-with-Split-using-Account-Traffic-Type
Please let me know if you have any questions.
Thanks
Bilal
-
I have 2 more questions for you Bilal:
#2 It seems that I can pass split traffic type definitions through track() properties or group() traits. These make sense. Can I also pass them to identify() traits?
#3 Can I pass multiple split traffic types in one call? If so, should I usesyntax A:
{
...
"properties": {
"split": [{
"company": "318738",
"location": "1234"
}],
...
"type": "track",
"userId": "318738-325351",
"originalTimestamp": "2015-12-12T19:11:01.152Z"
}
or syntax B:
{
...
"properties": {
"split": [
{ "company": "318738" },
{ "location": "1234" }
],
...
"type": "track",
"userId": "318738-325351",
"originalTimestamp": "2015-12-12T19:11:01.152Z"
} -
Hello Remi,
Question 2: "Can I use identify() to pass traffic type traits?"
No.
I would also caution that I do not fully understand how the Segment group call is supposed to interact with traffic types. I believe that for your use case, using extra properties in track events to identify the key for a particular traffic type under which to register that event is the way to go.
Question 3: "Can I pass multiple split traffic types in one call?"
Yes, and the syntax to use is syntax B. Here's how it looks in my JS code:
analytics.track("Memo_added", {priority: memoPriority, split: [{partner: "partner-0000"},{ga_anonymous: "ga_id_123"}]});
That call produces three events in split, all with different traffic types and keys (but the same other data):
Of course, in your code you would want to use variables for the key value rather than literals like I did.
Hope this helps.
-- Channing
Please sign in to leave a comment.
Comments
6 comments