Created
November 8, 2018 15:10
-
-
Save kshitijdeota/9c88098c46a0891f82533044e491232e to your computer and use it in GitHub Desktop.
Track 404 event with Google Analytics
This file contains 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> | |
// Create Tracker - Send to GA | |
ga('create', 'UA-11111111-11'); | |
ga('send', { | |
hitType: 'event', | |
eventCategory: '404 Response', | |
eventAction: window.location.href, | |
eventLabel: document.referrer | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment