# combineEvents

Combine multiple event defintions into one. Use this if you want to dispatch multiple analytics events for a single action.

## Import

```javascript
import combineEvents from '@redux-beacon/combine-events';
```

## Syntax

```javascript
combineEvents(eventDef1 [, eventDef2, ..., eventDef3])
```

### Parameters

* `eventDef1 ... eventDefN`: [`EventDefinition`](https://rangle.gitbook.io/redux-beacon/index-1/event-definition)
  * The events you want to combine together.

## Example

```javascript
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,
  ),
};
```
