我想我在这里缺少一些基本的东西,但是当我从here尝试这个例子时(根据我的背景):
<?php
$piwikTracker = new PiwikTracker( $idSite = {$IDSITE} );
// Specify an API token with at least Admin permission, so the Visitor IP address can be recorded
// Learn more about token_auth: https://piwik.org/faq/general/faq_114/
$piwikTracker->setTokenAuth('my_token_auth_value_here');
// You can manually set the visitor details (resolution, time, plugins, etc.)
// See all other ->set* functions available in the PiwikTracker.php file
$piwikTracker->setResolution(1600, 1400);
// Sends Tracker request via http
$piwikTracker->doTrackPageView('Document title of current page view');
// You can also track Goal conversions
$result = $piwikTracker->doTrackGoal($idGoal = 1, $revenue = 42);
?>
$result
变量包含
GIF89a�����������!�����,�������D�;
我被告知是一个小型跟踪GIF。但是为什么API会返回跟踪GIF?难道它不应该是关于成功/失败的状态结果吗?