always prefer the google analytics client id.

This commit is contained in:
Mark Beamer Jr 2019-01-19 19:16:10 -05:00
parent 3dd1922e8d
commit c644f4c50e
No known key found for this signature in database
GPG key ID: 1C314FB89AD76973

View file

@ -37,6 +37,7 @@ class Session
Response::addPostRenderCallback(function () {
$ga_cid = filter_input(INPUT_COOKIE, 'ga_cid');
$site_visitor_id = key_exists(static::USER_ID, $_SESSION) ? $_SESSION[static::USER_ID] : $ga_cid;
$site_visitor_id = isset($ga_cid) ? $ga_cid : $site_visitor_id;
$response = LBRY::logWebVisitor(static::SITE_ID, $site_visitor_id, static::getClientIP());
if (!is_null($response)
&& key_exists('data', $response)