PiwikTracker::doTrackContentInteraction PHP Method

doTrackContentInteraction() public method

Tracks a content interaction. Make sure you have tracked a content impression using the same content name and content piece, otherwise it will not count. To do so you should call the method doTrackContentImpression();
public doTrackContentInteraction ( string $interaction, string $contentName, string $contentPiece = 'Unknown', string | boolean $contentTarget = false ) : mixed
$interaction string The name of the interaction with the content. For instance a 'click'
$contentName string The name of the content. For instance 'Ad Foo Bar'
$contentPiece string The actual content. For instance the path to an image, video, audio, any text
$contentTarget string | boolean (optional) The target the content leading to when an interaction occurs. For instance the URL of a landing page.
return mixed Response string or true if using bulk requests.
    public function doTrackContentInteraction($interaction, $contentName, $contentPiece = 'Unknown', $contentTarget = false)
    {
        $url = $this->getUrlTrackContentInteraction($interaction, $contentName, $contentPiece, $contentTarget);
        return $this->sendRequest($url);
    }