Last active
March 5, 2021 08:36
-
-
Save chavesm/15cc1fa8ea826d8b0531f9a8183e2641 to your computer and use it in GitHub Desktop.
Send an event to GA via MonsterInsights gtag version.
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
<script> | |
// Send an event via gtag. | |
__gtagTracker('event', 'Test Event', { | |
'event_category' : 'test_event', | |
'event_action' : 'test_action', | |
'event_label' : 'This is a test event.' | |
}); | |
</script> | |
<!-- Add to head section of page using proper enqueue | |
techniques or a plugin like Insert Headers and Footers. --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment