Skip to content

cgkineo/adapt-googleAnalytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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" ""

About

An extension to facilitate Google Analytics in Adapt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published