question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Override device_model

See original GitHub issue

On a web platform, the SDK sets os.name value with the UAParser lib.

https://github.com/amplitude/Amplitude-JavaScript/blob/6bc9065e56c5ad343254cfaba6d21d8c88d91c03/src/amplitude-client.js#L1143

It works fine, but in my case, I would like to send a little bit more information, such as the OS version (so Android 6 instead of Android). Would you be good if I write a PR to add an option to override it as you do with the platform property? Something like:

device_model: _shouldTrackField(this, 'device_model') ? (this.options.deviceModel || deviceModel || null) : null,

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
haoliu-ampcommented, Feb 10, 2021

@tommedema I agree, that’s definitely something we wanna fix. We target to get into this soon.

0reactions
tommedemacommented, Feb 10, 2021

@haoliu-amp why are you setting the device property to an operating system in the first place? Isn’t that why you have an os_name and os_version property? An operating system is not a device. A device would be something like Galaxy S8, iPhone X, etc. In theory one device can have different operating systems

Read more comments on GitHub >

github_iconTop Results From Across the Web

deviceModel | Apple Developer Documentation
A property key for a Boolean value that indicates whether the device is in a suspended state. static let deviceTransportType: CMIOExtensionProperty.
Read more >
Scripting API: SystemInfo.deviceModel - Unity - Manual
Exact format of model name is operating system dependent, for example iOS device names typically look like "iPhone6,1", whereas Android device names are...
Read more >
Change a device model - ExtraHop Documentation
Change a device model · At the top of the page, click Assets. · Click Devices in the left pane, and then click...
Read more >
Cannot change the Device Model Name - XDA Forums
HELP ME!! i cannot change the device model name i cannot find "ro.product.model" in my build prob And i am using a custom...
Read more >
Set-ActiveSyncDeviceAccessRule (ExchangePowerShell)
This example changes the access level granted to phones covered by the rule ContosoPhone (DeviceModel) to Quarantine. Example 2. PowerShell. Copy. Get- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found