Combine multiple event defintions into one. Use this if you want to dispatch multiple analytics events for a single action.
import combineEvents from '@redux-beacon/combine-events';
combineEvents(eventDef1 [, eventDef2, ..., eventDef3])
import combineEvents from '@redux-beacon/combine-events';
import { trackTiming, trackEvent } from '@redux-beacon/google-analytics';
import { VIDEO_PLAYING_ACTION } from './my/redux/actions';
const videoPlayed = trackEvent(() => ({
category: 'Videos',
action: 'play',
label: 'Fall Campaign'
}));
const videoLoaded = trackTiming(() => ({
category: 'Videos',
var: 'load',
value: 3549,
}));
const eventsMap = {
videoPlayed,
videoLoaded,
),
};