GithubHelp home page GithubHelp logo

meteor-gaevents's Introduction

GAevents

This package makes Google Analytics event tracking more like using Meteor's Collection API.

How to install:

  1. make sure you have meteorite installed
    $ npm install -g meteorite
  2. inside your project, run:
    $ mrt add GAevents

In your Meteor project:

Note: This is not server code. You should only be working with GAevents within your client files.

GAevents.insert({
  category: "User",
  action: "Purchased",
  label: "SKU:1177291828",
  value: 100 // numeric
}, true) // second argument defaults to false

API

GAevents has only one method, insert. Mirroring the Collection API provides for a very familiar interface to a not-so-familiar process of custom event tracking with Google Analytics.

GAevents.insert(object, bounce);

Pass an object that has the following params:

  • category (required): the highest level of type "User", "Account", "Order"
  • action (required): describes the event of the category "Purchased", "Created", "Confirmed"
  • label: enables you to add more depth to the event. Similar to a tag.
  • value: numeric. adds to the count of this category.

Optionally include a boolean (true/false) as second argument.

  • bounce: A boolean that when set to true, indicates that the event hit will not be used in bounce-rate calculation. Defaults to false.

Pull requests / issues

Please feel free to make pull requests and submit issues here. Thanks!

meteor-gaevents's People

Contributors

stevemanuel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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