@amplitude/plugin-custom-enrichment-browser
Official Browser SDK plugin for custom enrichment
Installation
This package is published on NPM registry and is available to be installed using npm and yarn.
npm install @amplitude/plugin-custom-enrichment-browser
yarn add @amplitude/plugin-custom-enrichment-browser
Usage
This plugin works on top of Amplitude Browser SDK and allows the user to execute custom functionality on their events. To use this plugin, you need to install @amplitude/analytics-browser version v2.0.0 or later.
1. Import Amplitude packages
@amplitude/plugin-custom-enrichment-browser
import { customEnrichmentPlugin } from '@amplitude/plugin-custom-enrichment-browser';
2. Instantiate custom enrichment plugin
const customEnrichmentPlugin = customEnrichmentPlugin();
Options
3. Install plugin to Amplitude SDK
amplitude.add(customEnrichmentPlugin);
4. Initialize Amplitude SDK
amplitude.init('API_KEY');
Result
This plugin executes a user-defined script, defined within Amplitude Remote Configuration Settings.
Event type
Event properties