Support
Welcome to WalkMe support

Please login in order to continue:

Work flows better with WalkMe
Work flows better with WalkMe.

Mobile: What Are React-Native Campaign Callbacks and How Are They Used?

Last Updated June 21, 2021

Brief Overview

As of WalkMe Mobile SDK version 1.6.0 the WalkMe Mobile SDK supports campaign callbacks.

Callbacks are a programmatic way for an app to register to WalkMe Campaign events. By implementing the Campaign Callbacks interface, apps can use the data transferred through the callback objects (including Campaign and user information) and utilize it for the app's purposes, such as passing that information to any analytics or CRM system unrelated to WalkMe, or updating any app or user settings according to the user interaction with the Campaign.

Use Cases

Campaign callbacks can be used for the following and many more:

  • Track user onboarding from any analytics system
  • Generate opportunities in a CRM based on user engagement with WalkMe Shoutout - i.e. "Are you interested in a free demo? Yes / No"
  • Integrate with existing support systems to track and compare WalkThru usage/completion against the top support ticket topics

Below is a description of all the required steps in order to implement campaign callbacks.

Using Campaign Callbacks

To be able to register to campaign callbacks, first register events on the campaignEventEmitter:

import RNWalkme from 'react-native-walkme-sdk';

// ...
componentDidMount() {
	// ...
	this.campaignDismissedSubscription = RNWalkme.campaignEventEmitter.addListener(
  		'wmCampaignInfoEventDismissed',
  		(event) => {
    		console.log(event)
  		}
	);

	this.campaignShowSubscription = RNWalkme.campaignEventEmitter.addListener(
  		'wmCampaignInfoEventWillShow',
  		(event) => {
    		console.log(event)
  		}
	);
}

Use the remove() function to remove subscriptions when not needed:

componentWillUnmount() {
	// ...
    this.campaignDismissedSubscription.remove();
	this.campaignShowSubscription.remove();
}

The callback return object will includes the following information:

Item Retreived By Description
Campaign CTA "campaign_cta"

The campaign CTA that the app user has interacted with.

For all CTAs other than the custom one, the CTA returned will be:
abbi://cta , for example: abbi://ok or abbi://never

Campaign ID "campaign_id" The unique ID assigned to the campaign
Campaign CTA ID "cta_ud" The unique ID for the Campaign CTA
Campaign Data "data" A placeholder object added for possible future use of additional data appended to the campaign. Survey submission data is populated here.

Was this article helpful?

Thanks for your feedback!

Be part of something bigger.

Engage with peers, ask questions, share ideas

Ask the Community
×