Compare commits
5 Commits
3.0.0.0
...
dev_3.x_OX
Author | SHA1 | Date | |
---|---|---|---|
4ae48d1148 | |||
fcdb794c93 | |||
5d547247bc | |||
0b2209136f | |||
6172cbcbd8 |
@ -21,7 +21,7 @@ class GA4AdminUserInterface_main extends \OxidEsales\Eshop\Application\Controlle
|
|||||||
$this->addTplParam('d3ViewObject', $this);
|
$this->addTplParam('d3ViewObject', $this);
|
||||||
$this->addTplParam('d3ViewConfObject', Registry::get(ViewConfig::class));
|
$this->addTplParam('d3ViewConfObject', Registry::get(ViewConfig::class));
|
||||||
$this->addTplParam('d3ManagerTypeArray', oxNew(ManagerTypes::class)->getManagerList());
|
$this->addTplParam('d3ManagerTypeArray', oxNew(ManagerTypes::class)->getManagerList());
|
||||||
$this->addTplParam('d3CurrentCMP', oxNew(ManagerHandler::class)->getCurrManager());
|
$this->addTplParam('d3CurrentCMP', oxNew(ManagerHandler::class)->getActManager());
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
@ -41,10 +41,10 @@ class GA4AdminUserInterface_main extends \OxidEsales\Eshop\Application\Controlle
|
|||||||
'_blEnableUsercentricsConsentModeApi',
|
'_blEnableUsercentricsConsentModeApi',
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($aCheckBoxParams as $checkBoxName) {
|
foreach ($aCheckBoxParams as $checkBoxName){
|
||||||
if (isset($aParams['bool'][$checkBoxName])) {
|
if (isset($aParams['bool'][$checkBoxName])){
|
||||||
$aParams['bool'][$checkBoxName] = true;
|
$aParams['bool'][$checkBoxName] = true;
|
||||||
} else {
|
}else{
|
||||||
$aParams['bool'][$checkBoxName] = false;
|
$aParams['bool'][$checkBoxName] = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,8 +60,8 @@ class GA4AdminUserInterface_main extends \OxidEsales\Eshop\Application\Controlle
|
|||||||
{
|
{
|
||||||
$oConfig = Registry::getConfig();
|
$oConfig = Registry::getConfig();
|
||||||
foreach ($aParams as $sConfigType => $aConfigParams) {
|
foreach ($aParams as $sConfigType => $aConfigParams) {
|
||||||
foreach ($aConfigParams as $sParamName => $sParamValue) {
|
foreach ($aConfigParams as $sParamName => $sParamValue){
|
||||||
if ($this->d3GetModuleConfigParam($sParamName) !== $sParamValue) {
|
if($this->d3GetModuleConfigParam($sParamName) !== $sParamValue){
|
||||||
$oConfig->saveShopConfVar(
|
$oConfig->saveShopConfVar(
|
||||||
$sConfigType,
|
$sConfigType,
|
||||||
Constants::OXID_MODULE_ID.$sParamName,
|
Constants::OXID_MODULE_ID.$sParamName,
|
||||||
@ -82,4 +82,4 @@ class GA4AdminUserInterface_main extends \OxidEsales\Eshop\Application\Controlle
|
|||||||
{
|
{
|
||||||
return Registry::get(ViewConfig::class)->d3GetModuleConfigParam($configParamName);
|
return Registry::get(ViewConfig::class)->d3GetModuleConfigParam($configParamName);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -7,41 +7,11 @@ use OxidEsales\Eshop\Core\ViewConfig;
|
|||||||
|
|
||||||
class ManagerHandler
|
class ManagerHandler
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Gets current chosen Manager
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getCurrManager(): string
|
|
||||||
{
|
|
||||||
/** @var ManagerTypes $oManagerTypes */
|
|
||||||
$oManagerTypes = oxNew(ManagerTypes::class);
|
|
||||||
|
|
||||||
/** @var ViewConfig|\D3\GoogleAnalytics4\Modules\Core\ViewConfig $oViewConfig */
|
|
||||||
$oViewConfig = oxNew(ViewConfig::class);
|
|
||||||
|
|
||||||
$aManagerList = $oManagerTypes->getManagerList();
|
|
||||||
|
|
||||||
if ($this->getModuleSettingExplicitManagerSelectValue()) {
|
|
||||||
return $this->getExplicitManager();
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($aManagerList as $shopModuleId => $publicCMPName) {
|
|
||||||
if ($oViewConfig->d3IsModuleActive($shopModuleId)) {
|
|
||||||
$this->d3SaveShopConfVar($shopModuleId);
|
|
||||||
return $shopModuleId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $sParam
|
* @param string $sParam
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function d3SaveShopConfVar(string $sParam)
|
public function d3SaveShopConfVar(string $sParam){
|
||||||
{
|
|
||||||
Registry::getConfig()->saveShopConfVar(
|
Registry::getConfig()->saveShopConfVar(
|
||||||
'select',
|
'select',
|
||||||
Constants::OXID_MODULE_ID."_HAS_STD_MANAGER",
|
Constants::OXID_MODULE_ID."_HAS_STD_MANAGER",
|
||||||
@ -54,26 +24,8 @@ class ManagerHandler
|
|||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getModuleSettingExplicitManagerSelectValue(): string
|
public function getActManager() :string
|
||||||
{
|
{
|
||||||
return Registry::get(ViewConfig::class)->d3GetModuleConfigParam('_HAS_STD_MANAGER') ?: "";
|
return Registry::get(ViewConfig::class)->d3GetModuleConfigParam('_HAS_STD_MANAGER')?:"";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getExplicitManager(): string
|
|
||||||
{
|
|
||||||
$sPotentialManagerName = $this->getModuleSettingExplicitManagerSelectValue();
|
|
||||||
|
|
||||||
/** @var ManagerTypes $oManagerTypes */
|
|
||||||
$oManagerTypes = oxNew(ManagerTypes::class);
|
|
||||||
$sCMPName = $oManagerTypes->isManagerInList($sPotentialManagerName)
|
|
||||||
? $sPotentialManagerName
|
|
||||||
: "NONE";
|
|
||||||
|
|
||||||
$this->d3SaveShopConfVar($sCMPName);
|
|
||||||
|
|
||||||
return $sCMPName;
|
|
||||||
}
|
|
||||||
}
|
|
24
CHANGELOG.md
24
CHANGELOG.md
@ -4,13 +4,35 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [unreleased](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.17.2...rel_2.x) - 2024-x
|
## [unreleased](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/3.0.0.1...rel_3.x) - 2025-x
|
||||||
|
|
||||||
|
## [3.0.0.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/3.0.0.0...3.0.0.1) - 2024-03-19
|
||||||
|
### Fixed
|
||||||
|
- reset of cmp-selection
|
||||||
|
- over-engineered getter-methods
|
||||||
|
|
||||||
## [3.0.0.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.22.0...3.0.0.0) - 2024-11-25
|
## [3.0.0.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.22.0...3.0.0.0) - 2024-11-25
|
||||||
### Added
|
### Added
|
||||||
- installability OXID 7
|
- installability OXID 7
|
||||||
- don't submit item prices, if user doesn't have "show price" right
|
- don't submit item prices, if user doesn't have "show price" right
|
||||||
|
|
||||||
|
## [2.23.0.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.23.0.1...2.23.0.2) - 2025-03-19
|
||||||
|
### Fixed
|
||||||
|
- reset of cmp-selection
|
||||||
|
- over-engineered getter-methods
|
||||||
|
|
||||||
|
## [2.23.0.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.23.0.0...2.23.0.1) - 2025-02-19
|
||||||
|
### Fixed
|
||||||
|
- false metadata view_cart entry
|
||||||
|
- missing menu-translation
|
||||||
|
### Added
|
||||||
|
- data layer doesn't contain prices if current user hasn't "show price" rights
|
||||||
|
|
||||||
|
## [2.23.0.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.22.0...2.23.0.0) - 2024-12-21
|
||||||
|
### Added
|
||||||
|
- another tag-versioning position
|
||||||
|
- additional global variables, if given
|
||||||
|
|
||||||
## [2.22.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.21.0...2.22.0) - 2024-09-21
|
## [2.22.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.21.0...2.22.0) - 2024-09-21
|
||||||
### Fixed
|
### Fixed
|
||||||
- Consentmanager didn't get delivered
|
- Consentmanager didn't get delivered
|
||||||
|
@ -54,7 +54,7 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
if ($this->sCookieManagerType === null) {
|
if ($this->sCookieManagerType === null) {
|
||||||
/** @var ManagerHandler $oManagerHandler */
|
/** @var ManagerHandler $oManagerHandler */
|
||||||
$oManagerHandler = oxNew(ManagerHandler::class);
|
$oManagerHandler = oxNew(ManagerHandler::class);
|
||||||
$this->sCookieManagerType = $oManagerHandler->getCurrManager();
|
$this->sCookieManagerType = $oManagerHandler->getActManager();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
102
composer.json
102
composer.json
@ -1,52 +1,52 @@
|
|||||||
{
|
{
|
||||||
"name": "d3/google-analytics4",
|
"name": "d3/google-analytics4",
|
||||||
"description": "Google Tag Manager with new Google Analytics 4 for OXID eShop v6",
|
"description": "Google Tag Manager with new Google Analytics 4 for OXID eShop v6",
|
||||||
"type": "oxideshop-module",
|
"type": "oxideshop-module",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"oxid",
|
"oxid",
|
||||||
"modules",
|
"modules",
|
||||||
"eShop",
|
"eShop",
|
||||||
"d3",
|
"d3",
|
||||||
"google",
|
"google",
|
||||||
"ga4",
|
"ga4",
|
||||||
"googleanalytics",
|
"googleanalytics",
|
||||||
"gtm",
|
"gtm",
|
||||||
"configuration"
|
"configuration"
|
||||||
],
|
],
|
||||||
"homepage": "https://www.d3data.de",
|
"homepage": "https://www.d3data.de",
|
||||||
"license": [
|
"license": [
|
||||||
"GPL-3.0"
|
"GPL-3.0"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Marat Bedoev",
|
"name": "Marat Bedoev",
|
||||||
"email": "hello@mb-dev.pro"
|
"email": "hello@mb-dev.pro"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "D3 Data Development (Inh. Thomas Dartsch)",
|
"name": "D3 Data Development (Inh. Thomas Dartsch)",
|
||||||
"email": "info@shopmodule.com",
|
"email": "info@shopmodule.com",
|
||||||
"homepage": "https://www.d3data.de"
|
"homepage": "https://www.d3data.de"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"supports": {
|
"supports": {
|
||||||
"email": "support@shopmodule.com"
|
"email": "support@shopmodule.com"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.0",
|
"php": "^8.0",
|
||||||
"oxid-esales/oxideshop-ce": "7.0 - 7.1",
|
"oxid-esales/oxideshop-ce": "7.0 - 7.2",
|
||||||
"google/apiclient":" ^2.0",
|
"google/apiclient":" ^2.0",
|
||||||
"phpstan/phpstan": "^1.10"
|
"phpstan/phpstan": "^1.10"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"friendsofphp/php-cs-fixer": "^3.9"
|
"friendsofphp/php-cs-fixer": "^3.9"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"D3\\GoogleAnalytics4\\": ""
|
"D3\\GoogleAnalytics4\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"php-cs-fixer_audit": "./vendor/bin/php-cs-fixer list-files --config=./vendor/d3/google-analytics4/.php-cs-fixer.php",
|
"php-cs-fixer_audit": "./vendor/bin/php-cs-fixer list-files --config=./vendor/d3/google-analytics4/.php-cs-fixer.php",
|
||||||
"php-cs-fixer_fix": "./vendor/bin/php-cs-fixer fix --config=./vendor/d3/google-analytics4/.php-cs-fixer.php"
|
"php-cs-fixer_fix": "./vendor/bin/php-cs-fixer fix --config=./vendor/d3/google-analytics4/.php-cs-fixer.php"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -52,7 +52,7 @@ $aModule = [
|
|||||||
Die Entwicklung basiert auf einem Fork von Marat Bedoev - <a href='https://github.com/vanilla-thunder/oxid-module-gtm'>Github-Link</a>
|
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',
|
'thumbnail' => 'thumbnail.png',
|
||||||
'version' => '3.0.0.0',
|
'version' => '3.0.0.1',
|
||||||
'author' => 'Data Development (Inh.: Thomas Dartsch)',
|
'author' => 'Data Development (Inh.: Thomas Dartsch)',
|
||||||
'email' => 'support@shopmodule.com',
|
'email' => 'support@shopmodule.com',
|
||||||
'url' => 'https://www.oxidmodule.com/',
|
'url' => 'https://www.oxidmodule.com/',
|
||||||
|
Reference in New Issue
Block a user