Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@amplitude/plugin-user-agent-enrichment-browser
Advanced tools
Official Browser SDK plugin for user agent enrichment.
This package is published on NPM registry and is available to be installed using npm and yarn.
# npm
npm install @amplitude/plugin-user-agent-enrichment-browser@^1.0.0
# yarn
yarn add @amplitude/plugin-user-agent-enrichment-browser@^1.0.0
This plugin works on top of the Amplitude Browser SDK. It's used for enriching events with user agent information using the @amplitude/ua-parser-js. The user agent identifies the application, operating system, vendor, and/or version of the requesting client. For Browser SDK v1.x, we use @amplitude/ua-parser-js internally to parse the user agent information. In Browser v2.x, we have removed this client-side user agent parser and have instead implemented server-side user agent parser. You can use this plugin to maintain consistency with the user agent information from earlier SDK versions.
@amplitude/analytics-browser
@amplitude/plugin-user-agent-enrichment-browser
import * as amplitude from '@amplitude/analytics-browser';
import { userAgentEnrichmentPlugin } from '@amplitude/plugin-user-agent-enrichment-browser';
The plugin accepts 1 optional parameter, which is an Object
to disable/enable the corresponding tracking options. Each option is enabled by default.
const uaPlugin = userAgentEnrichmentPlugin({
osName: true,
osVersion: true,
deviceManufacturer: false,
deviceModel: false,
});
Name | Type | Default | Description |
---|---|---|---|
osName | boolean | true | Enables enrichment of os_name property. |
osVersion | boolean | true | Enables enrichment of os_version property. |
deviceManufacturer | boolean | true | Enables enrichment of device_manufacturer property. |
deviceModel | boolean | true | Enables enrichment of device_model property. |
amplitude.add(uaPlugin);
amplitude.init('API_KEY');
This plugin parses user agent information using @amplitude/ua-parser-js and enriches events based on your configuration. This affects the value of the following properties: device_family
, device_model
, device_manufacturer
, device_type
, os
, os_name
, and os_version
.
FAQs
<b
We found that @amplitude/plugin-user-agent-enrichment-browser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 20 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.