Search code examples
htmlmobilemobile-browser

Mobile Browser Detect View


I have a call button on my site <a href="tel:8884445555" ...

I want to detect when the user comes back to my page.

So let's say they are on the call for 2 minutes and they come back to the page.

Is there a way to detect this? I am strictly speaking on at least Android And/Or Iphone platforms.


Solution

    1. Set tracking cookie.
    2. Intercept link click event using JavaScript and set another cookie with timestamp
    3. If page is loaded again check for existing cookies