[FE&R] Sending AB Tasty events to Segment
This guide explains how to configure AB Tasty server-side events to be forwarded to Segment (SegmentIO).
1
2
3
Visitor ID requirement
For AB Tasty to send events to Segment, the visitor ID must be known by Segment.
This means the visitor must first be identified or tracked by Segment before AB Tasty sends events.
Identify the Visitor in Segment
Example:
analytics.identify('YOUR_VISITOR_ID', {
email: "user@example.com",
name: "John Doe"
});This ensures Segment associates events with the correct user.
Retrieve the Visitor ID from Segment
If Segment is already running on the website, you can retrieve the visitor identifier.
Anonymous ID
window.analytics.user().anonymousId();User ID (if identified)
window.analytics.user().userId();4
Send the Visitor ID to AB Tasty
The same visitor ID used in Segment must be used when calling the AB Tasty Decision API.
Example:
visitorId = window.analytics.user().anonymousId()Then pass it to the Decision API request.
If the visitor ID used by AB Tasty does not match the one known by Segment, the event will not be forwarded to Segment.
Last updated
Was this helpful?

