track event by ga

link
<a href="javascript:void 0" data-hit-type="event" data-category="category" data-action="action" data-label="label">link</a>
eventTracker.track('click', '[data-hit-type]');

track social by ga

link
<a href="javascript:void 0" data-hit-type="social" data-social-network="network" data-social-action="action" data-social-target="target">link</a>
eventTracker.track('click', '[data-hit-type]');

track screenview by ga

link
<a href="javascript:void 0" data-hit-type="screenview">link</a>
eventTracker.track('click', '[data-hit-type]');

track exception by ga

link
<a href="javascript:void 0" data-hit-type="exception">link</a>
eventTracker.track('click', '[data-hit-type]');

track timing by ga

link
<a href="javascript:void 0" data-hit-type="timing" data-timing-category="category" data-timing-var="var" data-timing-value="value" data-timing-label="label">link</a>
eventTracker.track('click', '[data-hit-type]');

callback from ga

link
<a href="javascript:void 0" data-callback-ga data-hit-type="event" data-category="category" data-action="action" data-label="label">link</a>
eventTracker.track('click', '[data-hit-type][data-callback-ga]', null, function() {
  console.log('callback from ga');
});

track by dataLayer

link
<a href="javascript:void 0" data-aaa="aaa" data-bbb="bbb" data-ccc="ccc">link</a>
eventTracker.track('click', '[data-aaa][data-bbb][data-ccc]');

track event by ga with merged data

link1 link2 link3
<a href="javascript:void 0" data-value="value1">link1</a>
<a href="javascript:void 0" data-value="value2">link2</a>
<a href="javascript:void 0" data-value="value3">link3</a>
eventTracker.track('click', '[data-value]', function(event, target) {
  return {
    hitType: 'event',
    category: 'category',
    action: 'action'
    label: target.getAttribute('data-value')
  };
});

track by dataLayer with object

link
<a href="javascript:void 0" data-track-object>link</a>
eventTracker.track('click', '[data-track-object]', {
  aaa: 1,
  bbb: 2,
  ccc: 3
});

callback from dataLayer

link
<a href="javascript:void 0" data-callback-data-layer>link</a>
eventTracker.track('click', '[data-callback-data-layer]', {
  aaa: 1,
  bbb: 2,
  ccc: 3
}, function() {
  console.log('callback from dataLayer');
});