function _shurly_analytics_get_uuid in ShURLy 8
Same name and namespace in other branches
- 7 shurly_analytics/shurly_analytics.module \_shurly_analytics_get_uuid()
Function to get a unique uuid Taken from http://www.stumiller.me/implementing-google-analytics-measurement-protoc...
1 call to _shurly_analytics_get_uuid()
- _shurly_analytics_cookies in shurly_analytics/
shurly_analytics.module - Function to retrieve the cid from the cookie Taken from http://www.stumiller.me/implementing-google-analytics-measurement-protoc...
File
- shurly_analytics/
shurly_analytics.module, line 76 - Analytics ShURLy functionalities.
Code
function _shurly_analytics_get_uuid() {
return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xfff) | 0x4000, mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff));
}