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.

For more information, see Exclude and Include Lists.

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 endSessionAPI. 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.

Android

public static void endSession()

iOS

- (void)endSession

 

When you call endSession, the Visitor ID and Account ID are cleaned. In addition, no guides are shown and no analytics are collected and sent.

To restart a session, call the startSession() method.

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