How to check did the user close the app page?

This is an interesting problem and I don’t quite know how to solve it with Bubble’s current capabilities.

But I did come across this post and a few people offered some interesting solutions. Have a look!