Amplitude

Setup

  1. Sign up for Amplitude at http://amplitude.comarrow-up-right and make a note of your API key.

  2. Install amplitude-jsarrow-up-right: npm install --save amplitude-js.

  3. Install the target:

     npm install --save @redux-beacon/amplitude

Usage

import amplitude from 'amplitude-js';
import Amplitude from '@redux-beacon/amplitude';

// Create or import an events map.
// See "getting started" pages for instructions.

// initialise amplitude
const amplitudeInstance = amplitude.getInstance();
amplitudeInstance.init('YOUR_API_KEY')

const target = Amplitude({ instance: amplitudeInstance });

const amplitudeMiddleware = createMiddleware(eventsMap, target);
const amplitudeMetaReducer = createMetaReducer(eventsMap, target);

Event Definitions

Don't see your event listed? Please submit a pull request to the Redux Beacon repositoryarrow-up-right with the missing event. Use the source of the existing event-helpers to guide your work. If you need any support feel free to make the pull request with all you're able to do. We can fill in the gaps from there.

event

Docs:

userId

Docs:

https://amplitude.zendesk.com/hc/en-us/articles/115001361248#setting-custom-user-idsarrow-up-right

logout

Docs:

https://amplitude.zendesk.com/hc/en-us/articles/115001361248#logging-out-and-anonymous-usersarrow-up-right

userProperties

Docs:

https://amplitude.zendesk.com/hc/en-us/articles/115001361248#setting-multiple-user-propertiesarrow-up-right

Last updated