mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-09-13 22:19:52 +00:00
Merge pull request #925 from lbryio/use_client_id
always prefer the google analytics client id.
This commit is contained in:
commit
0516d19224
1 changed files with 1 additions and 0 deletions
|
@ -37,6 +37,7 @@ class Session
|
||||||
Response::addPostRenderCallback(function () {
|
Response::addPostRenderCallback(function () {
|
||||||
$ga_cid = filter_input(INPUT_COOKIE, 'ga_cid');
|
$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 = 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());
|
$response = LBRY::logWebVisitor(static::SITE_ID, $site_visitor_id, static::getClientIP());
|
||||||
if (!is_null($response)
|
if (!is_null($response)
|
||||||
&& key_exists('data', $response)
|
&& key_exists('data', $response)
|
||||||
|
|
Loading…
Add table
Reference in a new issue