1.2.17 • Published 4 days ago

@amplitude/plugin-global-user-properties v1.2.17

Weekly downloads
-
License
MIT
Repository
github
Last release
4 days ago

@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-propertiesv1.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

NameTypeDefaultDescription
shouldKeepOriginalUserPropertiesbooleanfalseUse 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');
1.2.16

8 days ago

1.2.17

4 days ago

1.2.15

12 days ago

1.2.15-beta.0

22 days ago

1.2.14

1 month ago

1.2.14-beta.0

1 month ago

1.2.13

2 months ago

1.2.12

2 months ago

1.2.11

2 months ago

1.2.9

3 months ago

1.2.10

3 months ago

1.2.8

3 months ago

1.2.7

4 months ago

1.2.6

5 months ago

1.2.5

5 months ago

1.2.4-beta.0

6 months ago

1.2.4

5 months ago

1.2.3

6 months ago

1.2.2

6 months ago

1.2.1

7 months ago

1.2.0

7 months ago

1.1.1

8 months ago

1.1.0

8 months ago