Skip to content

Instantly share code, notes, and snippets.

@cbetz
Created May 5, 2022 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbetz/2eccad6a113f3ee6ff5ead460bbfa8b8 to your computer and use it in GitHub Desktop.
Save cbetz/2eccad6a113f3ee6ff5ead460bbfa8b8 to your computer and use it in GitHub Desktop.
Pendo user info
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