Events

These are the various types of events available in Google Analytics.

_trackEvent

Sends an event to Google Analytics. This is usually done when a visitor interacts with your site.

via ga.js
_gaq.push(['_trackEvent', 'Category', 'Action']); 
via analytics.js
ga('send', 'event', {
    eventCategory: 'Category',
      eventAction: 'Action'
});

Events can also include a label and a value.

via ga.js
_gaq.push(['_trackEvent', 'Category', 'Action', 'Label', 50]); 
via analytics.js
ga('send', 'event', {
    eventCategory: 'Category',
      eventAction: 'Action',
       eventLabel: 'Label',
       eventValue: 50
});

You can also set whether or not the user's hit should be counted as a non-interaction with the site or not. If this is set to true, this event will not be factored in for bounce rate calculations.

via ga.js
_gaq.push(['_trackEvent', 'Category', 'Action', undefined, 50, true]); 
via analytics.js
// Set the non-interaction flag...
ga('set', 'nonInteraction', true);

// ...then send in the event
ga('send', 'event', {
    eventCategory: 'Category',
      eventAction: 'Action',
       eventValue: 50
});

_trackSocial

Tracks a social interaction done by the visitor.

via ga.js
_gaq.push(['_trackSocial', 'facebook', 'share']); 
via analytics.js
ga('send', 'social', {
    socialNetwork: 'facebook',
     socialAction: 'share'
})

You can also pass in what the visitor shared.

via ga.js
_gaq.push(['_trackSocial', 'facebook', 'share', 'tagpla.net/foobar']); 
via analytics.js
ga('send', 'social', {
    socialNetwork: 'facebook',
     socialAction: 'share',
     socialTarget: 'tagpla.net/foobar'
})