Giter Club home page Giter Club logo

redux-beacon's Introduction

Analytics integration for Redux and ngrx/store

  • React Native support
  • works well with React and Angular apps
  • track analytics events offline
  • centralize your analytics logic (keep action creators clean)
  • send analytics events to multiple targets (e.g. Google Analytics)
  • easily create your own custom targets.
  • easily create your own extensions for logging, and offline event collection

CircleCI npm version license

npm install --save redux-beacon

How it works

Rendux-Beacon provides a way to map your Redux or ngrx actions to analytics events. Once generated, Redux-Beacon sends the analytics events to a given target (e.g. Google Analytics).

Analytics events are defined in an event definition, and mapped to actions in an event definitions map:

// Event Definition
const pageView = {
  eventFields: action => ({
    hitType: 'pageview',
    page: action.payload,
  }),
};

// Event Definitions Map
const eventsMap = {
  LOCATION_CHANGE: pageView,
}

With the above event definitions map, Redux-Beacon will create a pageView event whenever an action with type LOCATION_CHANGE is fired, then it will push the generated event to a given target (e.g. Google Analytics).

Quick Start

Targets

Redux-Beacon provides prebuilt targets for some popular analytics services:

Docs

Check out the project site for API docs, tutorials, examples and more.

redux-beacon's People

Contributors

ttmarek avatar johannalee avatar xiongemi avatar sethdavenport avatar bertrandk avatar

Watchers

Ashraf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.