Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

ABsmartly (Actions) Destination


Destination Info
  • Accepts Page, Alias, Group, Identify and Track calls.
  • Refer to it as ABsmartly (Actions) in the Integrations object
  • This integration is partner owned. Please reach out to the partner's support for any issues.

ABsmartly(link takes you to an external page) provides an on-premise, full-stack experimentation platform for engineering and product teams that do continuous experimentation embedded into their development process. ABsmartly's real-time analytics help engineering and product teams ensure that new features will improve the customer experience without breaking or degrading performance and/or business metrics.

This destination is maintained by ABsmartly. For any issues with the destination, contact ABsmartly's Support.


Benefits of ABsmartly (Actions) vs ABsmartly Classic

benefits-of-absmartly-actions-vs-absmartly-classic page anchor
  • Easier Setup: Actions-based destinations are easier to configure with clear default settings, letting you quickly get started.
  • Control and clearer mapping: Actions-based destinations enable you to define the mapping between the data Segment receives from your source and the data Segment sends to ABsmartly.

  1. From the Segment web app, click Catalog.
  2. Search for "ABsmartly" in the Catalog, select ABsmartly (Actions), and choose which of your sources to connect the destination to.
  3. Add the following Connection Settings:
    • Collector Endpoint: Your ABsmartly Collector REST Endpoint. Usually https://<your-subdomain>.absmartly.io/v1
    • API Key: An existing API Key. Created under Settings > API Keys in the ABsmartly Web Console.
    • Environment: The environment where the events are originated matching an existing environment in ABsmartly. Created under Settings > Environments in the ABsmartly Web Console.
  4. Enable the Track Calls mapping to send events to ABsmartly.

Property nameTypeRequiredDescription
API Keystring
required

ABsmartly SDK API Key. Create SDK Api Keys in the Settings > API Keys section of the ABsmartly Web Console


Collector Endpointstring
required

ABsmartly Collector endpoint, for example: https://you-subdomain.absmartly.io/v1 - Contact ABsmartly Support if you don't know your Collector Endpoint.


Environmentstring
required

Environment name. Environment name needs to match what's in the Web Console. Create Environments in the Settings > Environments section of the ABsmartly Web Console


ABsmartly (Actions) has the following presets

Preset NameTriggerDefault Action
Page CallsEvent type = "page"Track Goal
Exposures (Verbatim)Event type = "track" and event = "Experiment Viewed"Track Exposure
Screen CallsEvent type = "screen"Track Goal
Track CallsEvent type = "track" and event != "Experiment Viewed"Track Goal

Build your own Mappings. Combine supported triggers with the following ABsmartly-supported actions:

(information)

Mapping limits per destination

Individual destination instances have support a maximum of 50 mappings.

Track Exposure

track-exposure page anchor

Send an experiment exposure event to ABsmartly

Track Exposure is a Cloud action. The default Trigger is type = "track" and event = "Experiment Viewed"

Property nameTypeRequiredDescription
ABsmartly Exposure PayloadOBJECT
required

The ABsmartly exposure payload without any goals. Generated by the ABsmartly SDK and should not be modified.


AgentSTRING

Optional

Optional agent identifier that originated the event. Used to identify which SDK generated the event.


ApplicationSTRING

Optional

Optional application name that originated this event. Must exist if not empty. Create Applications in the Settings > Applications section of the ABsmartly Web Console

Send a goal event to ABsmartly

Track Goal is a Cloud action. The default Trigger is type = "track" and event != "Experiment Viewed"

Property nameTypeRequiredDescription
UnitsOBJECT
required

The units of the goal to track. Mapping of unit name to source property in the event payload. Create Units in the Settings > Units section of the ABsmartly Web Console


Goal NameSTRING
required

The name of the goal to track


Goal PropertiesOBJECT
required

Custom properties of the goal


AgentSTRING

Optional

Optional agent identifier that originated the event. Used to identify which SDK generated the event.


ApplicationSTRING

Optional

Optional application name that originated this event. Must exist if not empty. Create Applications in the Settings > Applications section of the ABsmartly Web Console

(information)

Info

If you need support setting things up, you can contact the ABsmartly support team on Slack or via email.


Sending exposures to Segment

sending-exposures-to-segment page anchor

It can be useful to send experiment exposures to Segment for visibility from other destinations. The Segment Spec includes the Experiment Viewed semantic event for this purpose.

(information)

Info

By default, the Track Calls mapping will filter and not send any events with the name Experiment Viewed to ABsmartly.

You can install a custom event logger(link takes you to an external page) in ABsmartly and send exposures directly to Segment.

