Created
May 5, 2022 15:21
-
-
Save cbetz/2eccad6a113f3ee6ff5ead460bbfa8b8 to your computer and use it in GitHub Desktop.
Pendo user info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setupPendo = (user: User) => { | |
if ((window as any) && (window as any).pendo) { | |
(window as any).pendo.initialize({ | |
visitor: { | |
id: user.profile.sub, // Required if user is logged in | |
email: user.profile.email, // Recommended if using Pendo Feedback, or NPS Email | |
// full_name: // Recommended if using Pendo Feedback | |
// role: // Optional | |
// You can add any additional visitor level key-values here, | |
// as long as it's not one of the above reserved names. | |
}, | |
account: { | |
id: user.profile.sub, // Required if using Pendo Feedback | |
// name: // Optional | |
// is_paying: // Recommended if using Pendo Feedback | |
// monthly_value:// Recommended if using Pendo Feedback | |
// planLevel: // Optional | |
// planPrice: // Optional | |
// creationDate: // Optional | |
// You can add any additional account level key-values here, | |
// as long as it's not one of the above reserved names. | |
}, | |
}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment