SHDetect is an application statistics tracker. It can be used to collect data from your users, such as application version, build number, operating system and the locale of the user’s machine. The script was written as a simple alternative to the Sparkle statistics script.
Installation:
- Create a new database using you web hosts control panel (for instructions on how to do this please contact your web host)
- Select your new database in PhpMyAdmin or other MySQL tool
- Go to the query tab and paste the following in the box:
CREATE TABLE `Data` ( `Version` varchar(20) NOT NULL, `Build` varchar(10) NOT NULL, `OS_Version` varchar(10) NOT NULL, `Date` varchar(10) NOT NULL, `Locale` varchar(10) NOT NULL, `Count` varchar(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- Download and unzip SHDetect.zip
- Edit the values in config.php to match your details
- Upload the SHDetect folder to your server via ftp or your control panel
- Make config.php unwritable (optional)
- Login to the admin panel using the username and password you set earlier
- Done
Usage:
The script is called like this: /detect.php?version=$version&build=$build&os=$os&locale=$locale
The information is passed via variables, for example:
version=”2.0″ build=”1″ os=”10.7.2″ locale=”en_gb”
/detect.php?version=$version&build=$build&os=$os&locale=$locale
The script would all the following values to the database:
2.0 1 10.7.2 en_gb
If a configuration already exists, the seen will count will be updated rather than duplicating the entry
The URL could be called using curl, wget or any other method
Administration:
Open up SHTracker/admin to view your statistics
Removal:
To remove SHDetect, simply delete the SHDetect folder from your server and drop the “Data” table from your database
Downloads:
Current version: 0.5beta