Hello everybody,
first of all thank you very much for this great product!
Right now, I have a little problem and I hope you can help me solving it: I want to track campaigns using the PHP Tracker API and I can’t get campaigns to show up in my reports. Here is my code:
require_once './PiwikTracker.php';
PiwikTracker::$URL = 'http://192.168.1.1';
$t = new PiwikTracker( 19 );
$cp[0] = 'min_test';
$cp[1] = 'min_test';
$t->setAttributionInfo(json_encode($cp));
// Mandatory: set the URL being tracked
$t->setUrl( 'http://example.org' );
$t->doTrackPageView('TEST_Z');
...
and the api call:
http://192.168.1.1/piwik.php?idsite=19&rec=1&apiv=1&rand=1679400080&cip=192.168.1.22&_id=10233ece08fdae63&url=http%3A%2F%2Fexample.org&urlref=&_rcn=min_test&_rck=min_test&action_name=TEST_Z
Please note that tracking actually works for sitename e.g. Sitename “TEST_Z” actually shows up in report, but just campaigns doesn’t.
Since it didn’t work I also added pk_campaign and pk_kwd to the api call url:
http://192.168.1.1/piwik.php?idsite=19&rec=1&apiv=1&rand=1679400080&cip=192.168.1.22&_id=10233ece08fdae63&url=http%3A%2F%2Fexample.org&urlref=&_rcn=min_test&pk_campaign=min_test&_rck=min_test&pk_kwd=min_test&action_name=TEST_Z
But still no luck I hope you can help me.
Thank you!