Im aware that you can't track "clicks", as they're strictly client/Visitor side. I thinks its possible to track everytime
they do an onclick
on my page and update the form field which get submitted. Or use XmlHttpRequest
, but i'm not sure on where I should start with this info.
I think the best way to go would be to to track hits (in php)
to my script/ webpage/button
. i'm thinking I can do this with:
session_start();
$_SESSION['hits'] = isset($_SESSION['hits']) ? $_SESSION['hits'] + 1 : 0;
if ($_SESSION['hits'] > 100) header('Location: /whatever.php');
Am I on the right track with this?