1
analytics.ready(function() {
2
// initialize ABsmartly SDK
3
const sdk = new absmartly.SDK({
4
endpoint: 'https://your-absmartly-endpoint.absmartly.io/v1',
5
apiKey: '<YOUR-API-KEY>',
6
environment: 'development',
7
application: 'YOUR-APP',
8
eventLogger: (context, eventName, data) => {
9
if (eventName == "exposure") {
10
// filter only relevant and interesting exposures
11
// if the assigned flag is false, this exposure was a treatment call that did not result in an assignment
12
// this can happen if, for example, the experiment is no longer running, but treatment() calls are still in the application code
13
if (exposure.assigned) {
14
analytics.track("Experiment Viewed", {
15
experiment_id: exposure.id,
16
experiment_name: exposure.name,
17
variation_id: exposure.variant,
18
variation_name: "ABCDEFG"[exposure.variant],
19
});
20
}
21
}
22
},
23
});
24
25
const context = sdk.createContext(request);
26
context.attribute("user_agent", navigator.userAgent);
27
28
context.ready().then((response) => {
29
console.log("ABSmartly Context ready!");
30
console.log(context.treatment("test-exp"));
31
}).catch((error) => {
32
console.log(error);
33
});
34
});

Publishing experiment exposures through Segment

publishing-experiment-exposures-through-segment page anchor

To publish experiment exposures through Segment, you must first configure and enable the Exposures (Verbatim) mapping in your ABsmartly (Actions) destination.

By enabling the Exposures (Verbatim) mapping in Segment, you replace the direct flow of exposure events from the ABsmartly SDK to the ABsmartly collector and instead send them to Segment for processing by the destination function.

This can be achieved by instantiating the ABsmartly SDK with a custom context publisher.

The custom publisher will publish an Experiment Viewed Segment event with ABsmartly's exposure data in the properties.exposure field as well as the normal semantic data that Segment recommends for this event.

Here is an example in Javascript.

1
analytics.ready(function() {
2
// initialize ABSmartly SDK
3
const sdk = new absmartly.SDK({
4
endpoint: 'https://your-absmartly-endpoint.absmartly.io/v1',
5
apiKey: '<YOUR-API-KEY>',
6
environment: 'development',
7
application: 'YOUR-APP',
8
});
9
10
// ABSmartly publisher implementation that publishes ABSmartly exposures to Segment,
11
// instead of directly to the ABSmartly Collector
12
// these will then be pushed by the ABSmartly segment integration to the ABSmartly collector
13
class SegmentContextPublisher extends absmartly.ContextPublisher {
14
constructor(segment) {
15
super();
16
17
this._segment = segment;
18
}
19
20
publish(request, sdk, context) {
21
// NOTE: only exposures are expected to come via this route
22
// other types of events should be tracked through the Segment API
23
if (request.exposures) {
24
for (const exposure of request.exposures) {
25
this._segment.track(`Experiment Viewed`, {
26
experiment_id: exposure.id,
27
experiment_name: exposure.name,
28
variation_id: exposure.variant,
29
variation_name: "ABCDEFG"[exposure.variant],
30
exposure: Object.assign({},
31
{
32
exposures: [exposure],
33
},
34
// add anything else in the a/b smartly payload that are not exposures or goals
35
...Object.entries(request)
36
.filter(e => (e[0] !== 'exposures') && (e[0] !== 'goals'))
37
.map(e => ({[e[0]]: e[1]}))
38
)
39
});
40
}
41
}
42
43
return Promise.resolve();
44
}
45
}
46
47
// set this as the default publisher - all contexts created from now on will use it by default
48
sdk.setContextPublisher(new SegmentContextPublisher(analytics));
49
50
const request = {
51
units: {
52
userId: analytics.user().id(),
53
anonymousId: analytics.user().anonymousId(),
54
},
55
};
56
57
window.context = sdk.createContext(request);
58
context.attribute("user_agent", navigator.userAgent);
59
60
context.ready().then((response) => {
61
console.log("ABSmartly Context ready!");
62
console.log(context.treatment("test-exp"));
63
}).catch((error) => {
64
console.log(error);
65
});
66
});

Migration from the classic ABsmartly destination

migration-from-the-classic-absmartly-destination page anchor

To migrate from the classic ABsmartly destination to ABsmartly (Actions), disconnect the classic ABsmartly destination before enabling the ABsmartly (Actions) destination to avoid duplicate experimentation events.


You can send computed traits and audiences generated using Engage to this destination as a user property. To learn more about Engage, schedule a demo(link takes you to an external page).

For user-property destinations, an identify call is sent to the destination for each user being added and removed. The property name is the snake_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property order_completed_last_30days: true. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to false.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

(information)

Real-time to batch destination sync frequency

Real-time audience syncs to ABsmartly (Actions) may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.


Segment lets you change these destination settings from the Segment app without having to touch any code.

Property nameTypeRequiredDescription
API Keystring
required

ABsmartly SDK API Key. Create SDK Api Keys in the Settings > API Keys section of the ABsmartly Web Console


Collector Endpointstring
required

ABsmartly Collector endpoint, for example: https://you-subdomain.absmartly.io/v1 - Contact ABsmartly Support if you don't know your Collector Endpoint.


Environmentstring
required

Environment name. Environment name needs to match what's in the Web Console. Create Environments in the Settings > Environments section of the ABsmartly Web Console