setUpWebsitesAndGoals(); $this->setUpConfig(); $this->trackVisits(); } public function tearDown(): void { $this->removeConfig(); } private function setUpWebsitesAndGoals() { if (!self::siteCreated($idSite = 1)) { self::createWebsite($this->dateTime); } } private function trackVisits() { $dateTime = $this->dateTime; $idSite = $this->idSite; self::createSuperUser(); $t = self::getTracker($idSite, $dateTime, $defaultInit = true); Cache::clearCacheGeneral(); Cache::regenerateCacheWebsiteAttributes(array($idSite)); $t->disableCookieSupport(); $t->setUrlReferrer('http://referrer.com/page.htm?param=valuewith some spaces'); // testing URL excluded parameters $parameterToExclude = 'excluded_parameter'; APISitesManager::getInstance()->updateSite( $idSite, 'new name', $url = array('http://site.com'), $ecommerce = 0, $siteSearch = 0, $searchKeywordParameters = null, $searchCategoryParameters = null, $excludedIps = null, $parameterToExclude . ',anotherParameter', $timezone = null, $currency = null, $group = null, $startDate = null ); // Record 1st page view $urlPage1 = 'http://example.org/index.htm?excluded_Parameter=SHOULD_NOT_DISPLAY¶meter=Should display'; $t->setUrl($urlPage1); $t->setPerformanceTimings(33, 105, 205, 1325, 390, 222); self::checkResponse($t->doTrackPageView('incredible title!')); // testing that / and index.htm above record with different URLs // Recording the 2nd page after 3 minutes $t->setForceVisitDateTime(Date::factory($dateTime)->addHour(0.05)->getDatetime()); $t->setUrl('http://example.org/'); $t->setPerformanceTimings(62, 198, 253, 1559, 222, 152); self::checkResponse($t->doTrackPageView('Second page view - should be registered as URL /')); // Click on external link after 6 minutes (3rd action) $t->setForceVisitDateTime(Date::factory($dateTime)->addHour(0.1)->getDatetime()); // Testing Outlink that contains a URL Fragment self::checkResponse($t->doTrackAction('https://outlinks.org/#!outlink-with-fragment-