Comparer les révisions

..

Pas de révisions en commun. "1.6.0" et "1.5.0" ont des historiques entièrement différents.
1.6.0 ... 1.5.0

4 fichiers modifiés avec 16 ajouts et 39 suppressions

Voir le fichier

@ -31,10 +31,8 @@ $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_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_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_cookieName' => 'CookieID',
];

Voir le fichier

@ -4,14 +4,6 @@ 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

Voir le fichier

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

Voir le fichier

@ -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.6.0',
'version' => '1.5.0',
'author' => 'Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'https://www.oxidmodule.com/',
@ -35,8 +35,7 @@ $aModule = [
[
'template' => 'layout/base.tpl',
'block' => 'head_meta_robots',
'file' => '/Application/views/blocks/_gtm_js.tpl',
'position' => 150
'file' => '/Application/views/blocks/_gtm_js.tpl'
],
// tag manager nojs
[
@ -123,10 +122,10 @@ $aModule = [
],
[
'group' => 'd3_gtm_settings_cookiemanager',
'name' => 'd3_gtm_settings_HAS_STD_MANAGER',
'name' => 'd3_gtm_settings_HAS_CONSENTMANAGER',
'type' => 'select',
'value' => 'none',
'constraints' => 'NONE|CONSENTMANAGER|USERCENTRICS',
'constraints' => 'NO|YES',
],
]
];