Programmatically Set the Do Not Process Flag from a Guide Poll Reponse


In some cases, you may want to be able to allow a user to opt-out of Pendo tracking via a Pendo guide. This process uses a Pendo guide with a poll to ask the end-user to opt-out of tracking and then uses webhooks and API calls to set the Do Not Process flag for that user's visitor ID in Pendo.

Once you set the Do Not Process flag Pendo will stop collecting events from that visitor and will stop displaying guides to that visitor. 

The following steps outline this general process:

1. Create Pendo Guide with a Yes/No poll building block

The first step in the process is to create a Pendo for the users you want to present with the opt-out option. This guide should only be presented to identified visitors and the guide should contain a Yes/No Poll building block. This will record the end-users responses to the opt-in question you pose in the poll. 

2. Set Up Webhooks

Use Pendo Webhooks to send a webhook to a destination of your choosing (Zapier is a popular option) with the user's poll responses in near real-time. You will catch that webhook in your tool - and process the results.

3. Set Do Not Process Flag

After catching the webhook you will process the webhooks to identify if the visitor selected to opt-out of Pendo tracking. If the visitor clicked on the poll button to opt-out of tracking you will send an API call to the Visitor Metadata Endpoint to set the Do Not Process flag. A page-load is required for the Do Not Process flag to take effect for that visitor after the DNP flag is set via API. So this will likely take effect the next time the visitor logs in - or after they refresh the browser page. 

4. Submit a GDPR deletion request via the API (optional)

If you also wish to fully delete all data we have collected on that visitor ID prior to them opting out you can send an additional API call to our bulk deletion endpoint. Please reach out to your Pendo CSM for full documentation on this endpoint. 

Through this process, you can display an opt-out message to an end-user, process their poll response in near real-time, and set a flag to stop processing that visitor's events. 




Please sign in to leave a comment.

Didn't find what you were looking for?

New post