All Projects → rangle → Redux Beacon

rangle / Redux Beacon

Licence: mit
Analytics integration for Redux and ngrx/store

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Redux Beacon

Analytics Reporter
Lightweight analytics reporting and publishing tool for Google Analytics data. Powers https://analytics.usa.gov, http://analytics.phila.gov, http://analytics.cityofsacramento.org, and more.
Stars: ✭ 545 (-15.5%)
Mutual labels:  analytics, google-analytics
wp-analytify
Google Analytics Dashboard Plugin For WordPress By Analytify
Stars: ✭ 20 (-96.9%)
Mutual labels:  analytics, google-analytics
Stop.Google.Analytics.Ghost.Spam.HOWTO
How to stop Google Analytics "Ghost" Spam using a well curated list of spam referrer domains and web sites. Simple and easy to use with instructions for creating Segments in Google Analytics using our google-exclude files.
Stars: ✭ 21 (-96.74%)
Mutual labels:  analytics, google-analytics
Google Analytics Module
Google Analytics Module
Stars: ✭ 556 (-13.8%)
Mutual labels:  analytics, google-analytics
Legato
Google Analytics Reporting API Client for Ruby
Stars: ✭ 407 (-36.9%)
Mutual labels:  analytics, google-analytics
web-analytics-handbook
Handbook - Rendezvous between developers and web data
Stars: ✭ 23 (-96.43%)
Mutual labels:  analytics, google-analytics
aws-web-analytics
Privacy-focused alternative to Google Analytics on AWS Pinpoint
Stars: ✭ 45 (-93.02%)
Mutual labels:  analytics, google-analytics
Ackee
Self-hosted, Node.js based analytics tool for those who care about privacy.
Stars: ✭ 3,140 (+386.82%)
Mutual labels:  analytics, google-analytics
Staccato
Ruby library to perform server-side tracking into the official Google Analytics Measurement Protocol
Stars: ✭ 380 (-41.09%)
Mutual labels:  analytics, google-analytics
Signal
Simple and beautiful open source Analytics 📊
Stars: ✭ 295 (-54.26%)
Mutual labels:  analytics, google-analytics
dashflare
🕵🏼‍♀️ Open Source and privacy-focused analytics solution. 📊 Advanced monitoring for your website behind Cloudflare
Stars: ✭ 78 (-87.91%)
Mutual labels:  analytics, google-analytics
Ganalytics
A tiny (312B) client-side module for tracking with Google Analytics
Stars: ✭ 491 (-23.88%)
Mutual labels:  analytics, google-analytics
Centcount Analytics
An open-source web analytics software. Developed by using PHP + MySQL + Redis, Can be easily deployed on your own server, 100% data ownership.
Stars: ✭ 249 (-61.4%)
Mutual labels:  analytics, google-analytics
Social-Media-Monitor
Automatically monitor and log fan counters from social media(Facebook Pages, Twitter, Instagram, YouTube, Google+, OneSignal, Alexa) using APIs to Google Spreadsheet. Very useful for website admins and social media managers.
Stars: ✭ 36 (-94.42%)
Mutual labels:  analytics, google-analytics
Next Ga
Next.js HOC to integrate Google Analytics on every page change
Stars: ✭ 228 (-64.65%)
Mutual labels:  analytics, google-analytics
svelte-google-analytics
Google Analytics component for Svelte
Stars: ✭ 41 (-93.64%)
Mutual labels:  analytics, google-analytics
Magento2 Google Tag Manager
Google Tag Manager is a user-friendly, yet powerful and cost-effective solution that is a must-have integration for every Magento store. It simplifies the process of adding and managing third-party JavaScript tags. With dozens of custom events and hundreds of data points our extensions the #1 GTM solution for Magento.
Stars: ✭ 208 (-67.75%)
Mutual labels:  analytics, google-analytics
Analytics
UNMAINTAINED! - Complete Google Analytics, Mixpanel, KISSmetrics (and more) integration for Meteor
Stars: ✭ 211 (-67.29%)
Mutual labels:  analytics, google-analytics
Laravel Gamp
📊 Laravel Google Analytics Measurement Protocol Package
Stars: ✭ 271 (-57.98%)
Mutual labels:  analytics, google-analytics
Vue Gtag
Global Site Tag plugin for Vue (gtag.js)
Stars: ✭ 445 (-31.01%)
Mutual labels:  analytics, google-analytics

Redux Beacon

Redux Beacon

Analytics integration for Redux and ngrx/store

Docs

Introduction

If you're using Redux or ngrx/store to manage your app's state, you can use Redux Beacon to tap into your dispatched actions and map them to events that are consumable by an analytics service (e.g. Google Analytics). With Redux Beacon your entire global state life-cycle becomes trackable.

