Open kklem0 opened 1 year ago
I guess if Cookieless works with GA4 it'll also be fine. Google Site Kit uses GA4, I'm using Google Site Kit with Compatibility Mode.
Can we replace _ga/_gat/_gid to somethine random first then change it back before forwarding to google?
if (empty($_COOKIE['_ga'])) {
if (!empty($_COOKIE['p7YwEk']) && preg_match('/[0-9]{10}\.[0-9]{10}/', $_COOKIE['p7YwEk'])) {
$cid = $_COOKIE['p7YwEk'];
} else {
$cid = rand(1000000000, 9999999999) . "." . rand(1000000000, 9999999999);
}
setcookie('p7YwEk', $cid, time()+60*60*365*2);
$params['cid'] = $cid;
}
if (empty($_COOKIE['_gid'])) {
if (!empty($_COOKIE['25gXt4ZH']) && preg_match('/[0-9]{10}\.[0-9]{10}/', $_COOKIE['25gXt4ZH'])) {
$gid = $_COOKIE['25gXt4ZH'];
} else {
$gid = rand(1000000000, 9999999999) . "." . rand(1000000000, 9999999999);
}
setcookie('25gXt4ZH', $gid, time()+60*60*24*2);
$params['_gid'] = $gid;
}
Dumb fix that works for now.
Hi!
I'm sorry for not responding. I don't check Github that often, because I don't receive messages here often. :-)
I'm working on a Cookieless version of GA4 in the next release of CAOS Pro. Would that solve your problem?
Hi, I'm a Pro user. I noticed that each view is considered a new user when using AdGuard, I haven't tested other AD blocker yet. Here's the filter log, you can see the filter rule.