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
ga('send', 'event', [eventCategory], [eventAction], [even...