예제 #1
0
 /**
  * @return string
  */
 protected function buildHttpRequest()
 {
     $this->setXForwardedFor($this->visitor->getIpAddress());
     $this->setUserAgent($this->visitor->getUserAgent());
     // Increment session track counter for each request
     $this->session->increaseTrackCount();
     // See http://code.google.com/p/gaforflash/source/browse/trunk/src/com/google/analytics/v4/Configuration.as?r=237#48
     // and http://code.google.com/intl/de-DE/apis/analytics/docs/tracking/eventTrackerGuide.html#implementationConsiderations
     if ($this->session->getTrackCount() > 500) {
         Tracker::_raiseError('Google Analytics does not guarantee to process more than 500 requests per session.', __METHOD__);
     }
     if ($this->tracker->getCampaign()) {
         $this->tracker->getCampaign()->increaseResponseCount();
     }
     return parent::buildHttpRequest();
 }