@amplitude/plugin-global-user-properties v1.2.17
@amplitude/plugin-global-user-properties
Official SDK plugin for adding global user properties to events
Installation
This package is published on NPM registry and is available to be installed using npm and yarn.
# npm
npm install @amplitude/plugin-global-user-properties
# yarn
yarn add @amplitude/plugin-global-user-properties
Usage
This plugin works on top of the Amplitude SDK and sends user properties as global user properties, a beta feature for that allows projects to share user properties (i.e. user properties can become "global" across multiple projects).
To use this plugin, you need to install @amplitude/plugin-global-user-properties
v1.0.0` or later.
1. Import Amplitude packages
@amplitude/plugin-global-user-properties
import * as Amplitude from '@amplitude/analytics-browser'
import { globalUserPropertiesPlugin } from '@amplitude/plugin-global-user-properties';
2. Instantiate page view plugin
The plugin accepts an optional parameter of type Object
to configure the plugin based on your use case.
const globalUserPropertiesPlugin = globalUserPropertiesPlugin({
shouldKeepOriginalUserProperties: true,
});
Options
Name | Type | Default | Description |
---|---|---|---|
shouldKeepOriginalUserProperties | boolean | false | Use this option if you want the user properties to be sent along with the global user properties. Since global user properties do not appear in Data yet, this would allow indirect governance (by observing the same properties as regular user properties). |
3. Install plugin to Amplitude SDK
amplitude.add(globalUserPropertiesPlugin);
4. Initialize Amplitude SDK
amplitude.init('API_KEY');
8 days ago
4 days ago
12 days ago
22 days ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
4 months ago
5 months ago
5 months ago
6 months ago
5 months ago
6 months ago
6 months ago
6 months ago
7 months ago
7 months ago
8 months ago
8 months ago