Can't get the API tracker to work

I am new to Piwik so I am sure I may be missing a step and any help would be appreciated.

I have followed the instructions on the site for using the Tracking API for advanced users (PHP).

Here is my code:


require_once "../tracking/PiwikTracker.php";
$t = new PiwikTracker( $idSite = 1, 'http://example.com/');
$t->doTrackPageView('Decoder');

When I launch the page, I get an internal server error 500. The line that is causing this is:


$t->doTrackPageView('Decoder');

but i’m not sure why. Can anyone help me out there?

Please check your webserver error logs for a more detailed error message