Coder Social home page Coder Social logo

adapt-googleanalytics's Introduction

Google Analytics

An extension to facilitate Google Analytics in Adapt.

Installation

  • Add the following to config.json:
"_googleAnalytics": {
	"_isEnabled": true,
	"_trackingId": ""
}
  • Populate _trackingID with the tracking ID of your Google Analytics property.
  • Copy the extension folder into the src > extensions directory and run an appropriate Grunt task.

Usage

  • Every time a menu or page is loaded, a pageview is recorded with a new URL and title.
  • Pop-up interactions are tracked through custom events e.g. launching Notify, Drawer etc.
  • Media plays and percentage viewed are also tracked.
  • Additional events can be tracked with
    Adapt.trigger("googleAnalytics:trackEvent", category, action, label[, value[, isNonInteraction]]);
    Refer to trackEvent() in adapt-googleAnalytics.js and Event Tracking for details.

Attributes

Attribute Type Description Default
_isEnabled Boolean Enables Google Analytics tracking false
_isDebugMode Boolean Displays notifications when pageviews and events are tracked false
_trackingId String The tracking ID of the Google Analytics property to track, in the format "UA-XXXXX-Y" ""

adapt-googleanalytics's People

Contributors

tomgreenfield avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

tomgreenfield

adapt-googleanalytics's Issues

add global trackEvent listener

Adapt.trigger("google:track", category, action, label, value, isNonInteraction);

Useful if other extensions need to trigger events in obscure places.

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.