All Projects → okgrow → auto-analytics

okgrow / auto-analytics

Licence: MIT license
UNMAINTAINED! - Complete Google Analytics, Mixpanel, KISSmetrics (and more) integration for JavaScript applications.

Programming Languages

184084 projects - #8 most used programming language

Projects that are alternatives of or similar to auto-analytics

A toolset to use Segments open-source analytics library (analytics.js) WITHOUT using the paid Segment service ( To be used with your favorite analytics-tools like Google Analytics, Mixpanel, Hotjar, etc.
Stars: ✭ 47 (+67.86%)
Mutual labels:  segment, google-analytics, mixpanel
UNMAINTAINED! - Complete Google Analytics, Mixpanel, KISSmetrics (and more) integration for Meteor
Stars: ✭ 211 (+653.57%)
Mutual labels:  segment, meteor, google-analytics
Meteor Iron Router Ga
Google analytics for Iron Router
Stars: ✭ 76 (+171.43%)
Mutual labels:  meteor, google-analytics
A Chrome extension to enhance debugging of some frequently-used tag management platforms (Google Tag Manager, Tealium, Commanders Act, DTM) in combination with some frequently-used tags (Google Analytics, Google Analytics 4, GA Audiences, Ddm, Criteo, Adobe Analytics/Omniture, Floodlight, Comscore, Facebook, Bluekai, Youbora, Kinesis, Webtrekk, …
Stars: ✭ 23 (-17.86%)
Mutual labels:  segment, google-analytics
A simple Meteor and Braintree drop-in integration
Stars: ✭ 25 (-10.71%)
Mutual labels:  meteor
🎨 A Material color palette tool based on Meteor, React, Material UI.
Stars: ✭ 45 (+60.71%)
Mutual labels:  meteor
Tech stack for building MACRA and 21st Century Cures compliant webapps.
Stars: ✭ 75 (+167.86%)
Mutual labels:  meteor
A farming game built upon Ethereum platform.
Stars: ✭ 60 (+114.29%)
Mutual labels:  meteor
an upgraded version of Meteor subscribe, which helps optimize data and performance!
Stars: ✭ 13 (-53.57%)
Mutual labels:  meteor
The Meteor framework development tool belt, evolved.
Stars: ✭ 146 (+421.43%)
Mutual labels:  meteor
redoc - generate documentation from multiple project repos.
Stars: ✭ 21 (-25%)
Mutual labels:  meteor
Integrates Vue with Grapher in an easy-to-use way
Stars: ✭ 19 (-32.14%)
Mutual labels:  meteor
A fully customisable and flexible tab bar controller
Stars: ✭ 37 (+32.14%)
Mutual labels:  segment
Custom bootstrap-datetimepicker input type with timezone support for AutoForm
Stars: ✭ 18 (-35.71%)
Mutual labels:  meteor
Simple id based video calling in meteor
Stars: ✭ 33 (+17.86%)
Mutual labels:  meteor
Vue.js PWA/SPA template initially scaffolded with vue-cli and configured for SEO. Makes use of prerendering and other techniques/packages in order to achieve a perfect "Lighthouse Score".
Stars: ✭ 41 (+46.43%)
Mutual labels:  google-analytics
Stars: ✭ 44 (+57.14%)
Mutual labels:  meteor
Official React Native Tracking Library for Mixpanel Analytics
Stars: ✭ 69 (+146.43%)
Mutual labels:  mixpanel
Demo application that implements Google Analytics tracking in an aspect-oriented way using AspectJ.
Stars: ✭ 31 (+10.71%)
Mutual labels:  google-analytics
🍃 Meteor Logging: Store application log messages in MongoDB
Stars: ✭ 20 (-28.57%)
Mutual labels:  meteor

Auto Analytics

Automated page tracking (+ more!) with any Analytics service of your choice! 🔥

Use one API, thanks to's analytics.js, to easily and automatically record and send data from your JavaScript application to your analytics platforms.

NOTE: The @okgrow/auto-analytics package replaces the now deprecated okgrow-auto-analytics package.

NOTE: This pkg is no longer being actively maintained, if you'd like to maintain this pkg please express interest by opening an issue.

Table of Contents


Auto Analytics 2.0+

With version 2.X we are removing the embedded Segment analytics.js module. With version 2.0.0 and beyond you will need to build your own Segment analytics.js module manually.

NOTE: We have not added the package Segment analytics.js as an explicit dependency because some developers will prefer to add only individual integrations or create a customized analytics.js module in order to keep the weight of the package to a minimum.

Auto Analytics 1.0+

With the first version of this package we basically extracted code from our more Meteor-specific Atmosphere package to create a more generally usable package for the whole JavaScript community.

Quick Start

npm install --save @okgrow/auto-analytics
import { initAnalytics } from '@okgrow/auto-analytics';
// NOTE: You must build your own analytics.js, see Creating Segment's analytics.js for details.
import analytics from './your-custom-build/analytics.min.js';

// Add your analytics integrations and their tracking ids + config options here.
const settings = {
  integrations: {
    'Google Analytics': { 'trackingId': 'Your tracking ID' },
    'Mixpanel': { 'token': '...', 'people': true },
  options: {
    // Segment options to be passed to initialize() from analytics.js-core
  autorun: true, // Defaults to true if not provided.


Creating Segment's analytics.js

If you wish to keep using the same analytics.min.js bundle (file size: 244kb) from v1.0.6 you can find it here. To reduce bundle size or to add Analytic integrations previously not supported then follow the below process.

Recommended process

  1. Clone this example repo down git clone
  2. cd analytics.js
  3. npm install && npm run build
  4. The build will output these two files: analytics.js and analytics.min.js

Too reduce the final bundle size, remove any integrations that you are not using. To do that:

  1. Open up the lib/integrations.js file and remove all the integrations that you will not use.
  2. Now re-run npm run build
  3. Your analytics.js and analytics.min.js will only contain the integrations you are using.
  4. Copy the analytics.min.js file to your project so that @okgrow/auto-analytics can use it.

Not Recommended: Use Segment's example analytics.js Package

Segment's analytics.js package offers a large number of integrations with various analytics providers. Installing their example package will give you all of their supported integrations(very large bundle size):

npm install --save analytics.js

However it is recommend that you build your own analytics.js with only the integrations you need. You can see all possible analytics.js-integrations here.

Integrations Config

The service names and API key-names provided in the integrations section are specific to each platform. Make sure to use the correct service name and key shown for the platform you're adding.

There are other options which are not documented in the example above. To find them search for your specific integration in this file and look at the options and their defaults that are set with .option(...).

Package Usage

Page views

Compatible with any router, this package will log page views automatically. Each page is logged with the follow parameters:

  • path: path part of the URL
  • title: the page's title
  • url: hostname + path
  • search: the URL's query string, if provided. blank otherwise
  • referrer: hostname + old path, if coming from a previous route

To disable automatic page view tracking add autorun: false to your settings object when configuring then manually log a page view by calling'page name'):

Event tracking

Track any event by simply calling the analytics.track() function:

analytics.track("Bought Ticket", {
  eventName: "Wine Tasting",
  couponValue: 50,

Check's analytics.js track documentation for a full description of track() and all the other functions available in this package.


When adding your platforms and setting events to track you may want to keep debug on locally. This will log all the analytics package's activity to the console.

To turn on debugging, in the console:

> analytics.debug()

Turn debugging off, in the console:

> analytics.debug(false)


If you, or your users, are running an ad blocker in their browser and the analytics package is not bundled into a single JavaScript file to the browser (i.e., downloads as analytics.js or something similar) the browser's ad blocker may prevent analytics tracking. This can happen during development mode when all JavaScript files are typically not bundled together.

To solve this problem with a Meteor application, for example, you can run the application in production mode like this:

meteor run --production --settings settings.json

NOTE: If an Ad-blocker is enabled the expected behaviour is that your analytic events will not be received. You will see an error message in your console reporting the events being blocked.

Example React Router Application

This package includes an examples directory containing a simple (Meteor) application using react-router with a analytics.min.js containing only the Google Analytics and Mixpanel integrations. This is just an example with a common router and doesn't imply this plugin only works with this router or only with Meteor. This application can be run from its directory with:

meteor --settings settings.json --production.


This is an open source package. We hope to deal with contributions in a timely manner, but that's not always the case. The main maintainers are:


Feel free to ping if there are open issues or pull requests which are taking a while to be dealt with!


Issues and Pull Requests are always welcome.

Please read our contribution guidelines.

If you are interested in becoming a maintainer, get in touch with us by sending an email or opening an issue. You should already have code merged into the project. Active contributors are encouraged to get in touch.

Please note that all interactions in @okgrow's repos should follow our Code of Conduct.


Released under the MIT license © 2017 OK GROW!.

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].