Skip to content

Commit

Permalink
[Amplitude] add device_manufacturer from user agent (#2025)
Browse files Browse the repository at this point in the history
For some devices (iPhones for instance), Amplitude requires a `device_manufacturer` property in order to compute their native property `Device Type` and `Device Family`

According to [their SDK](https://github.com/amplitude/Amplitude-TypeScript/blob/v1.x/packages/plugin-user-agent-enrichment-browser/src/user-agent-enrichment-plugin.ts#L26-L38) I've done the following changes:
 - added `device_manufacturer` based on `device.vendor`
 - updated `device_model` to first use `device.model` before falling back to `os.name`. As we can see in the snapshots tests, the `device_model` property makes more sense to be `iPhone` instead of `iOS` (which is already the `os_name`
  • Loading branch information
ardeois committed May 21, 2024
1 parent a60a271 commit 3f821a6
Show file tree
Hide file tree
Showing 3 changed files with 264 additions and 234 deletions.

0 comments on commit 3f821a6

Please sign in to comment.