General
API
Language libraries
External Services
Other
Track Stats with PHP
1. Download stathat.php and put it in your import path.
2. Put it in your code:
<?php include 'stathat.php' ?>
3. Make calls to StatHat. You do not need to create the stats first
using the web interface.
<?php
function send_message($sender, $recipient, $content)
{
if (($sender['gender'] == 'female') && ($recipient['gender'] == 'male')) {
stathat_ez_count('YOUR_EZKEY', 'messages sent - female to male', 1);
}
}
?>
4. Go to the stats page to see your stats!