Last active
October 8, 2018 16:55
-
-
Save Neolot/dbf8b2916813f0b3a62604efd9c3dd38 to your computer and use it in GitHub Desktop.
Track 404 error with Universal Analytics
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 type="text/javascript"> | |
ga('send', 'event', 'error_404', '<?php echo $_SERVER['REQUEST_URI']; ?>', '<?php echo ($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'direct'; ?>'); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment