Created
January 28, 2015 06:46
-
-
Save digdeep/1dfb6588382c0628d21e to your computer and use it in GitHub Desktop.
Generate event id per page view
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> | |
function makeid() | |
{ | |
var text = ""; | |
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
for( var i=0; i < 16; i++ ) | |
text += possible.charAt(Math.floor(Math.random() * possible.length)); | |
return text; | |
}; | |
var wp_event_ID = makeid(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment