Exclude Pendo Mobile for specific users

Last Updated:

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

There are times when you want Pendo to exclude specific end users when collecting usage analytics, for example, for classified users or users used by automation runs, or users who asked not to collect analytics on their behalf.

To exclude specific users, you must disable Pendo for the user. This can affect how well Guides display for the user.

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

Exclude specific end users - Android

The recommended way to exclude specific end users using Android is:

  1. From Application:onCreate, initialize Pendo using setup to ensure that no analytics are 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 are collected for the user, and no guides are shown.
  4. If you want to start using Pendo for this user, simply call startSession with this visitor ID again.

Exclude specific end users - iOS

The recommended way to exclude specific end users using iOS is:

  1. From application(_:didFinishLaunchingWithOptions:) initialize Pendo using setup to ensure that no analytics are collected and no guides shown.
  2. At the time you know the identity of the user, call the startSession API to initiate Pendo with the actual user details. The user will see guides, and analytics will be collected. This is usually done in AppDelegate.swift, in application(_:didFinishLaunchingWithOptions:) but can be called from any viewControler 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 are collected for the user, and no guides are 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.

 

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