React Native Track Events solution for Pendo Mobile

Last Updated:

Note: Check if your app is eligible for our Codeless React Native. Our codeless solution includes all Pendo mobile features supported on native mobile applications: Codeless analytics, which works retroactively to the time the SDK was installed, and all mobile guide types, including tooltips and walkthroughs.

Mobile apps created with the React Native framework can use the Pendo SDK to allow you to:

  • Collect & analyze usage through Track Events. 
  • Create & publish single and multi-step lightbox Guides that are activated when users launch your app or with a track event.

Prerequisites

Your subscription must be enabled for mobile. Check in the Subscription Settings page that there is an Add App button. Select it to show mobile app options.

Available Insights

The following analytics will work for React Native apps using this Track Events solution:

  • Track events analytics (under the specific 'Track Events' page: view users and accounts analytics, usage totals and over-time usage)
  • Paths & funnels (via track events)
  • Data Explorer, Trends (via track events)
  • Retention analytics (via track events)
  • Visitors and accounts analytics
  • Time on application (based on your track events)
  • Any dashboard widget that does not relate to page views/button clicks
  • Use track event analytics in any Segment you create, for guides or analytics purposes

How to install

  1. Navigate to Settings > Subscription Settings.

  2. Open the Applications tab.

  3. Select Add Mobile App in the top-right corner of the screen.

  4. Enter a name for the app, select the Mobile option, and select Create App.
    add_mobileapp.png
  5. In the Install Settings tab of the new app, select View Installation Guide
    mobile_install_instructions.png
    The installation instructions open in Github.
  6. In Github, select the required framework and follow the step-by-step SDK installation instructions. When the app is successfully installed, it shows as Integrated in Subscription Settings.

How to track Pages and Features

track: use this API to trace page views and feature clicks and any other significant event in your app. Attach the following call to the screen/feature activity:

 PendoSDK.track("EVENT_NAME",{'KEY1':'VALUE1','KEY2':'VALUE2',...})}}

For example, use this to track a feature "submit" click on "order_form" page:

<ListItem 
...
onPress={() => {PendoSDK.track(data.name,{'page':'order_form','feature':'submit'})}}
>

How to track visitors and accounts

startSession:  Use this API to start a session with a visitor or account.
PendoSDK.startSession(visitorId, accountId, visitorData, accountData);
setVisitorData:  Use this API to update the visitor's data mid-session. Mainly used when the visitor updates details.
PendoSDK.setVisitorData({"KEY1":"VALUE1","KEY2":"VALUE2",...})
setAccountData: Use this API to update Account data mid-session. Mainly used when you want to update the accounts data.
PendoSDK.setAccountData({"KEY1":"VALUE1","KEY2":"VALUE2",...})

 

Frequently Asked Questions

Which guides can I use?

Guide Type: React Native applications can use mobile guides and polls. Tooltips are currently not available for React Native applications.

Guide Activation: You can show guides in your React Native app upon Application launch or when the app triggers a track event. Select App Launch or Track Event as the activation method for your guides. It's recommended to add track events to your app at places where you might want to trigger guides.

What should I report as events?

You can use 'track events' to report on any event happening in your app. A change of a user's status, an exception condition such as 'Server not available', any important business transaction or any action performed by your user, and any button click or page view that you want to collect analytics on.

How do I track my page views and button clicks? 

Automatic tracking of pages and features is currently not supported for React Native apps, due to their unique structure. Capturing pages in your React Native application and tagging features will not work.

To get analytics on page view and button clicks, you will need to send a track event for each.

Coming soon: We are working on supporting codeless tracking of Page views and Features in React Native applications.

Was this article helpful?
1 out of 1 found this helpful