Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Oct 8, 2024
1 parent 0088d21 commit 6b043c5
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,23 +166,33 @@ private function trackOtherVisits()
// desktop visit (with conversion)
$t = self::getTracker($this->idSite, $this->getAdjustedDateTime(1.6), $defaultInit = true);

$t->setUserAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; Tablet; Trident/7.0; Banca Caboto s.p.a.; rv:11.0) like Gecko');
// The client hints below should change the OS to Windows 11, browser to Edge 95.5.2 and device type to desktop
$t->setClientHints(
'',
'Windows',
'14.0.0',
'" Not A;Brand";v="99", "Chromium";v="95", "Microsoft Edge";v="95"',
'95.5.2',
'"Desktop"'
);
$t->setUserAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; Banca Caboto s.p.a.; rv:11.0) like Gecko');
// The client hints below should change the OS to Windows 11 and browser to Edge 95.5.2
$t->setClientHints('', 'Windows', '14.0.0', '" Not A;Brand";v="99", "Chromium";v="95", "Microsoft Edge";v="95"', '95.5.2');

$t->setUrl('http://example.org/index.htm');
self::checkResponse($t->doTrackPageView('0'));

$t->setForceVisitDateTime($this->getAdjustedDateTime(1.9));

self::checkResponse($t->doTrackGoal($this->idGoal, $revenue = 0));

// car browser visit (without conversion)
$t = self::getTracker($this->idSite, $this->getAdjustedDateTime(1.8), $defaultInit = true);

$t->setUserAgent('Some Unknown UA');
// The client hints below should change the OS to Android, browser to Chrome 95.5.2 and device type to car browser
$t->setClientHints(
'UltraOcta-T8',
'Android',
'14.0.0',
'" Not A;Brand";v="99", "Chromium";v="95"',
'95.5.2',
'"Tablet", "Automotive"'
);

$t->setUrl('http://example.org/index.htm');
self::checkResponse($t->doTrackPageView('0'));
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
</row>
<row>
<label>Unknown</label>
<nb_uniq_visitors>2</nb_uniq_visitors>
<nb_visits>3</nb_visits>
<nb_actions>2</nb_actions>
<nb_uniq_visitors>3</nb_uniq_visitors>
<nb_visits>4</nb_visits>
<nb_actions>3</nb_actions>
<nb_users>0</nb_users>
<max_actions>1</max_actions>
<sum_visit_length>1087</sum_visit_length>
<bounce_count>3</bounce_count>
<bounce_count>4</bounce_count>
<nb_visits_converted>2</nb_visits_converted>
<goals>
<row idgoal='1'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@
<nb_visits_converted>0</nb_visits_converted>
<segment>deviceBrand==Samsung;deviceModel==Galaxy+Tab+3+8.0%22+WiFi</segment>
</row>
<row>
<label>UltraOcta-T8</label>
<nb_uniq_visitors>1</nb_uniq_visitors>
<nb_visits>1</nb_visits>
<nb_actions>1</nb_actions>
<nb_users>0</nb_users>
<max_actions>1</max_actions>
<sum_visit_length>0</sum_visit_length>
<bounce_count>1</bounce_count>
<nb_visits_converted>0</nb_visits_converted>
<segment>deviceBrand==Unknown;deviceModel==UltraOcta-T8</segment>
</row>
<row>
<label>ViewSonic - ViewPad 7e</label>
<nb_uniq_visitors>1</nb_uniq_visitors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,19 @@
<segment>operatingSystemCode==AND;operatingSystemVersion==2.3</segment>
<logo>plugins/Morpheus/icons/dist/os/AND.png</logo>
</row>
<row>
<label>Android 14.0</label>
<nb_uniq_visitors>1</nb_uniq_visitors>
<nb_visits>1</nb_visits>
<nb_actions>1</nb_actions>
<nb_users>0</nb_users>
<max_actions>1</max_actions>
<sum_visit_length>0</sum_visit_length>
<bounce_count>1</bounce_count>
<nb_visits_converted>0</nb_visits_converted>
<segment>operatingSystemCode==AND;operatingSystemVersion==14.0</segment>
<logo>plugins/Morpheus/icons/dist/os/AND.png</logo>
</row>
<row>
<label>Java ME</label>
<nb_uniq_visitors>1</nb_uniq_visitors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,19 @@
<revenue>42.26</revenue>
<logo>plugins/Morpheus/icons/dist/devices/unknown.png</logo>
</row>
<row>
<label>Car browser</label>
<nb_uniq_visitors>1</nb_uniq_visitors>
<nb_visits>1</nb_visits>
<nb_actions>1</nb_actions>
<nb_users>0</nb_users>
<max_actions>1</max_actions>
<sum_visit_length>0</sum_visit_length>
<bounce_count>1</bounce_count>
<nb_visits_converted>0</nb_visits_converted>
<segment>deviceType==car+browser</segment>
<logo>plugins/Morpheus/icons/dist/devices/car_browser.png</logo>
</row>
<row>
<label>Desktop</label>
<nb_uniq_visitors>1</nb_uniq_visitors>
Expand Down Expand Up @@ -128,12 +141,6 @@
<segment>deviceType==camera</segment>
<logo>plugins/Morpheus/icons/dist/devices/camera.png</logo>
</row>
<row>
<label>Car browser</label>
<nb_visits>0</nb_visits>
<segment>deviceType==car+browser</segment>
<logo>plugins/Morpheus/icons/dist/devices/car_browser.png</logo>
</row>
<row>
<label>Console</label>
<nb_visits>0</nb_visits>
Expand Down

0 comments on commit 6b043c5

Please sign in to comment.