Skip to content

Instantly share code, notes, and snippets.

https://profiles.segment.com/v1/spaces/<workspace_id>collections/users/profiles/user_id:<user_id>/traits
{
"data": [
{
"id": "albertsemail@segment.com",
"type": "email",
"source_id": "CJ3MHte3di",
"collection": "users",
"created_at": "2018-12-06T00:01:13.593504Z",
"encoding": "none"
},
Calling:
https://profiles.segment.com/v1/spaces/<workspace_id>/collections/users/profiles/mobile_id:albert-xyz/external_ids
Or:
https://profiles.segment.com/v1/spaces/<workspace_id>/collections/users/profiles/email:albertsemail@segment.com/external_ids
var variation = optimizelyClient.activate("web-mobile-experiment", userId);
const bucketingIdAttributes = {
domain: "SaaS",
$opt_bucketing_id: "segment123"
};
// Activate with the bucketing ID
var variationKey = optimizelyClient.activate(
"my_experiment",
userId,
bucketingIdAttributes
{
"traits": {
"domain": "SaaS",
"name": "Segment"
},
"cursor": {
"url": "",
"has_more": false,
"next": "",
"limit": 10
https://profiles.segment.com/v1/spaces/<workspace_id>/collections/accounts/profiles/group_id:segment123/traits
@asunwoo
asunwoo / parse_trait.js
Last active December 13, 2018 18:50
parse_trait.js
attribute = result['traits']['industry'];