Step 1: Download the PHP library

Clone the git repository from here:
git clone https://code.google.com/p/prodeagle-php/

or alternatively you can download a zipped archive of the PHP library from here.

Step 2: Install the library

The ProdEagle library needs to be publicly accessible on your server so we can export your counter data.
The ProdEagle library has it's own authentication mechanism, so don't add additional authentication to the ProdEagle directory.

The easiest way is to just copy the prodeagle directory to your root www directory so the ProdEagle library is accessible from http://www.example.com/prodeagle/

Finally, you need to make sure that your webserver (let's assume it's apache) can read, create and write files in the prodeagle/data subdirectory:
cd www/prodeagle
chown apache:apache data/
chmod 744 data/

The ProdEagle library will create files in the prodeagle/data subdirectory that will be automatically exported and deleted by ProdEagle.com. These files have filenames starting with .htprodeagle. They shouldn't be accessible to the public. Apache takes automatically care of that (all .ht* files are inaccessible by defalut).

Step 3: Add counters to your code

When ever you would like to increment a counter, just call:
<?php

include "prodeagle/counter.php";

increment_counter("Chocolate.Bars");

?>

You can also increment a counter by any discrete number, for example 5:
increment_counter("Chocolate.Bars", 5);

Behind the scenes, this will result in a ultra-fast apache logfile call. There is no noticable additional latency.

Step 4: Set up ProdEagle.com to collect your counter data

Go to ProdEagle.com and login using a Google Account.
Add your server in the "Your monitored websites" section. We highly recommend to use https!
Now ProdEagle.com will come and export your data every minute. You need to wait for the first export and then you can start creating new graphs and set up new alerts! Sweet, huh?