How do people use [pendo]
(https://www.pendo.io/) inside a Vaadin 7 application? I know of the following things that need to be done, with my current pendo knowledge:
- Embed pendo JavaScript snippet on every page. So, since most Vaadin apps are single page apps, I guess this snippet needs to be loaded in UI, maybe using
Page.getCurrent().getJavaScript().execute
orJavaScript.getCurrent().execute
. I think there is also a@JavaScript
annotation, but I have tried that a few times and could not get it to work (see https://vaadin.com/forum/thread/18363995/referencing-javascript-with-javascript-annotation and https://stackoverflow.com/questions/62961073/how-to-add-a-javascript-plugin-to-vaadin-website for one place where I could not get it to work). - Initialize pendo by calling
pendo.initialize({...});
. I guess this needs to be done after logging into my application (so have user id at this point) viaJavaScript.getCurrent().execute
, but not entirely sure where to do this. Also, according to Pendo, it needs to be done on every windows reload. I guess I could do this in my UI class, only occuring after login is complete. But do I also need to do it when going between views? That is not, strictly speaking, a reload, so just not sure.
Basically, I figure someone out there has used Pendo in a Vaadin application, so looking for any advice I can get.