Skip to content
Matomo (formerly Piwik) tag manager integration for redux-beacon.
Branch: master
Clone or download
semantic-release-bot chore(release): 1.0.0 [skip ci]
# 1.0.0 (2019-06-14)

### Features

* add redux-beacon middleware for Matomo Tag Manager ([30472a2](30472a2))
Latest commit 0fd2965 Jun 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci chore: fix running integration tests on CircleCI Jun 14, 2019
docs chore(release): 1.0.0 [skip ci] Jun 14, 2019
fixtures chore: simplify set up for integration tests Jun 14, 2019
src feat: add redux-beacon middleware for Matomo Tag Manager Jun 14, 2019
.editorconfig chore: initial commit May 11, 2019
.gitattributes
.gitignore chore: initial commit May 11, 2019
.huskyrc chore: initial commit May 11, 2019
.lintstagedrc feat: add redux-beacon middleware for Matomo Tag Manager Jun 14, 2019
CHANGELOG.md chore(release): 1.0.0 [skip ci] Jun 14, 2019
LICENSE
README.md feat: add redux-beacon middleware for Matomo Tag Manager Jun 14, 2019
commitlint.config.js
jest-puppeteer.config.js chore: simplify set up for integration tests Jun 14, 2019
jest.common.config.js chore: set up main integration test framework Jun 14, 2019
jest.config.js
jest.integration.config.js
jest.unit.config.js feat: add redux-beacon middleware for Matomo Tag Manager Jun 14, 2019
package.json chore(release): 1.0.0 [skip ci] Jun 14, 2019
release.config.js chore: initial commit May 11, 2019
tsconfig.build.json
tsconfig.json
tslint.json chore: initial commit May 11, 2019
typedoc.json
webpack.config.js

README.md

redux-beacon-matomo-tag-manager

npm version downloads open issues FOSSA Status debug build status codecov dependency status devDependency status Greenkeeper semantic release

Matomo (formerly Piwik) tag manager integration for redux-beacon.

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install redux-beacon-matomo-tag-manager --save

Usage

  1. Sign up for or install Matomo Tag Manager and create a new web container.
  2. Add the Matomo Tag Manager container snippet to your site.
  3. Install redux-beacon in your app
  4. Use this library to connect redux-beacon to the tag manager
import { applyMiddleware, createStore } from 'redux'
import { createMiddleware } from 'redux-beacon'
import MatomoTagManager from 'redux-beacon-matomo-tag-manager'

const ACTION_TYPE = 'ACTION_TYPE'

// Set up which actions should trigger which events or variables
const eventsMap = {
  [ACTION_TYPE]: () => ({
    event: 'integrationTestEvent'
  })
}

// Create the middleware
const matomoTagManager = MatomoTagManager()
const matomoTagManagerMiddleware = createMiddleware(eventsMap, matomoTagManager)

const store = createStore((state = {}) => state, applyMiddleware(matomoTagManagerMiddleware))

// When you dispatch an action, the middleware will trigger the event
store.dispatch({
  type: ACTION_TYPE
})

Thanks

Thanks to Matomo for supporting this project by providing an analytics property for integration testing this library.

You can’t perform that action at this time.