jquery-analytics-event-tracking
jquery-analytics-event-tracking copied to clipboard
JQuery plugin for Event Tracking based on Universal Analytics (analytics.js)
GOOGLE ANALYTICS: ga('send', 'event', 'category', 'action', 'label', 4) versus SEGMENT: analytics.track('action', {category: 'category', label: 'label', value: 4})
The function uses a variable named `interaction`, but the actual name of the argument is `event_type`.
Uses jQuery delegated events: https://api.jquery.com/on/ The second commit fixes the indentation.
Fixed issue where interaction was not defined. Also unified formatting (it was using spaces in some places before and tabs elsewhere).