You are here

function ga_push_method_php_utmp_get_uuid in GA Push 8

Same name and namespace in other branches
  1. 7 inc/ga_push.utmp.php.inc \ga_push_method_php_utmp_get_uuid()

Get an UUID ver 4 identifier form cookie or generates one on fallback.

Return value

string UUID ver 4 identifier

1 call to ga_push_method_php_utmp_get_uuid()
ga_push_method_utmp_php_request in inc/ga_push.utmp.php.inc
Sends tracking data to GA.

File

inc/ga_push.utmp.php.inc, line 253
UTMP: method and functions for Universal Tracking Measure Protocol.

Code

function ga_push_method_php_utmp_get_uuid() {
  if (isset($_COOKIE['_ga'])) {
    list($version, $domain_depth, $cid1, $cid2) = explode('.', $_COOKIE["_ga"], 4);
    return $cid1 . '.' . $cid2;
  }
  return ga_push_method_php_utmp_gen_uuid();
}