Exclude Pendo Mobile for specific users

Last Updated:

 Note: Supported from Android SDK 2.4.3+ and  iOS SDK 2.5.1+

What is it

Sometimes, you want Pendo to not collect usage analytics for specific end users. This can be in the case of classified users or users used by automation runs. It could also be users who asked to not collect analytics on their behalf.

In order to not collect analytics for a specific user, you need to disable Pendo for this user. Guides will not show as well for the user.

If you are using this method because you use Android Services, read more here.

How to use

The recommended way to do so in Pendo is as follows:

  1. From Application:onCreate initialize Pendo using setup to ensure that no analytics will be collected and no guides shown.
  2. At the time you know the identity of the user, call startSession API to initiate Pendo with the actual user details. The user will then see guides, and analytics will be collected. This is usually done on an Activity’s onCreate method but can be called from any context in the app.
  3. If you want to stop Pendo for a specific user at any time during the session, call the endSession API. From this point onward, no analytics will be collected for the user, and no guides shown.
  4. If you want to start using Pendo for this user, simply call startSession with this visitor ID again.

 

End Session API 

Android

public static void endSession()

 iOS

- (void)endSession

What will happen when you call endSession method?

  • The visitor ID and account ID will be cleaned
  • No guides will be shown
  • No analytics will be sent

How do I restart the session?

A session can be restarted by calling the startSession() method.