Google Analytics event tracking code for WordPress
function sendToGA(pagename,section) {
ga('send', {
'hitType': 'event', // Required.
'eventCategory': 'footerLink', // Required.
'eventAction': 'click', // Required.
'eventLabel': 'Footer Link: ' + section,
'eventValue': 4,
'page':'/'+pagename,
});
}