Created
August 28, 2014 19:52
-
-
Save klongdesigns/8ea3cd87d00c0c677acf to your computer and use it in GitHub Desktop.
Google Analytics event tracking code for WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendToGA(pagename,section) { | |
ga('send', { | |
'hitType': 'event', // Required. | |
'eventCategory': 'footerLink', // Required. | |
'eventAction': 'click', // Required. | |
'eventLabel': 'Footer Link: ' + section, | |
'eventValue': 4, | |
'page':'/'+pagename, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment