I am using Segment to log screen data in my iOS app and import them to Amplitude. I found out that the `os` field on the event in amplitude is something like `WebKit 605` instead of the ios version. I inspect the event data on Segment and it has the correct os version data like `"os": { "name": "iOS", "version": "15.0.2" },`. Is there anything I set up incorrectly? Please help. Thanks!
Hi
Can you share with me on how you are instrumenting Segment data to Amplitude? Are you using cloud-mode or device-mode or Amplitude Actions?
If you are using cloud-mode or Amplitude Actions, then the value you see in Amplitude is what Segment provided to us. If you are using device-mode then this is the value that our SDKs picked up.
By the way, Webkit is a browser engine created by Apple. Version 605 is specifically for non-windows. When you see the value WebKit 605, you should be seeing this for browser events correct?
If so, it looks like Apple is now using Webkit v. 605.x.x for their iOS browsers as well:
https://developers.whatismybrowser.com/useragents/explore/layout_engine_name/webkit/
This value will appear if iOS Apps have built in browser (think opening a link in the mail app that opens a browser within the mail app instead of opening in Safari). Does this situation sound familiar to you?
Thanks
I believe we are using cloud-mode: iOS app sends data to Segment and Segment sends it over to Amplitude.
When I look at the data Segment receives, it has this filed in `context`:
"os": {
"name": "iOS",
"version": "15.1.1"
},
it also has user agent as well:
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
But when I look at the same event that Amplitude collects, the OS field becomes `WebKit 605`. But I really needs it to be `iOS 15.1.1`.
I am pretty sure this event is collected in our native app instead of an in-app browser.
Do you have any idea where went wrong and how i can further debug this issue? Thank you
Thanks
I got to contact support at Segment and found the problem, indeed Segment is sending “Webkit 605” to Amplitude so that’s why event displays this OS.
Here is quote from Segment support:
I see that you are using our analytics-swift library and Amplitude is connected in cloud-mode. I understand you are having some issues with how OS Platform is being displayed on Amplitude.
Our server-side (cloud-mode connection) Amplitude mapping logic is the following: we check first ifparsedUserAgent.browser.name
&parsedUserAgent.browser.major
exist - these are the values from theuserAgent
string. If these values are not available, we usecontext.os.name
andcontext.os.version
respectively.
One of the differences of analytics-swift library is that, unlike analytics-ios, it collectsuserAgent
, so it looks like this is where the values like "Webkit 605" come from.
A potential solution here is to use Amplitude (Actions) destination instead of Amplitude classic. With Amplitude actions, you can explicitly set how you want to map the OS name and version and these are the default settings...
With Amplitude Actions destination, I could successfully ingest events with correct OS field.
Thanks!
But glad that they were also able to provide a workaround in the meantime!
Appreciate you again for following up on this and sharing this knowledge with us!
Hi
Reply
Welcome to the Amplitude Community!
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. You can also create a Guest account below!
If you're a current customer, select the domain you use to sign in with Amplitude.
analytics.amplitude.com analytics.eu.amplitude.comWelcome to the Amplitude Community!
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. Want to sign up as a guest? Create a Community account.
If you're a current customer, select the domain you use to sign in with Amplitude.
analytics.amplitude.com analytics.eu.amplitude.comEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.