Files
ogre-consent/inc/services/class-google-analytics.php
T
Cooper Dalrymple b8902b4afa
Validate Build / validate-build (push) Canceled after 0s
More work on this, incomplete!
2026-10-06 17:00:20 -05:00

49 lines
948 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 as Plugin;
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', title: Plugin::__('Google Analytics'));
}
#[Override]
public function get_purposes(): array
{
return [
'analytics',
];
}
#[Override]
public function get_config(): array
{
return array_merge(
parent::get_config(),
[
'cookies' => [
'/^_ga(_.*)?/'
],
]
);
}
}
GoogleAnalytics::instance();