40 lines
757 B
PHP
40 lines
757 B
PHP
<?php
|
|
/**
|
|
* @package ogre-consent
|
|
* @author cleverogre
|
|
* @copyright 2026 CleverOgre
|
|
* @license GLP-3.0-or-later
|
|
* @version 0.0.0
|
|
* @since 0.0.0
|
|
*/
|
|
|
|
namespace Ogre\Consent\Services;
|
|
|
|
use Ogre\Consent\GoogleTagManagerService;
|
|
use Override;
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
final class GoogleAnalytics extends GoogleTagManagerService {
|
|
|
|
protected function __construct() {
|
|
parent::__construct('google-analytics', consent_id: 'analytics_storage');
|
|
}
|
|
|
|
#[Override]
|
|
public function get_config(): array
|
|
{
|
|
return array_merge(
|
|
parent::get_config(),
|
|
[
|
|
'cookies' => [
|
|
'/^_ga(_.*)?/'
|
|
],
|
|
]
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
GoogleAnalytics::instance();
|