"Tracking API", can't get it to work

Hi all,
I have been using piwik for a few months now on a few websites and it looks good.
I am currently creating a mobile app for a website that uses piwik for tracking. I can’t seem to get the tracking API to work properly.
The directions in here:
http://piwik.org/docs/tracking-api/
are not quite clear. I need to ask a few questions:
In the last part of the page of “piwik Tracking API” there is an example tracking URL. I am not getting any data when calling my website’s URL in the same method:
h**p://MYWEBSITE/piwik/piwik.php?rec=1&idsite=1&url=http://MYWEBSITE&actionname=MainPage
and I still can’t see the visit in the piwik database.
should I be placing piwiktracker.php in the folder of the main site that I want to track or in the piwik folder?
in the code to be added to the pages,
< ? p hp
// – Piwik Tracking API init –
require_once “/path/to/PiwikTracker.php”;
PiwikTracker::$URL = ‘http://demo.piwik.org/’;
? >
the piwiktracker urk should it be the URL of the tracked website or the piwik installation folder?

I believe that a simple call to the URL:
http://MYSITE/piwik/piwik.php?idsite=1&rec=1&action_name="WHATEVERPAGE"
should do the trick. But it isn’t adding any records to the dbase.

Enable debug as per: Tracking API - Analytics Platform - Matomo

And the output message of piwik.php?.. should give you a clue as to what is happening. Indeed it should work with your request.

This kinda solved it. I found out that the Piwik cookie that I have disabled tracking from my computer even for API calls. It worked once I disabled it.
Thank you.