ga tracking code example
Example 1: set up google analytics
How to set up Google analytics:
Watch this video: https://www.youtube.com/watch?v=lZf3YYkIg8w
Or Click on this link: https://support.google.com/analytics/answer/1008015?hl=en
Example 2: GA Tracking
jQuery(document).ready(function () {
jQuery('.gaTrack, button, a.button, input[type="submit"], input[type="button"], input[type="reset"], .wp-block-button__link, .menu-item a, .menu a, li a').on('click', function() {
var name = jQuery(this).text();
ga('send', 'event', 'button', 'click', name);
});
})