WebEngage Destination

WebEngage quick info

WebEngage accepts Page, Identify, and Track calls. If you reference it in the Integrations object, call it “WebEngage”.

WebEngage accepts device-mode data from both Analytics.js and mobile sources. It does not accept data in cloud-mode.

This integration is maintained by WebEngage Support.

Getting Started

Steps to integrate Segment with WebEngage:

You will be required to provide the API key if you intend on sending any using 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.

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

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


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:

 import com.webengage.sdk.android.integrations.segment.WebEngageIntegration;

And add the following line:

analytics = new Analytics.Builder(this, "YOUR_SEGMENT_WRITE_KEY")


To install the Segment-WebEngage integration, simply add this line to your CocoaPods Podfile:

pod "Segment-WebEngage"

If you are using XCode 8 and face any build issues try following before contacting support:

pod "Segment-WebEngage/Xcode8"

After adding the dependency, you must register the integration with our SDK. To do this, import the WebEngage integration in your AppDelegate:

#import <Segment-WebEngage/WEGSegmentIntegrationFactory.h>

And add the following lines to your AppDelegate’s application:didFinishLaunching:WithOptions: method

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    //Initialise Segment
    SEGAnalyticsConfiguration *configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@"XXXXXXXXXXXXXXXXXXXXXXXXXXX"];

    //Additional Segment Configuration
    configuration.trackApplicationLifecycleEvents = NO; // Enable this to record certain application events automatically!
    configuration.recordScreenViews = NO; // Enable this to record screen views automatically!

    //Register WebEngage Integration With Segment
    [configuration use:[WEGSegmentIntegrationFactory instanceWithApplication:application launchOptions:launchOptions]];

    [SEGAnalytics setupWithConfiguration:configuration];

    return YES;


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


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.


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.


The reset call must be invoked when a user is logged out.


Push Notifications

Follow WebEngage’s push notification documentation:

In-App Notifications

No further action is required to enable in-app messaging.


Include the following rules in your ProGuard file.

 -keep class com.webengage.sdk.android.**{*;}
-dontwarn com.webengage.sdk.android.**


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

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, Personas 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), Personas sets that value to false.

When you first create an audience, Personas 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.

Supported Sources and Connection Modes

Before you start, make sure WebEngage supports the source type and connection mode you’ve chosen to implement. You can learn more about connection modes here.

Web Mobile Server
📱 Device-mode ⬜️
☁️ Cloud-mode ⬜️ ⬜️ ⬜️


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

Setting Description
string. Required if you are sending data to WebEngage via their server-side component.
Direct Integration Channels array, defaults to server.

The channels this direct integration supports.
Direct Integration Endpoint string, defaults to https://c.webengage.com/segment/integration .

The API endpoint of the direct integration.
License Code
string. 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.

This page was last modified: 13 Jun 2020

Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
Create free account