event-tracking
v1.0.1
Published
Google Analytics event tracking JavaScript module.
Downloads
7
Maintainers
Readme
Event Tracking (Google Analytics)
Install
npm install event-tracking --save-dev
Use
var eventTracking = require('event-tracking')();
Add the class click-tracking
to an element that needs a event tracked in Google Analytics. Add data-action
and data-label
attributes that will update the action and label for in Google Analytics events.
<a href="#" class="click-tracking" data-action="Menu" data-label="Header menu open">Menu</a>
Release History
- 1.0.1: Update documentation.
- 1.0.0: Initial release.
Contributing
- Fork it
- Run
npm install
- Run Grunt watch
grunt watch
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am "Add some feature"
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request## License MIT © Ryan Burgess