-
Notifications
You must be signed in to change notification settings - Fork 165
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
Manually generated UserAgent #353
Conversation
Generated by 🚫 Danger |
It would be great if @sgiehl could take a quick look to make sure this method makes sense from a device-detector point of view. |
That would be great. It looks like we don't parse it to well if we use the SDK in a Mac app. This is how it looks like. Edit: |
141ae43
to
9e02982
Compare
Looks good from my side. Looks like a typical useragent of a mobile app... |
@brototyp For the MacOS strings, I guess they could be added to devicedetector, but that would mean only Matomo 4 would detect them properly. |
Hm. I guess both would be great.
What do you think about if we add the |
With the exception of one minor issue, this looks good to me! The issue is in |
Just to add another tidbit: When using Xcode 12/iOS 14, I see these log entries on app startup:
these disappear when using the code from this branch. |
Oh, yeah. Great catch! I think for a static library, the only way for us is to add the version in the code somewhere. This or so. extension MatomoTracker {
static let sdkVersion = "7.2.2"
} Any other idea? |
Alright. This is merged and will be part of the next release. |
Thanks for the fix. |
Hey @Guiboune, this was just released in version 7.3 |
I think we need to rethink our UserAgent generation. Right now the SDK asks the WebView to generate the UserAgent and will then replace
iPhone
with the actual iPhone version. There are just to many issues with it:This PR changes this and completely manually generates the UserAgent. The new, generated format is
iOSExampleApp/1.0 iPhone10,4 iOS/13.3 MatomoTrackerIOSSDK/7.2.2 Darwin/18.7.0
.iOSExampleApp/1.0
display name and marketing version of the appiPhone10,4
device identifieriOS/13.3
iOS VersionMatomoTrackerIOSSDK/7.2.2
Matomo SKD versionDarwin/18.7.0
Darwin versionAccording to the test website by @Findus23, Matomo parses this format perfectly well: have a look