WebEngage is a full stack marketing automation tool. It lets you drive growth for your businesses by engaging your users via push and in-app notifications, email campaigns, etc. You can also leverage WebEngage's analytics capabilities to get a 360-degree view of your users and the product.

RudderStack supports WebEngage as a destination to which you can seamlessly send your event data for efficient marketing and analytics.

Find the open source transformer code for this destination in the GitHub repository.

Getting started

Before configuring WebEngage as a destination in RudderStack, verify if the source platform is supported by WebEngage by referring to the table below:

Connection ModeWebMobileServer
Device mode---
Cloud modeSupportedSupportedSupported
To know more about the difference between cloud mode and device mode in RudderStack, refer to the RudderStack Connection Modes guide.

Once you have confirmed that the source platform supports sending events to WebEngage, follow these steps:

  1. From your RudderStack dashboard, add a source. Then, from the list of destinations, select WebEngage.
  2. Assign a name to the destination and click Continue.

Connection settings

To successfully configure WebEngage as a destination, you will need to configure the following settings:

WebEngage connection settings
  • License Code: Enter your WebEngage license code.
  • API Key: Enter your WebEngage API key.
To get your WebEngage license code and API key, log into your WebEngage dashboard and go to Data Platform > Integrations > REST API. For more information, refer to the FAQ section below.
  • Data Center: Select your WebEngage data center from the dropdown.

Identify

The identify method lets you identify a user and associate them to their actions. It also lets you record any traits about them like their name, email, etc.

RudderStack uses the identify call to create or update the customer information in WebEngage. It maps userId or anonymousId (userId is prioritized if both are present ) to WebEngage's userId before sending the data via the users API.

A sample identify call is shown below:

rudderanalytics.identify("1hKOmRA4GRlm", {
email: "alex@example.com",
phone: "+1-202-555-0146",
});

Traits mapping

RudderStack maps the following identify traits to the corresponding WebEngage attributes:

RudderStack traitWebEngage attributePresenceNotes
userIduserIdRequired if anonymousId is not present.userId cannot exceed 100 characters.
anonymousIdanonymousIdRequired if userId is not present.anonymousId cannot exceed 100 characters.
firstNamefirstNameOptionalThe user's first name.
lastNamelastNameOptionalThe user's last name.
birthday/dateOfBirth/dateofbirth/dob/DOBbirthDateOptionalThe user's birth date in the ISO format: yyyy-MM-dd.
gendergenderOptionalThe user's gender.
emailemailOptionalThe user's email.
phonephoneOptionalThe user's phone.
emailOptInemailOptInOptionalThe user's email subscription preference.
smsOptInsmsOptInOptionalThe user's SMS subscription preference.
whatsappOptInwhatsappOptInOptionalThe user's WhatsApp subscription preference.
company.namecompanyOptionalThe user's company.
hashedEmailhashedEmailOptionalThe user's hashed email for email services.
hashedPhonehashedPhoneOptionalThe user's encrypted phone number for SMS services.
postalcode / address.postalCodepostalCodeOptionalThe user's postal code.
region / address.regionregionOptionalThe user's region.
locality / address.localitylocalityOptionalThe user's locality.
city / address.citycityOptionalThe user's city.
country / address.countrycountryOptionalThe user's country.
attributesattributesOptionalThe user's custom attributes as key-value pairs.

Identify traits considerations

Note the following when sending identify traits to WebEngage:

  • Either userId or anonymousId must be present in the identify call.
  • If both userId and anonymousId are present in the identify call, RudderStack ignores anonymousId.
  • WebEngage prioritizes hashedEmail over email. Hence, once you set hashedEmail, it can then be updated only through a new hashedEmail.
  • WebEngage prioritizes hashedPhone over phone. Hence, once you set hashedPhone, it can then be updated only through a new hashedPhone.

Track

The track method lets you capture user events along with the properties associated with them.

RudderStack uses the track call to send the custom events to WebEngage via the events API.

A sample track call is shown below:

rudderanalytics.track("Order Completed", {
timestamp: "2022-05-05T14:58:10.000Z",
currency: "USD",
checkout_id: "X23441",
order_id: "ORD00123"
});
Make sure you call identify before track for RudderStack to include the userId in the track events. Otherwise, RudderStack will send the track calls to WebEngage with an anonymousId.

Property mapping

RudderStack maps the following event properties to the corresponding WebEngage attributes:

RudderStack traitWebEngage attributePresenceNotes
userIduserIdRequired if anonymousId is not present.userId cannot exceed 100 characters.
anonymousIdanonymousIdRequired if userId is not present.anonymousId cannot exceed 100 characters.
eventNameeventRequiredThe event name.
timestamp/originalTimestampeventTimeOptionalThe date and time of the event in ISO format: yyyy-MM-ddTHH:mm:ss±hhmm.
propertieseventDataOptionalThe custom event attributes as key-value pairs.

Setting custom attributes

WebEngage lets you send custom attributes as key-value pairs in the eventData parameter as described in the above section. However, there are a few things you should keep in mind:

  • WebEngage ignores any custom attributes starting with we_ as these are reserved for internal use.
  • User attribute names must be less than 50 characters, while the string attribute values cannot exceed 1000 characters. WebEngage automatically truncates any additional characters.
  • You can create a maximum of 25 custom user attributes of each data type.
  • If the attribute value is a JSON object, it can only be used to personalize your campaigns. These attributes cannot be used to create user segments.
  • Once defined, the data type of a custom user attribute cannot be changed again.

Page

The page call lets you record your website's page views with any additional relevant information about the viewed page.

RudderStack internally transforms the page call into a track call before sending it as a custom event to WebEngage. It sends the event/category name by transforming it in the Viewed ${category} ${name} page format.

For example, consider the following page call:

rudderanalytics.page("Home", "Clothes", {
path: "/best-seller/1",
referrer: "https://www.google.com/search?q=estore+bestseller",
search: "estore bestseller",
title: "The best sellers offered by EStore",
url: "https://www.estore.com/best-seller/1"
});

RudderStack transforms the above event into a track call named Viewed Home Clothes page and sends it to WebEngage as a custom event.

RudderStack sends the page event properties to WebEngage, similar to the track event properties.

Screen

The screen method lets you record whenever your user views their mobile screen with any additional relevant information about the screen. It is the mobile equivalent of a page call.

RudderStack internally transforms the screen call into a track call before sending it as a custom event to WebEngage. It sends the event/category name by transforming it in the Viewed ${category} ${name} screen format.

For example, consider the following screen call:

rudderClient.screen(
"Games",
"home",
RudderProperty().putValue("foo", "bar"),
null
)

RudderStack transforms the above event into a track call named Viewed Games home screen and sends it to WebEngage as a custom event.

RudderStack sends the screen event properties to WebEngage, similar to the track event properties.

FAQ

Where can I find the WebEngage License Code and API key?

To get your WebEngage License Code and API key, follow these steps:

  1. Log into your WebEngage dashboard.
  2. Go to Data Platform > Integrations > REST API.
  3. You will find the WebEngage License Code and API Key listed under Project Credentials, as shown:
WebEngage license code and API key

Contact us

For queries on any of the sections covered in this guide, you can, contact us or start a conversation in our Slack community.

Contents