Introduction
Below is the example of how to hard code the google analytics implementation in the website. To track the shopping cart actions let induce the tracking snippet. It look as below. You can track the events in google analytics open source tool
Syntax
ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);
Parameters
Field Name | Description |
---|
eventCategory | Typically the object that was interacted with (e.g. 'Video') |
eventAction | The type of interaction (e.g. 'play') |
eventLabel | Useful for categorizing events (e.g. 'Fall Campaign') |
eventValue | A numeric value associated with the event (e.g. 42) |