PiwikTracker::setUrl PHP Method

setUrl() public method

Sets the current URL being tracked
public setUrl ( string $url )
$url string Raw URL (not URL encoded)
    public function setUrl($url)
    {
        $this->pageUrl = $url;
        return $this;
    }

Usage Example

 protected function trackMusicPlaying(PiwikTracker $vis)
 {
     $vis->setUrl('http://example.org/webradio');
     $vis->setGenerationTime(333);
     self::checkResponse($vis->doTrackPageView('Welcome!'));
     $this->moveTimeForward($vis, 1);
     $this->setMusicEventCustomVar($vis);
     self::checkResponse($vis->doTrackEvent('Music', 'play', 'La fiancée de l\'eau'));
     $this->moveTimeForward($vis, 2);
     $this->setMusicEventCustomVar($vis);
     self::checkResponse($vis->doTrackEvent('Music', 'play25%', 'La fiancée de l\'eau'));
     $this->moveTimeForward($vis, 3);
     $this->setMusicEventCustomVar($vis);
     self::checkResponse($vis->doTrackEvent('Music', 'play50%', 'La fiancée de l\'eau'));
     $this->moveTimeForward($vis, 4);
     $this->setMusicEventCustomVar($vis);
     self::checkResponse($vis->doTrackEvent('Music', 'play75%', 'La fiancée de l\'eau'));
     $this->moveTimeForward($vis, 4.5);
     $this->setMusicEventCustomVar($vis);
     self::checkResponse($vis->doTrackEvent('Music', 'playEnd', 'La fiancée de l\'eau'));
 }
All Usage Examples Of PiwikTracker::setUrl