enableBulkTracking() public method

Enables the bulk request feature. When used, each tracking action is stored until the doBulkTrack method is called. This method will send all tracking data at once.
public enableBulkTracking ( )
Beispiel #1
0
 public function setUp()
 {
     parent::setUp();
     $idSite = 1;
     $dateTime = '2014-01-01 00:00:01';
     if (!Fixture::siteCreated($idSite)) {
         Fixture::createWebsite($dateTime);
     }
     $this->tracker = Fixture::getTracker($idSite, $dateTime, $defaultInit = true);
     $this->tracker->enableBulkTracking();
 }
 private function doTrackNumberOfRequests($numRequests, $inBulk = true)
 {
     $inBulk && $this->tracker->enableBulkTracking();
     for ($i = 0; $i < $numRequests; $i++) {
         $response = $this->tracker->doTrackPageView('Test');
     }
     if ($inBulk) {
         $response = $this->tracker->doBulkTrack();
     }
     return $response;
 }