public getUrlTrackPageView ( string $documentTitle = '' ) : string | ||
$documentTitle | string | Page view name as it will appear in Piwik reports |
return | string | URL to piwik.php with all parameters set to track the pageview |
public function getUrlTrackPageView($documentTitle = '')
{
$url = $this->getRequest($this->idSite);
if (strlen($documentTitle) > 0) {
$url .= '&action_name=' . urlencode($documentTitle);
}
return $url;
}
public function test_response_ShouldSend400ResponseCode_IfInvalidRequestParameterIsGiven() { $url = $this->tracker->getUrlTrackPageView('Test'); $url .= '&cid=' . str_pad('1', 16, '1'); $this->assertResponseCode(200, $url); $this->assertResponseCode(400, $url . '1'); // has to be 16 char, but is 17 now }