02/14/23

Clear Carts and Delete User Profiles with Segment

Happy Valentine’s Day! As gift from us to you, we’re excited to announce new capabilities with our Segment integration.
Ability to pass email address in the identify() and track() calls under context.traits
Can’t pass a customer’s email address at the top level of an identify() or track() call? No problem! You can now pass email address as part of context.traits. Email passed  under context.traits
analytics.identify("assigned-userId", {
 "name": "Stephen Noel",
 "plan": "premium",
 "logins": 5}, {"traits": { "email": "snoel@sailthru.com" }
});
 
Ability to clear stale carts with the track(“Product Added”) and track(“Product Removed”) calls
Need to make sure your abandoned cart messages don’t include stale products? Use the “clearIncompleteCartAfterNHours” parameter to compare the last time the cart was last updated to how long a cart should live. Any products that were added to the cart older than the specified time will be removed.
analytics.track('Product Added', {

"cart_id": "skdjsidjsdkdj29j",

"product_id": "507f1f77bcf86cd799439011",

...

"email": "xxxxxxx@example.com",

"clearIncompleteCartAfterNHours": 24

});
 
Ability to delete a user profile using a track(“User Deleted”) call
If you need to delete a Sailthru User Profile, easily call the analytics.track(“User Delete”) method with the appropriate email address.
analytics.track("User Deleted", {userId:"xxxxxx@example.com" }); 
  Find the updated documentation for Segment Destination here.
Top