Tracking Events & Goals using Google Analytics

Their are two ways to track the events  using our google_analytics library.

First Option

Using this option we can trigger the event immediately, this mode is useful for firing GA events after an ajax request like a form filled, or load more button is pressed and new data is loaded.

 

Second Option

This mode of execution will be useful only when we are firing GA events along with other events, like say on click of a link or button where we are also performing other events on

 

Put this in Global JS Definition