-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Harmonize Readers' User-Agent #110
Comments
That's interesting. Can I assume you are referring to running analytics on the download library's server?
This is derived from
This is more complex. I cannot directly modify the User-Agent header through JavaScript for security reasons. This is a protected header that only browsers control. For cross-origin requests, I can, however, set certain CORS-safe headers like:
For this to work, say if I were to use Please note that the PWA still accesses One further issue is the necessary inconsistency in handling of the ZIM download (if this is being monitored):
|
Thanks for those details @Jaifroid ; the data was indeed extracted from logs of download.kiwix.org. |
Looking for per-reader downloads stats, we realized (back in 2017! kiwix/container-images#82) that our stats analytical tool (matomo) doesn't identify most of our readers.
While this is a matomo/operations issue/change, it highlighted the fact that our downloader's User-Agents are mising or poorly chosen.
Here's the situation. The identification column was built with matomo's lib for this.
aria2/{aria-version}
aria2/1.36.0
Type=library, Name=Aria2, Version=1.36.0
kiwix-android-version:{VersionCode}
kiwix-android-version:231101
,kiwix-android-version:-1
Name=Android, ShortName=AND, Platform=, Family=Android, Version=
Kiwix/{ProjectVersion} CFNetwork/{CFNetworkVersion Darwin/{DarwinVersion}
Kiwix/173 CFNetwork/1568.100.1.1.1 Darwin/24.0.0
Name=iOS, ShortName=IOS, Platform=, Family=iOS, Version=18.0
Kiwix/{ProjectVersion} CFNetwork/{CFNetworkVersion Darwin/{DarwinVersion}
Kiwix/173 CFNetwork/1568.100.1.2.1 Darwin/24.0.0
Name=iOS, ShortName=IOS, Platform=, Family=iOS, Version=18.0
xxx KiwixJSElectron/{nwVersion}-E xxx
(used in UA built by Electron)Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) KiwixJSElectron/3.4.1-E Chrome/122.0.6261.156 Electron/29.3.1 Safari/537.36
Type=mobile app, Name=KiwixJSElectron, Version=3.4.1, Name=Windows, ShortName=WIN, Platform=x64, Family=Windows, Version=10
--user-agent
when configuring aria2User-Agent
header of theURLRequest
I suggest we use the following:
Kiwix-{flavor}/{humanVersion} ({platform}/{platformVersion})
. I believe the build number is not useful but this is debatable and can be added as a comment (after the parenthesis).Which would translate as follows:
The most important question being: do we want to consider all readers as
Kiwix
product or should each be its own product? If not, then matomo for instance would group them all under theKiwix
product and we'd only be able to distingish readers-originated downloads from others but not compare readers togetherOnce this is settled, we can both patch our matomo image and make a PR for matomo's repo
There's also the question of CustomApps. In the logs, I've seen
AndroidDownloadManager
(when deferred to the system?),QtWebEngine
(kiwix-desktop ??),WikivoyagebyKiwix
(another branding hell).The text was updated successfully, but these errors were encountered: