Using Fomo in Single Page Apps (SPA)

You might be setting up Fomo on a S.P.A. that does not "technically" change pages as visitors click around your website. if this is the case you will need to tell Fomo that page URL has been changed.

Setup

In your web app source code, add a callback in your router to handle triggering Fomo on whatever pages or conditions you'd like.

Here is an example using a Vue app, which does this on every page change:

router.afterEach((to, from) => {
...
if (fomo) {
fomo.trigger('reload')
}
})

This few lines of code will tell Fomo to show notification again or hide it based on rules specified in the settings tab.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.