Repository URL to install this package:
|
Version:
0.0.1 ▾
|
| state |
| package.json |
| index.js |
| README.md |
A redux/redux-saga connector that provides actions, reducers and sagas for interacting with Google Tag Manager. It communicates with the Tag Manager through the "Data Layer".
yarn install @doodle/tagmanager
// reducer.js import { createReducer as createTagManagerReducer } from '@doodle/tagmanager'; import { combineReducers } from 'redux'; export default combineReducers({ ...createTagManagerReducer(), });
// root saga import { all, call } from 'redux-saga/effects'; import { tagManagerSaga } from '@doodle/tagmanager'; export default function* rootSaga(options = {}) { yield all([ /* ... other sagas */ call(tagManagerSaga, options.tagManager), ]); }
yarn yarn start