8
0

Commits vergleichen

..

5 Commits
1.5.0 ... 1.6.0

Autor SHA1 Nachricht Datum
e624cfdfcb bump version && changelog to 1.6.0 2023-05-30 08:56:19 +02:00
e2cdda530b adjusted usercentrics script 2023-05-26 13:49:50 +02:00
3e65d05c0b added position to block-extension 2023-05-24 11:09:36 +02:00
561a2101f1 [working-state] restructuring usercentricts & consentmanager decision
consentmanager decision is working so far; next step is implementing usercentricts
2023-05-23 14:52:07 +02:00
6fca52cc06 add usercentrics chosable settings-value; add additional methods; add new multilang-idents 2023-05-23 14:33:35 +02:00
4 geänderte Dateien mit 39 neuen und 16 gelöschten Zeilen

Datei anzeigen

@ -31,8 +31,10 @@ $aLang = [
// for cookie manager settings
'SHOP_MODULE_GROUP_d3_gtm_settings_cookiemanager' => 'Cookie Manager Einstellungen',
'SHOP_MODULE_d3_gtm_settings_hasOwnCookieManager' => 'Cookie Manager nutzen?',
'SHOP_MODULE_d3_gtm_settings_HAS_CONSENTMANAGER' => 'Nutzen Sie die Consentmanager-Einbindung?',
'SHOP_MODULE_d3_gtm_settings_HAS_CONSENTMANAGER_NO' => 'Nein',
'SHOP_MODULE_d3_gtm_settings_HAS_CONSENTMANAGER_YES' => 'Ja',
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER' => 'Nutzen Sie eine der folgenden Einbindungen?<br>
Dann wählen Sie bitte die zutreffende aus.',
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_NONE' => '---',
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_CONSENTMANAGER' => 'consentmanager',
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_USERCENTRICS' => 'usercentrics',
'SHOP_MODULE_d3_gtm_settings_cookieName' => 'CookieID',
];

Datei anzeigen

@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.6.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.5.0...1.6.0) - 2023-05-30
### Added
- possibility to choose between consentmanager && usercentrics
- position to block extension
### Changed
- genuine code cleanup
- usercentrics includation script
## [1.5.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.4.0...1.5.0) - 2023-05-23
### Added
- additional settings to explicitly indicate that consentmanager is used

Datei anzeigen

@ -33,9 +33,21 @@ class ViewConfig extends ViewConfig_parent
return $this->sContainerId;
}
public function getModuleConsentmanagerSettingSelectValue() :bool
/**
* @return mixed
*/
public function getModuleSettingExplicitManagerSelectValue()
{
return Registry::getConfig()->getConfigParam('d3_gtm_settings_HAS_CONSENTMANAGER') === 'YES';
return Registry::getConfig()->getConfigParam('d3_gtm_settings_HAS_STD_MANAGER');
}
/**
* @return false|mixed
*/
public function getExplicitManager()
{
$sManagerName = $this->getModuleSettingExplicitManagerSelectValue();
return $sManagerName === "NONE" ? false : $sManagerName;
}
public function getCookieManagerType()
@ -58,8 +70,8 @@ class ViewConfig extends ViewConfig_parent
}
}
if ($this->sCookieManagerType === false and $this->getModuleConsentmanagerSettingSelectValue()){
return "consentmanager";
if ($this->sCookieManagerType === false and $this->getExplicitManager()){
return "externalService";
}
return $this->sCookieManagerType;
@ -95,8 +107,8 @@ class ViewConfig extends ViewConfig_parent
}
}
// UserCentrics
if ($this->getCookieManagerType() === "oxps_usercentrics" or $this->getCookieManagerType() === 'consentmanager') {
// UserCentrics or consentmanager
if ($this->getCookieManagerType() === "oxps_usercentrics" or $this->getCookieManagerType() === 'externalService') {
// Always needs the script-tags delivered to the DOM.
return true;
}
@ -114,15 +126,15 @@ class ViewConfig extends ViewConfig_parent
{
$oConfig = Registry::getConfig();
if ($this->getCookieManagerType() == "oxps_usercentrics") {
if ($this->getCookieManagerType() === "oxps_usercentrics" or $this->getExplicitManager() === 'USERCENTRICS') {
$sCookieId = $oConfig->getConfigParam('d3_gtm_settings_cookieName');
if ($sCookieId) {
return 'type="text/plain" data-usercentrics="' . $sCookieId . '"';
return 'data-usercentrics="' . $sCookieId . '" type="text/plain" async=""';
}
}
if ($this->getCookieManagerType() == "consentmanager") {
if ($this->getCookieManagerType() === "externalService" and $this->getExplicitManager() === 'CONSENTMANAGER') {
$sCookieId = $oConfig->getConfigParam('d3_gtm_settings_cookieName');
if ($sCookieId) {

Datei anzeigen

@ -17,7 +17,7 @@ $aModule = [
Die Entwicklung basiert auf einem Fork von Marat Bedoev - <a href='https://github.com/vanilla-thunder/oxid-module-gtm'>Github-Link</a>
",
'thumbnail' => 'thumbnail.png',
'version' => '1.5.0',
'version' => '1.6.0',
'author' => 'Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'https://www.oxidmodule.com/',
@ -35,7 +35,8 @@ $aModule = [
[
'template' => 'layout/base.tpl',
'block' => 'head_meta_robots',
'file' => '/Application/views/blocks/_gtm_js.tpl'
'file' => '/Application/views/blocks/_gtm_js.tpl',
'position' => 150
],
// tag manager nojs
[
@ -122,10 +123,10 @@ $aModule = [
],
[
'group' => 'd3_gtm_settings_cookiemanager',
'name' => 'd3_gtm_settings_HAS_CONSENTMANAGER',
'name' => 'd3_gtm_settings_HAS_STD_MANAGER',
'type' => 'select',
'value' => 'none',
'constraints' => 'NO|YES',
'constraints' => 'NONE|CONSENTMANAGER|USERCENTRICS',
],
]
];