2023-05-31 12:17:00 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace D3\GoogleAnalytics4\Application\Model;
|
|
|
|
|
2024-05-31 15:18:26 +02:00
|
|
|
use D3\GoogleAnalytics4\Application\Model\CMP\Usercentrics;
|
|
|
|
|
2023-05-31 12:17:00 +02:00
|
|
|
class ManagerTypes
|
|
|
|
{
|
2024-05-31 15:47:54 +02:00
|
|
|
const EXTERNAL_SERVICE = "eigener Service";
|
2024-09-21 16:20:48 +02:00
|
|
|
const INTERNAL_EXTERNAL_SERVICE = "externalService";
|
2024-05-31 15:47:54 +02:00
|
|
|
const NET_COOKIE_MANAGER = "Netensio Cookie Manager";
|
2024-09-21 16:20:48 +02:00
|
|
|
const INTERNAL_NET_COOKIE_MANAGER = "net_cookie_manager";
|
2023-05-31 12:17:00 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Further information's:
|
|
|
|
* https://github.com/aggrosoft/oxid-cookie-compliance
|
|
|
|
*/
|
2024-05-31 15:18:26 +02:00
|
|
|
const AGCOOKIECOMPLIANCE = "Aggrosoft Cookie Compliance";
|
2024-09-21 16:20:48 +02:00
|
|
|
const INTERNAL_AGCOOKIECOMPLIANCE = "agcookiecompliance";
|
2023-05-31 12:17:00 +02:00
|
|
|
|
2024-05-31 15:18:26 +02:00
|
|
|
const CONSENTMANAGER = "Consentmanager";
|
2024-09-21 16:08:08 +02:00
|
|
|
const INTERNAL_CONSENTMANAGER = "cmconsentmanager";
|
2023-05-31 12:17:00 +02:00
|
|
|
|
2024-05-31 15:47:54 +02:00
|
|
|
const COOKIEFIRST = "Cookiefirst";
|
2024-09-21 16:20:48 +02:00
|
|
|
const INTERNAL_COOKIEFIRST = "cookiefirst";
|
2023-06-27 08:33:49 +02:00
|
|
|
|
2024-05-31 15:47:54 +02:00
|
|
|
const COOKIEBOT = "Cookiebot";
|
2024-09-21 16:20:48 +02:00
|
|
|
const INTERNAL_COOKIEBOT = "cookiebot";
|
2023-09-07 15:08:06 +02:00
|
|
|
|
2023-05-31 12:17:00 +02:00
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function getManagerList(): array
|
|
|
|
{
|
|
|
|
return [
|
2024-09-21 16:20:48 +02:00
|
|
|
self::INTERNAL_EXTERNAL_SERVICE => self::EXTERNAL_SERVICE,
|
|
|
|
self::INTERNAL_AGCOOKIECOMPLIANCE => self::AGCOOKIECOMPLIANCE,
|
|
|
|
self::INTERNAL_NET_COOKIE_MANAGER => self::NET_COOKIE_MANAGER,
|
2024-05-31 15:18:26 +02:00
|
|
|
Usercentrics::sModuleIncludationInternalName => Usercentrics::sModuleIncludationPublicName,
|
|
|
|
Usercentrics::sExternalIncludationInternalName => Usercentrics::sExternalIncludationPublicName,
|
2024-09-21 16:20:48 +02:00
|
|
|
self::INTERNAL_CONSENTMANAGER => self::CONSENTMANAGER,
|
|
|
|
self::INTERNAL_COOKIEFIRST => self::COOKIEFIRST,
|
|
|
|
self::INTERNAL_COOKIEBOT => self::COOKIEBOT,
|
2023-05-31 12:17:00 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $sManager
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function isManagerInList(string $sManager) :bool
|
|
|
|
{
|
2024-05-31 15:47:54 +02:00
|
|
|
return in_array($sManager, array_keys($this->getManagerList()), true);
|
2023-05-31 12:17:00 +02:00
|
|
|
}
|
2024-09-21 16:08:08 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*
|
|
|
|
* the CMP from this method always needs the script tag delivered to the dom.
|
|
|
|
*/
|
|
|
|
public function scriptTagDeliveredByDefaultArray() :array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
Usercentrics::sModuleIncludationInternalName,
|
|
|
|
Usercentrics::sExternalIncludationInternalName,
|
|
|
|
ManagerTypes::INTERNAL_CONSENTMANAGER,
|
2024-09-21 16:20:48 +02:00
|
|
|
ManagerTypes::INTERNAL_COOKIEFIRST,
|
|
|
|
ManagerTypes::INTERNAL_COOKIEBOT,
|
|
|
|
ManagerTypes::INTERNAL_EXTERNAL_SERVICE
|
2024-09-21 16:08:08 +02:00
|
|
|
];
|
|
|
|
}
|
2023-05-31 12:17:00 +02:00
|
|
|
}
|