1. Home
  2. Troubleshooting
  3. How to make WebEngage work on single page applications?

How to make WebEngage work on single page applications?

WebEngage widget is initialized on the page load. All the custom and rule data, you may want to use, will be understood at this point. So WebEngage might not work seamlessly with web-apps using a Single Page Architecture (SPA).

Though WebEngage does not provide any configuration in the dashboard, there is a way to re-initialize the widget using WebEngage JS API. See the example below, which re-initializes widget on hashChange event. Also, code assumes that jQuery is there on the page.


NOTE : This code needs to be part of your WebEngage Integration code.

Was this article helpful?