Winn.ws

Winn Tracker

It’s time to start tracking everything! Now you can with Winn Tracker; track downloads, page views, how many times a link or image or anything was clicked and, keep track of incoming links.

Very easy to use and start implementing right now! The system only takes one database table, and you can add this table to a current database so no need to make a whole new database for this. Developer friendly, the system is object orientated using one class. Once the class is called it will send the information provided to the database, after that it’s all yours!

Install

  • Download the zip file below.
  • Unpack the files to the server or local computer.
  • *Create or add tables to a current database.
  • **Connect the db_class.php file to your database.
  • Start using!

*Database structure

This is very important you follow the directions in the db_schema.txt file. If your creating a new database you may use the database install script provided.

Creating a new database ONLY

Create your database first then edit the db_class.php file located at: “/path/to/tracker/classes/db_class.php”. After that follow the setps below.

I have provided a script that will create the proper tables on a new database, this script is untested on current databases. To activate the script you will need to rename the file from “create_db.php.backup” to “create_db.php” then simply visit: “/path/to/tracker/classes/create_db.php”. This will give you an error or successes message.

Hook it up to the database

Open the db_class.php (“/path/to/tracker/classes/db_class.php”) file in a text editor and change the following lines:

[php]
$dbhost = “localhost”;
$dbuser = “DB USERNAME”;
$dbpass = “DB PASSWORD”;
$database = “DATABASE NAME”;
[/php]

Easy right? Upload that file to the server where you found it (“/path/to/tracker/classes/db_class.php”). Now your ready to start using it!

How to use

  • Ajax Link
  • PHP Link
  • Direct Link
Before using take note of the reserved functions.

Ajax Link

I have provided the proper javascript for this in the /js folder.

[html]

Winnjs.countHit(‘Test_page’,”,['username:Bob','sessionid:']);
[/html]

PHP Link

[php]
//Include the following file:
include ‘classes/hit.php’;

// Call the class
$h = new track_this();

$Var2Value = “Some Value”;

// Make the call that sends the data
$h->hit(‘name_of_page’,$_SERVER['PHP_SELF'],
array(
“AnyVarName” => “TheValue”,
“AnyVar2Name” => $Var2Value
));
[/php]

Direct Link

[html]
Some Text
[/html]

  • * – The name of what your tracking.
  • ** – The headers such as the page address or $_SERVER['PHP_SELF']
  • *** – The key or name of the option.
  • **** – The value of the Key.

Easy to use so have fun with it and as always this is 100% supported so email me any time and i will try to get back with you as soon as possible!

Download

Download the latest version of this here:

Also coming soon is a SourceForge Project Page for nightly dumps and more.

posted in: Uncategorized 04.03.08