Implementation methods for events and transactions tracking in Google Analytics
I previously covered the different integration patterns and pitfalls when implementing google analytics. In that article, however, I did not include the implementation of events for Google Analytics, their setup within a website code base, or how to QA them.
Events in Google Analytics
There are different types of events in Google Analytics, the most basic one is a Page view event, but other types of events are available such as enhanced e-commerce events and custom events.
Basic Tracking
The most basic of events within Google Analytics is Page Views events. They are triggered by default on every page load. An event is composed of four different components: Category, Action, Label, and value.
The list of default analytics events is available here and includes event types such as checkout, purchase, login, signup, or search.
Enhanced Ecommerce
Enhanced e-commerce provides more granular tracking information by adding additional dimensions to certain events. For instance, with enhanced e-commerce, add to cart, and purchase events provide information at the product level rather than on a transaction level.