Created
October 31, 2017 17:06
-
-
Save abrudtkuhl/6bf379b23edf09651a06748f60e2d164 to your computer and use it in GitHub Desktop.
Basic gtag.js Event Tracking Example
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
document.getElementById('search-submit').onclick = function() { | |
gtag('event', 'homepage_search', { | |
'event_category': 'Search', | |
'event_action': 'submit', | |
'event_label': 'Homepage Search' | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment