On Page Leave trigger

I am unable to trigger On Page Leave. I have a simple API service block, and I am printing a test on the back end. Is there some conditions that need to be accomplished to trigger this? I am either closing the tab or clicking back on the browser.

image

Hello @Andreas_Marinopoulos

This handler does not work when you close the browser tab or go to another URL.
It works when the component “page” is unmounted within the application.
For example when you use block “go to page” in “App Route” category

Regards,
Viktor

Is there any way to trigger an action if the user leaves the page without paying? Like when you receive an email if you did not complete an ecommerce checkout.

What I can think of is to trigger a backend method on page entry, wait for 5minutes,check if payment was made and then do the action if no payment was made. Is there another way?

Now we don’t have the block for it. But you can do it with the custom code block.

Demo

UI Builder - dsdfsd - Backendless 🔊 2021-11-10 17-29-41(1)
UI Builder - dsdfsd - Backendless 🔊 2021-11-10 17-30-15(1)
UI Builder - dsdfsd - Backendless 🔊 2021-11-10 17-29-13

Regards,
Viktor