Skip to content

Commit

Permalink
Adds detection for Yandex Browser Corp (matomo-org#7759)
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuconcioiu authored Aug 5, 2024
1 parent d6ef9a8 commit e871c28
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ class Browser extends AbstractClientParser
'YG' => 'YAGI',
'YJ' => 'Yahoo! Japan Browser',
'YA' => 'Yandex Browser',
'Y4' => 'Yandex Browser Corp',
'YL' => 'Yandex Browser Lite',
'YN' => 'Yaani Browser',
'Y2' => 'Yo Browser',
Expand Down
27 changes: 27 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9711,3 +9711,30 @@
engine: WebKit
engine_version: 604.1.38
family: Safari
-
user_agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.870 YaBrowser/24.1.3.870 (corp-ext) Yowser/2.5 Safari/537.36
client:
type: browser
name: Yandex Browser Corp
version: 24.1.3.870
engine: Blink
engine_version: 120.0.6099.870
family: ""
-
user_agent: Mozilla/5.0 (Linux 6.1.57; ; ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.234 Not_A Brand/8 YaBrowser/24.1.3.845 YaBrowserCorp/120 Yowser/2.5 Safari/537.36
client:
type: browser
name: Yandex Browser Corp
version: 24.1.3.845
engine: Blink
engine_version: 120.0.6099.234
family: ""
-
user_agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 YaBrowser/23.7.1.1217 (corp) Yowser/2.5 Safari/537.36
client:
type: browser
name: Yandex Browser Corp
version: 23.7.1.1217
engine: Blink
engine_version: 114.0.0.0
family: ""
6 changes: 6 additions & 0 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2264,6 +2264,12 @@
version: '$1'
engine:
default: 'Blink'
# Yandex Browser Corp (https://browser.yandex.ru/corp)
- regex: 'YaBrowser/(\d+[\.\d]*).*corp'
name: 'Yandex Browser Corp'
version: '$1'
engine:
default: 'Blink'
#Yandex Browser
- regex: 'YaBrowser(?:/(\d+[\.\d]*))(?: \((alpha|beta)\))?'
name: 'Yandex Browser'
Expand Down

0 comments on commit e871c28

Please sign in to comment.