Getting Started

Steps to integrate Segment with WebEngage:

You will be required to provide the API key if you intend on sending any via WebEngage’s server-side component. The API key can be found in your WebEngage dashboard on the top right under Integrations > REST API. If you don’t have a WebEngage account, you can create one here.

If you’d like to use leverage the client-side web or mobile bundled SDKs, please enter your License Code. WebEngage only needs the License Code you want to enable the device/packaged Integration which will allow you to leverage WebEngage’s in-app and push notification functionality.

Do note that WebEngage for Mobile supports only the Identify and Track methods.

Android

To install the WebEngage-Segment integration, simply add this line to your app’s build.gradle file:

compile 'com.webengage:android-segment:2.+'

After adding the dependency, you must register the WebEngage’s destination in your Segment’s Analytics instance. To do this, import the WebEngage integration:

Page

This is only supported on the client side web component. Sending page events via server side integration is not supported.

Identify

When a user is identified, Segment will send that user’s information to WebEngage, wherein a user will be created/updated. The anonymousId must be present in case of an anonymous user and userId in case of an identified user. We will map semantic traits such as your first name, email, gender, etc and also send along any custom traits.

Track

When you track an event, Segment will send that event and its properties to WebEngage. Each event will have the necessary data about the user (anonymousId and userId) who performed the event.

An event name can be maximum 50 characters long. Event attribute values can be booleans, numbers, strings and dates only. The maximum length of attribute names is 50 characters and of String data type attribute values is 1000 characters.

You cannot start your event or event attribute names with we_.

In an account, events can have at most 25 attributes of each data type type (i.e. 25 String type attributes, 25 Number type attributes etc.) across all instances of a particular event.

In-App Notifications

Proguard

Personas

You can send computed traits and audiences generated through Segment Personas to this destination as a user property. To learn more about Personas, reach out for a demo.

For user-property destinations, an identify call will be sent to the destination for each user being added and removed. The property name will be the snake_cased version of the audience name you provide with a true/false value. For example, when a user first completes an order in the last 30 days, we will send an identify call with the property order_completed_last_30days: true, and when this user no longer satisfies we will set that value to false.

When the audience is first created an identify call is sent for every user in the audience. Subsequent syncs will only send updates for those users which were added or removed since the last sync.

Supported Sources and Connection Modes

Web

Mobile

Server

📱 Device-based

✅

✅

☁️ Cloud-based

✅

✅

To learn more about about Connection Modes and what dictates which we support, see here.

Segment offers an optionalDevice-based Connection Mode for Mobile data with WebEngage. If you’d like to use those features that require client-based functionality, follow the steps above to ensure you have packaged the WebEngage SDK with Segment’s.

Settings

Segment lets you change these destination settings via your Segment dashboard without having to touch any code.

API Key

Required if you are sending data to WebEngage via their server-side component.

License Code

Required only if you are loading WebEngage client side on your web browser or via the bundled mobile SDKs. You can find your License Code in your WebEngage account.

If you have any questions, or see anywhere we can improve our documentation, please let us know!