"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:
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:
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:
should do the trick. But it isn’t adding any records to the dbase.

(Matthieu Aubry) #3

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.