Redux Beacon Diagram

  • Redux Beacon is lightweight. The core Redux Beacon module is tiny (~ 1KB), and each target, extension, and util, is either around the same size or smaller.

  • You can use Redux Beacon with any framework. Redux Beacon doesn't depend on any framework, you can use Redux Beacon with React, Angular, React Native, Vue or just plain JavaScript.

  • You can send analytics anywhere. We have prebuilt targets for the most popular analytics services, you can also build your own custom targets if you need to.

  • You can track analytics offline. Redux Beacon provides extensions for tracking analytics during intermittent outages in connectivity. These extensions save events in a persistent store when offline (e.g indexedDB). When back online, the extensions purge the store and pass the events off to a target. Read more about offline event collection in the docs.

Supported Targets

Version Package
Google npm @redux-beacon/google-analytics
Google npm @redux-beacon/google-analytics-gtag
Google npm @redux-beacon/google-tag-manager
Google npm @redux-beacon/react-native-google-analytics
Google npm @redux-beacon/react-native-google-tag-manager
Amplitude npm @redux-beacon/amplitude
Segment npm @redux-beacon/segment
Segment npm @redux-beacon/react-native-segment

Third-Party Targets

Version Package
Matomo npm redux-beacon-matomo-tag-manager
Appsflyer npm redux-beacon-react-native-appsflyer

Other Targets

If you don't see your analytics target listed it might be worth a shot doing a quick search on npmjs.org. If all else fails you can always build and provide your own custom Targets!

Integrations

Integration Integrates with Description
redux-dynamic-modules-beacon redux-dynamic-modules Redux Dynamic Modules is a library that allows to modularize redux code. With help of this extension events do not have to be defined in one central location but can be defined for each module individually.

Usage

  • Step 1. Pick out a target (see above)

  • Step 2. Pick out some events you want to track from your target's Event Definitions section

  • Step 3. Match the events to action types (see below)

Examples

Track a page view on each ROUTE_CHANGED action

const eventsMap = {
  'ROUTE_CHANGED': trackPageView(action => ({
    page: action.payload.routerState.url,
  })),
}

Track an event on each VIDEO_SELECTED action, use the state before the action and the state after the action to hydrate the analytics event

const eventsMap = {
  'VIDEO_SELECTED': trackEvent((action, prevState, nextState) => ({
    category: 'Videos',
    action: action.type,
    label: prevState.videos.currentCampaign,
    value: nextState.videos.numVideosSelected,
  }))
}

Track an event on every action using the special '*' key

const eventsMap = {
  '*': trackEvent(action => ({
    category: 'redux',
    action: action.type,
  })),
}

Track multiple events on each VIDEO_PLAYED action using the combineEvents util

const eventsMap = {
  'VIDEO_PLAYED': combineEvents(
    trackTiming(action => ({
      category: 'Videos',
      action: 'load',
      value: action.payload.loadTime,
    }))
    trackEvent(() => ({
      category: 'Videos',
      action: 'play'
    })),
  ),
}

Track an event on each 'VIDEO_SEARCHED' action, but throttle it with the debounceEvent util so it doesn't fire as often

const eventsMap = {
  'VIDEO_SEARCHED': debounceEvent(300,
     trackEvent(action => ({
       category: 'Videos',
       action: 'search',
       label: action.payload.searchTerm,
     }))
   ),
}

The trackPageView, trackEvent, and trackTiming functions used above are called eventDefinitions and are what you use to create events that are consumable by an analytics service (a.k.a "target"). Each target will have its own set of eventDefinitions that you can use and customize.

Don't like the idea of using an object to map actions?

You can use a function...

const pageView = trackPageView(action => ({
  page: action.payload.routerState.url,
}));

const videoLoadTime = trackTiming(action => ({
   category: 'Videos',
   action: 'load',
   value: action.payload.loadTime,
}));

const videoPlayed = trackEvent(() => ({
  category: 'Videos',
  action: 'play'
}));

const eventsMapper = (action) => {
  switch(action.type) {
    case 'ROUTE_CHANGED':
      return pageView;
    case 'VIDEO_PLAYED':
      return [videoLoadTime, videoPlayed]
    default:
      return [];
  }
}

More Examples & Recipes

Extensions & Plugins

Version Package
🔌 npm @redux-beacon/logger
🔧 npm @redux-beacon/combine-events
🔧 npm @redux-beacon/ensure
🔧 npm @redux-beacon/debounce-event
🔌 npm @redux-beacon/offline-web
🔌 npm @redux-beacon/offline-react-native
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].