Piwik\Tracker\Request::getForcedVisitorId PHP Method

getForcedVisitorId() public method

public getForcedVisitorId ( )
    public function getForcedVisitorId()
    {
        return $this->getParam('cid');
    }

Usage Example

Example #1
0
 protected function shouldLookupOneVisitorFieldOnly($isVisitorIdToLookup)
 {
     // This setting would be enabled for Intranet websites, to ensure that visitors using all the same computer config, same IP
     // are not counted as 1 visitor. In this case, we want to enforce and trust the visitor ID from the cookie.
     $trustCookiesOnly = Config::getInstance()->Tracker['trust_visitors_cookies'];
     // If a &cid= was set, we force to select this visitor (or create a new one)
     $isForcedVisitorIdMustMatch = $this->request->getForcedVisitorId() != null;
     $shouldMatchOneFieldOnly = $isVisitorIdToLookup && $trustCookiesOnly || $isForcedVisitorIdMustMatch || !$isVisitorIdToLookup;
     return $shouldMatchOneFieldOnly;
 }
All Usage Examples Of Piwik\Tracker\Request::getForcedVisitorId