Compare commits

..

5 Commits

Author SHA1 Message Date
17a77bbf4c [Unknown-State] first base for it
came formerly from an OS-Ticket but ticket got canceled from the customer
2024-07-30 14:54:03 +02:00
44d89a667b Merge remote-tracking branch 'remotes/origin/rel_2.x' into dev_2.x_remove_from_cart_integration 2024-07-30 14:51:51 +02:00
9e79835bc4 [Removed] xml from composer-blacklist_filter 2024-05-30 09:15:03 +02:00
96033e1e03 [Added] missing admin-mod tab translation 2024-05-30 09:14:31 +02:00
a48356bc30 [Removed] dead files 2024-05-30 08:42:27 +02:00
16 changed files with 108 additions and 320 deletions

View File

@ -1,15 +0,0 @@
<?php
declare(strict_types=1);
namespace D3\GoogleAnalytics4\Application\Component\Widget;
class d3GtmStartWidget extends \OxidEsales\Eshop\Application\Component\Widget\WidgetController
{
public function render()
{
parent::render();
return '';
}
}

View File

@ -8,6 +8,7 @@ $aLang = array(
'd3mxgoogleanalytics4' => 'Google Analytics 4', 'd3mxgoogleanalytics4' => 'Google Analytics 4',
'd3mxgoogleanalytics4set' => 'Einstellungen', 'd3mxgoogleanalytics4set' => 'Einstellungen',
'd3mxd3modules' => "<i class='fab fa-fw fa-d3 d3fa-color-blue'></i> Module",
// Base Translations // Base Translations
'D3BASECONFIG' => 'Grundeinstellungen', 'D3BASECONFIG' => 'Grundeinstellungen',
@ -18,7 +19,7 @@ $aLang = array(
'D3ACTIVATEMOD' => 'Modul aktivieren', 'D3ACTIVATEMOD' => 'Modul aktivieren',
'D3CNTRLPARAM' => 'Steuerungsparameter', 'D3CNTRLPARAM' => 'Steuerungsparameter',
'D3CNTRLPARAM_HELP' => '<a target="_blank" href="https://github.com/d3datadevelopment/GoogleAnalytics4/blob/master/Docs/README.md#steuerungsparameter" class="text-muted text-decoration-none"><i class="bi bi-book-half"></i> Was ist der <strong>Steuerungsparameter</strong>?</a>', 'D3CNTRLPARAM_HELP' => '<a target="_blank" href="https://github.com/d3datadevelopment/GoogleAnalytics4/blob/master/Docs/README.md#steuerungsparameter" class="text-muted text-decoration-none"><i class="bi bi-book-half"></i> Was ist der <strong>Steuerungsparameter</strong>?</a>',
'D3INACTIVATEMOD' => 'Modul ist nicht aktiv! Es werden keine Funktionen ausgespielt!', 'D3INACTIVATEMOD' => 'Modul ist nicht aktiv! Es werde keine Funktionen ausgespielt!',
// Usercentrics Dynamische Optionen // Usercentrics Dynamische Optionen
'D3USRCNTRCSDYNOPT' => 'Usercentrics Dynamische Optionen', 'D3USRCNTRCSDYNOPT' => 'Usercentrics Dynamische Optionen',
@ -40,7 +41,7 @@ $aLang = array(
völlig verhindert, solange keine Zustimmung erteilt wurde.<br> völlig verhindert, solange keine Zustimmung erteilt wurde.<br>
<br> <br>
Ein einfaches anschalten dieser Funktion regelt noch <strong>nicht</strong> die völlige Funktionsweise Ein einfaches anschalten dieser Funktion regelt noch <strong>nicht</strong> die völlige Funktionsweise
aller beteiligten Instanzen; diese bedarf eine detailliertere Konfiguration!<br>", aller beteiligten Instanzen; diese bedarf eine detailiertere Konfiguration!<br>",
// Use CMP? // Use CMP?
'D3CMPTABTITLE' => 'Cookie Manager Einstellungen', 'D3CMPTABTITLE' => 'Cookie Manager Einstellungen',
@ -57,12 +58,12 @@ $aLang = array(
Diese konformen CMP sind in Diese konformen CMP sind in
<a target="_blank" href="https://cmppartnerprogram.withgoogle.com/">offizieller Partnerschaft mit Google ( Liste der Partner )</a> <a target="_blank" href="https://cmppartnerprogram.withgoogle.com/">offizieller Partnerschaft mit Google ( Liste der Partner )</a>
und unterliegen strengen Vorschriften, um ein ordnungsgemäßes Senden und und unterliegen strengen Vorschriften, um ein ordnungsgemäßes Senden und
Verarbeiten der Zustimmung unterliegenden Daten sicher stellen zu können.', Verarbeiten der Zustimmung unterliegenden Daten sicher zu stellen.',
'D3CMP' => 'Consent Management Platform ( CMP ) wählen', 'D3CMP' => 'Consent Management Platform ( CMP ) wählen',
// Usercentrics Config // Usercentrics Config
// activate Individual Default Values // activate Individual Default Values
'D3USRCNTRCSCFG_ACT_INDIVDEFVAL' => "Usercentrics individual 'Default Values' aktiveren", 'D3USRCNTRCSCFG_ACT_INDIVDEFVAL' => "usercentrics individual 'Default Values' aktiveren",
// standard Consent // standard Consent
'D3USRCNTRCSCFG_STD_CNST' => "GTM Standard Consent", 'D3USRCNTRCSCFG_STD_CNST' => "GTM Standard Consent",
// activate consent mode API // activate consent mode API
@ -70,7 +71,7 @@ $aLang = array(
// consent mode api // consent mode api
'D3USRCNTRCSCFG_CNSTMDE_API' => "Consent Mode API", 'D3USRCNTRCSCFG_CNSTMDE_API' => "Consent Mode API",
'D3USRCNTRCSCFG_DOCS' => 'Nähere Infos zu den hier konfigurierbaren Einstellungen entnehmen Sie bitte der offiziellen 'D3USRCNTRCSCFG_DOCS' => 'Nähere Infos zu den hier konfigurierbaren Einstellungen entnehmen Sie bitte der offiziellen
Dokumentation von Usercentrics selbst: <a target="_blank" href="https://docs.usercentrics.com/#/consent-mode" class="text-primary"><i class="bi bi-book-half"></i> Dokumentation</a>', Dokumentation von Usercentrics selbst: <a href="https://docs.usercentrics.com/#/consent-mode" class="text-primary"><i class="bi bi-book-half"></i> Dokumentation</a>',
'D3USRCNTRCSCFG_WARNING' => "Bevor Sie hier Anpassungen machen, konsultieren Sie bitte einen technischen Support!<br> 'D3USRCNTRCSCFG_WARNING' => "Bevor Sie hier Anpassungen machen, konsultieren Sie bitte einen technischen Support!<br>
Anpassungen können zu Beeinträchtigungen und Ausfall von Funktionen im Frontend führen!", Anpassungen können zu Beeinträchtigungen und Ausfall von Funktionen im Frontend führen!",

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="event/add_payment_info.tpl"}]

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="event/begin_checkout.tpl"}]

View File

@ -1,53 +0,0 @@
[{*$oxcmp_basket|get_class_methods|dumpvar*}]
[{assign var="gtmBasketPrice" value=$oxcmp_basket->getPrice()}]
[{assign var="gtmBasketObject" value=$oxcmp_basket}]
[{assign var='gtmCartArticles' value=$gtmBasketObject->getBasketArticles()}]
[{assign var="gtmPaymentObject" value=$oView->getPayment()}]
[{block name="gtm_ga4_add_payment_info_block"}]
[{capture name="gtm_ga4_add_payment_info"}]
[{strip}]
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
dataLayer.push({
'event': 'add_payment_info',
'eventLabel':'Checkout - Payment info',
'payment_type':'[{$gtmPaymentObject->gtmGetSelectedPaymentName()}]',
'ecommerce':
{
'actionField': "Payment-Info",
'currency': "[{$currency->name}]",
'value': [{$gtmBasketPrice->getPrice()}],
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
'items':
[
[{foreach from=$oxcmp_basket->getContents() item=basketitem name=gtmCartContents key=basketindex}]
[{assign var="gtmItemPriceObject" value=$basketitem->getPrice()}]
[{assign var="gtmBasketItem" value=$basketitem->getArticle()}]
[{assign var="gtmBasketItemCategory" value=$gtmBasketItem->getCategory()}]
{
'item_id': '[{$gtmCartArticles[$basketindex]->getFieldData('oxartnum')}]',
'item_name': '[{$gtmCartArticles[$basketindex]->getFieldData('oxtitle')}]',
'item_variant': '[{$gtmCartArticles[$basketindex]->getFieldData('oxvarselect')}]',
[{if $gtmBasketItemCategory}]
'item_category': '[{$gtmBasketItemCategory->getSplitCategoryArray(0, true)}]',
'item_category_2': '[{$gtmBasketItemCategory->getSplitCategoryArray(1, true)}]',
'item_category_3': '[{$gtmBasketItemCategory->getSplitCategoryArray(2, true)}]',
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3, true)}]',
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
[{/if}]
'price': [{$gtmItemPriceObject->getPrice()}],
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
'quantity': [{$basketitem->getAmount()}],
'position': [{$smarty.foreach.gtmCartContents.index}]
}[{if !$smarty.foreach.gtmCartContents.last}],[{/if}]
[{/foreach}]
]
}[{if $oViewConf->isDebugModeOn()}],
'debug_mode': 'true'
[{/if}]
});
[{/strip}]
[{/capture}]
[{oxscript add=$smarty.capture.gtm_ga4_add_payment_info}]
[{/block}]

View File

@ -1,52 +0,0 @@
[{*$oxcmp_basket|get_class_methods|dumpvar*}]
[{assign var="d3BasketPrice" value=$oxcmp_basket->getPrice()}]
[{assign var="d3BasketObject" value=$oxcmp_basket}]
[{assign var='gtmCartArticles' value=$d3BasketObject->getBasketArticles()}]
[{assign var="gtmCurrency" value=$oView->getActCurrency()}]
[{block name="d3_ga4_begin_checkout_block"}]
[{capture name="d3_ga4_begin_checkout"}]
[{strip}]
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
dataLayer.push({
'event': 'begin_checkout',
'eventLabel':'Begin of checkout',
'ecommerce':
{
'actionField': "Begin",
'currency': "[{$gtmCurrency->name}]",
'value': [{$d3BasketPrice->getPrice()}],
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
'items':
[
[{foreach from=$oxcmp_basket->getContents() item=basketitem name=gtmCartContents key=basketindex}]
[{assign var="d3oItemPrice" value=$basketitem->getPrice()}]
[{assign var="gtmBasketItem" value=$basketitem->getArticle()}]
[{assign var="gtmBasketItemCategory" value=$gtmBasketItem->getCategory()}]
{
'item_id': '[{$gtmCartArticles[$basketindex]->getFieldData('oxartnum')}]',
'item_name': '[{$gtmCartArticles[$basketindex]->getFieldData('oxtitle')}]',
'item_variant': '[{$gtmCartArticles[$basketindex]->getFieldData('oxvarselect')}]',
[{if $gtmBasketItemCategory}]
'item_category': '[{$gtmBasketItemCategory->getSplitCategoryArray(0, true)}]',
'item_category_2': '[{$gtmBasketItemCategory->getSplitCategoryArray(1, true)}]',
'item_category_3': '[{$gtmBasketItemCategory->getSplitCategoryArray(2, true)}]',
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3, true)}]',
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
[{/if}]
'price': [{$d3oItemPrice->getPrice()}],
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
'quantity': [{$basketitem->getAmount()}],
'position': [{$smarty.foreach.gtmCartContents.index}]
}[{if !$smarty.foreach.gtmCartContents.last}],[{/if}]
[{/foreach}]
]
}[{if $oViewConf->isDebugModeOn()}],
'debug_mode': 'true'
[{/if}]
});
[{/strip}]
[{/capture}]
[{oxscript add=$smarty.capture.d3_ga4_begin_checkout}]
[{/block}]

View File

@ -6,23 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [unreleased](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.17.2...rel_2.x) - 2024-x ## [unreleased](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.17.2...rel_2.x) - 2024-x
## [2.21.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.20.1...2.21.0) - 2024-09-19 ## [2.18.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.18.0...2.18.1) - 2024-06-25
### Fixed
- missing parameters for widget.php call
## [2.20.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.20.0...2.20.1) - 2024-09-11
### Fixed
- missing currency name in begin_checkout template
## [2.20.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.19.0...2.20.0) - 2024-08-20
### Added
- new event "begin_checkout"
- new event "add_payment_info"
## [2.19.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.18.2...2.19.0) - 2024-08-10
### Fixed
- usage of not yet existing function
## [2.18.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.18.1...2.18.2) - 2024-06-25
### Fixed ### Fixed
- oe-console apply-configuration triggers on-activate and overwrites existing values - oe-console apply-configuration triggers on-activate and overwrites existing values

View File

@ -18,14 +18,9 @@ namespace D3\GoogleAnalytics4\Modules\Core{
} }
namespace D3\GoogleAnalytics4\Modules\Application\Model{ namespace D3\GoogleAnalytics4\Modules\Application\Model{
use OxidEsales\Eshop\Application\Model\Payment;
class Category_parent extends \OxidEsales\Eshop\Application\Model\Category {} class Category_parent extends \OxidEsales\Eshop\Application\Model\Category {}
class Basket_parent extends \OxidEsales\Eshop\Application\Model\Basket {} class Basket_parent extends \OxidEsales\Eshop\Application\Model\Basket {}
class Manufacturer_parent extends \OxidEsales\Eshop\Application\Model\Manufacturer {} class Manufacturer_parent extends \OxidEsales\Eshop\Application\Model\Manufacturer {}
class gtmPayment_parent extends Payment {}
} }
namespace D3\GoogleAnalytics4\Modules\Application\Controller{ namespace D3\GoogleAnalytics4\Modules\Application\Controller{

View File

@ -57,6 +57,26 @@ class d3GtmBasketComponentExtension extends d3GtmBasketComponentExtension_parent
return (bool) $decision; return (bool) $decision;
} }
public function getRemoveFromBasketDecision() :bool
{
$decision = Registry::getSession()->getVariable('d3GtmRemoveFromBasketTrigger');
Registry::getSession()->setVariable('d3GtmRemoveFromBasketTrigger', false);
return (bool) $decision;
}
protected function _getItems($sProductId = null, $dAmount = null, $aSel = null, $aPersParam = null, $blOverride = false)
{
$aProducts = parent::_getItems($sProductId, $dAmount, $aSel, $aPersParam, $blOverride);
if (is_array($aProducts) && count($aProducts)) {
Registry::getSession()->setVariable('d3GtmRemoveFromBasketTrigger', true);
}
return $return;
}
/** /**
* @return Article|null * @return Article|null
*/ */

View File

@ -1,20 +0,0 @@
<?php
declare(strict_types=1);
namespace D3\GoogleAnalytics4\Modules\Application\Model;
use OxidEsales\Eshop\Application\Model\Payment;
use OxidEsales\Eshop\Core\Registry;
class gtmPayment extends gtmPayment_parent
{
/**
* @return string
*/
public function gtmGetSelectedPaymentName() :string
{
return $this->getFieldData('oxpayments__oxdesc')?: 'No payment name available';
}
}

View File

@ -17,9 +17,8 @@ use D3\GoogleAnalytics4\Application\Model\Constants;
use D3\GoogleAnalytics4\Application\Model\ManagerHandler; use D3\GoogleAnalytics4\Application\Model\ManagerHandler;
use D3\GoogleAnalytics4\Application\Model\ManagerTypes; use D3\GoogleAnalytics4\Application\Model\ManagerTypes;
use OxidEsales\Eshop\Application\Controller\FrontendController; use OxidEsales\Eshop\Application\Controller\FrontendController;
use OxidEsales\Eshop\Application\Model\User;
use OxidEsales\Eshop\Core\Config; use OxidEsales\Eshop\Core\Config;
use OxidEsales\Eshop\Core\Registry; use OxidEsales\Eshop\Application\Model\User;use OxidEsales\Eshop\Core\Registry;
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory; use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ModuleSettingBridgeInterface; use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ModuleSettingBridgeInterface;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
@ -58,6 +57,7 @@ class ViewConfig extends ViewConfig_parent
$this->sCookieManagerType = $oManagerHandler->getCurrManager(); $this->sCookieManagerType = $oManagerHandler->getCurrManager();
} }
} }
/** /**
* @return bool * @return bool
*/ */
@ -116,6 +116,7 @@ class ViewConfig extends ViewConfig_parent
return true; return true;
} }
// Cookie Manager not (yet) supported
return false; return false;
} }

View File

@ -1,43 +0,0 @@
<?php
namespace D3\GoogleAnalytics4\Modules\Core;
use OxidEsales\EshopCommunity\Core\Registry;
class WidgetControl extends WidgetControl_parent{
protected function getFrontendStartControllerKey() // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
{
/*
* array (
'force_sid' => '2pistlaubiq58qtg3moudei0la',
'lang' => '0',
'actcontrol' => 'details',
'anid' => '064471',
'cl' => 'oxwarticledetails',
'cnid' => '159dd0f2fb2bd6e24ace53a0f1913797',
'listtype' => 'list',
'nocookie' => '1',
'oxwparent' => 'details',
'sid' => '2pistlaubiq58qtg3moudei0la',
'stoken' => 'A22D0F9E',
'varselid' =>
array (
0 => 'b842982bf522aa839bd88221f562fce8',
),
)
*/
$sScriptName = $_SERVER['SCRIPT_NAME'];
if($sScriptName !== '/widget.php')
{
return parent::getFrontendStartControllerKey();
}
$aParameter = $_GET;
if(is_null($aParameter['actcontrol']) and is_null($aParameter['oxwparent']))
{
return 'D3\GoogleAnalytics4\Application\Component\Widget\d3GtmStartWidget';
}
return parent::getFrontendStartControllerKey();
}
}

View File

@ -20,7 +20,7 @@ class Actions
public function d3SaveDefaultSettings(string $sVarType, string $sSettingName, string $sSettingValue){ public function d3SaveDefaultSettings(string $sVarType, string $sSettingName, string $sSettingValue){
$oConfig = Registry::getConfig(); $oConfig = Registry::getConfig();
if ($this->d3GetModuleConfigParam($sSettingName) and (trim($this->d3GetModuleConfigParam($sSettingName)) !== trim($sSettingValue))){ if (trim($this->d3GetModuleConfigParam($sSettingName)) !== trim($sSettingValue)){
$sSettingValue = trim($this->d3GetModuleConfigParam($sSettingName)); $sSettingValue = trim($this->d3GetModuleConfigParam($sSettingName));
} }
@ -39,6 +39,6 @@ class Actions
*/ */
public function d3GetModuleConfigParam(string $configParamName) public function d3GetModuleConfigParam(string $configParamName)
{ {
return Registry::getConfig()->getShopConfVar(Constants::OXID_MODULE_ID.$configParamName, null, Constants::OXID_MODULE_ID); return Registry::get(ViewConfig::class)->d3GetModuleConfigParam($configParamName);
} }
} }

View File

@ -43,11 +43,10 @@
} }
}, },
"require": { "require": {
"php": "7.1 - 8.2", "php": ">=7.1",
"oxid-esales/oxideshop-ce": "^6.5.3", "oxid-esales/oxideshop-ce": "^6.5",
"google/apiclient":" ^2.0", "google/apiclient":" ^2.0",
"phpstan/phpstan": "^1.10" "phpstan/phpstan": "^1.10" },
},
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"D3\\GoogleAnalytics4\\": "../../../source/modules/d3/googleanalytics4" "D3\\GoogleAnalytics4\\": "../../../source/modules/d3/googleanalytics4"

View File

@ -16,7 +16,6 @@ use D3\GoogleAnalytics4\Modules\Application\Controller\d3GtmStartController;
use D3\GoogleAnalytics4\Modules\Application\Controller\ThankYouController; use D3\GoogleAnalytics4\Modules\Application\Controller\ThankYouController;
use D3\GoogleAnalytics4\Modules\Application\Model\Basket as Basket; use D3\GoogleAnalytics4\Modules\Application\Model\Basket as Basket;
use D3\GoogleAnalytics4\Modules\Application\Model\Category as Category; use D3\GoogleAnalytics4\Modules\Application\Model\Category as Category;
use D3\GoogleAnalytics4\Modules\Application\Model\gtmPayment as gtmPayment;
use D3\GoogleAnalytics4\Modules\Application\Model\Manufacturer as Manufacturer; use D3\GoogleAnalytics4\Modules\Application\Model\Manufacturer as Manufacturer;
use D3\GoogleAnalytics4\Modules\Core\ViewConfig; use D3\GoogleAnalytics4\Modules\Core\ViewConfig;
use OxidEsales\Eshop\Application\Component\BasketComponent as OEBasketComponent; use OxidEsales\Eshop\Application\Component\BasketComponent as OEBasketComponent;
@ -34,13 +33,12 @@ use OxidEsales\Eshop\Application\Controller\ThankYouController as OEThankYouCont
use OxidEsales\Eshop\Application\Model\Basket as OEBasket; use OxidEsales\Eshop\Application\Model\Basket as OEBasket;
use OxidEsales\Eshop\Application\Model\Category as OECategory; use OxidEsales\Eshop\Application\Model\Category as OECategory;
use OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer; use OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer;
use OxidEsales\Eshop\Application\Model\Payment as OEPayment;
use OxidEsales\Eshop\Core\ViewConfig as OEViewConfig; use OxidEsales\Eshop\Core\ViewConfig as OEViewConfig;
$sMetadataVersion = '2.1'; $sMetadataVersion = '2.1';
$aModule = [ $aModule = [
'id' => Constants::OXID_MODULE_ID, 'id' => Constants::OXID_MODULE_ID,
'title' => 'Google Analytics 4', 'title' => 'Google Analytics 4',
'description' => "Dieses Modul bietet die Möglichkeit in Ihrem OXID eShop (6.x) die neue 'Property' 'description' => "Dieses Modul bietet die Möglichkeit in Ihrem OXID eShop (6.x) die neue 'Property'
Google Analytics 4 (GA4) von Google zu integrieren.<br> Google Analytics 4 (GA4) von Google zu integrieren.<br>
HierfĂĽr stehen Ihnen verschiedene 'templates' zur verfĂĽgung, HierfĂĽr stehen Ihnen verschiedene 'templates' zur verfĂĽgung,
@ -51,156 +49,135 @@ $aModule = [
<hr> <hr>
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' => '2.21.0', 'version' => '2.18.2',
'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/',
'controllers' => [ 'controllers' => [
'd3googleanalytics4_main' => GA4AdminUserInterfaceMainController::class 'd3googleanalytics4_main' => GA4AdminUserInterfaceMainController::class
], ],
'extend' => [ 'extend' => [
// Core // Core
OEViewConfig::class => ViewConfig::class, OEViewConfig::class => ViewConfig::class,
\OxidEsales\Eshop\Core\WidgetControl::class => \D3\GoogleAnalytics4\Modules\Core\WidgetControl::class,
// Model // Model
OECategory::class => Category::class, OECategory::class => Category::class,
OEBasket::class => Basket::class, OEBasket::class => Basket::class,
OEManufacturer::class => Manufacturer::class, OEManufacturer::class => Manufacturer::class,
OEPayment::class => gtmPayment::class,
// Controller // Controller
OEBasketController::class => BasketController::class, OEBasketController::class => BasketController::class,
OEThankYouController::class => ThankYouController::class, OEThankYouController::class => ThankYouController::class,
OEArticleListController::class => ArticleListController_AddToCartHelpMethods::class, OEArticleListController::class => ArticleListController_AddToCartHelpMethods::class,
OEArticleDetailsController::class => ArticleDetailsController::class, OEArticleDetailsController::class => ArticleDetailsController::class,
OEAccountNoticeListController::class => d3GtmAccountNoticeListController::class, OEAccountNoticeListController::class => d3GtmAccountNoticeListController::class,
OEAccountRecommlistController::class => d3GtmAccountRecommlistController::class, OEAccountRecommlistController::class => d3GtmAccountRecommlistController::class,
OEAccountWishlistController::class => d3GtmAccountWishlistController::class, OEAccountWishlistController::class => d3GtmAccountWishlistController::class,
OEStartController::class => d3GtmStartController::class, OEStartController::class => d3GtmStartController::class,
OESearchController::class => d3GtmSearchController::class, OESearchController::class => d3GtmSearchController::class,
OEManufacturerListController::class => d3GtmManufacturerListController::class, OEManufacturerListController::class => d3GtmManufacturerListController::class,
// Component // Component
OEArticleDetails::class => d3GtmWidgetArticleDetails::class, OEArticleDetails::class => d3GtmWidgetArticleDetails::class,
OEBasketComponent::class => d3GtmBasketComponentExtension::class, OEBasketComponent::class => d3GtmBasketComponentExtension::class,
], ],
'templates' => [ 'templates' => [
// Event files that store the GA4 Event-Information // Event files that store the GA4 Event-Information
'event/add_to_cart.tpl' => 'd3/googleanalytics4/Application/views/event/add_to_cart.tpl', 'event/add_to_cart.tpl' => 'd3/googleanalytics4/Application/views/event/add_to_cart.tpl',
'event/view_item.tpl' => 'd3/googleanalytics4/Application/views/event/view_item.tpl', 'event/view_item.tpl' => 'd3/googleanalytics4/Application/views/event/view_item.tpl',
'event/view_item.tpl' => 'd3/googleanalytics4/Application/views/event/view_item.tpl', 'event/view_cart.tpl' => 'd3/googleanalytics4/Application/views/event/view_cart.tpl',
'event/begin_checkout.tpl' => 'd3/googleanalytics4/Application/views/event/begin_checkout.tpl', 'event/purchase.tpl' => 'd3/googleanalytics4/Application/views/event/purchase.tpl',
'event/add_payment_info.tpl' => 'd3/googleanalytics4/Application/views/event/add_payment_info.tpl', 'event/view_item_list.tpl' => 'd3/googleanalytics4/Application/views/event/view_item_list.tpl',
'event/purchase.tpl' => 'd3/googleanalytics4/Application/views/event/purchase.tpl', 'event/view_search_result.tpl' => 'd3/googleanalytics4/Application/views/event/view_search_result.tpl',
'event/view_item_list.tpl' => 'd3/googleanalytics4/Application/views/event/view_item_list.tpl', 'event/remove_from_cart.tpl' => 'd3/googleanalytics4/Application/views/event/remove_from_cart.tpl',
'event/view_search_result.tpl' => 'd3/googleanalytics4/Application/views/event/view_search_result.tpl',
'event/remove_from_cart.tpl' => 'd3/googleanalytics4/Application/views/event/remove_from_cart.tpl',
// complete overwritten file of OXID-Originals // complete overwritten file of OXID-Originals
// the path of the template-name is the original path to the file in OXID-context from tpl/-> // the path of the template-name is the original path to the file in OXID-context from tpl/->
'page/account/d3gtmnoticelist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmnoticelist.tpl', 'page/account/d3gtmnoticelist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmnoticelist.tpl',
'page/account/d3gtmrecommendationlist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmrecommendationlist.tpl', 'page/account/d3gtmrecommendationlist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmrecommendationlist.tpl',
'page/account/d3gtmwishlist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmwishlist.tpl', 'page/account/d3gtmwishlist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmwishlist.tpl',
// Admin Templates // Admin Templates
'ga4/admin/d3ga4uimain.tpl' => 'd3/googleanalytics4/Application/views/admin/tpl/d3googleanalytics4_main.tpl', 'ga4/admin/d3ga4uimain.tpl' => 'd3/googleanalytics4/Application/views/admin/tpl/d3googleanalytics4_main.tpl',
'ga4/admin/d3ga4uiheaditem.tpl' => 'd3/googleanalytics4/Application/views/admin/tpl/d3googleanalytics4_headitem.tpl', 'ga4/admin/d3ga4uiheaditem.tpl' => 'd3/googleanalytics4/Application/views/admin/tpl/d3googleanalytics4_headitem.tpl',
], ],
'blocks' => [ 'blocks' => [
// tag manager js // tag manager js
[ [
'template' => 'layout/base.tpl', 'template' => 'layout/base.tpl',
'block' => 'head_meta_robots', 'block' => 'head_meta_robots',
'file' => '/Application/views/blocks/_gtm_js.tpl', 'file' => '/Application/views/blocks/_gtm_js.tpl',
'position' => 150 'position' => 150
], ],
// tag manager nojs // tag manager nojs
[ [
'template' => 'layout/base.tpl', 'template' => 'layout/base.tpl',
'block' => 'theme_svg_icons', 'block' => 'theme_svg_icons',
'file' => '/Application/views/blocks/_gtm_nojs.tpl' 'file' => '/Application/views/blocks/_gtm_nojs.tpl'
], ],
// details // details
[ [
'template' => 'page/details/inc/productmain.tpl', 'template' => 'page/details/inc/productmain.tpl',
'block' => 'details_productmain_title', 'block' => 'details_productmain_title',
'file' => '/Application/views/blocks/view_item.tpl', 'file' => '/Application/views/blocks/view_item.tpl',
'position' => 150 'position' => 150
], ],
// View Cart // checkout
[ [
'template' => 'page/checkout/basket.tpl', 'template' => 'page/checkout/basket.tpl',
'block' => 'checkout_basket_main', 'block' => 'checkout_basket_main',
'file' => '/Application/views/blocks/view_cart.tpl' 'file' => '/Application/views/blocks/view_cart.tpl'
],
// add_to_cart
[
'template' => 'page/details/inc/productmain.tpl',
'block' => 'details_productmain_tobasket',
'file' => '/Application/views/blocks/details_productmain_tobasket.tpl',
'position' => 150
],
// remove_from_cart
[
'template' => 'page/checkout/basket.tpl',
'block' => 'checkout_basket_main',
'file' => '/Application/views/blocks/remove_from_cart.tpl',
'position' => 150
], ],
[ [
'template' => 'page/checkout/thankyou.tpl', 'template' => 'page/checkout/thankyou.tpl',
'block' => 'checkout_thankyou_main', 'block' => 'checkout_thankyou_main',
'file' => '/Application/views/blocks/purchase.tpl' 'file' => '/Application/views/blocks/purchase.tpl'
], ],
// Lists // Lists
// view_item_list // view_item_list
[ [
'template' => 'page/list/list.tpl', 'template' => 'page/list/list.tpl',
'block' => 'page_list_productlist', 'block' => 'page_list_productlist',
'file' => '/Application/views/blocks/view_item_list.tpl', 'file' => '/Application/views/blocks/view_item_list.tpl',
'position' => 150 'position' => 150
], ],
// view_search_result // view_search_result
[ [
'template' => 'page/search/search.tpl', 'template' => 'page/search/search.tpl',
'block' => 'search_results', 'block' => 'search_results',
'file' => '/Application/views/blocks/view_search_result.tpl', 'file' => '/Application/views/blocks/view_search_result.tpl',
'position' => 150
],
// add_to_cart
[
'template' => 'page/details/inc/productmain.tpl',
'block' => 'details_productmain_tobasket',
'file' => '/Application/views/blocks/details_productmain_tobasket.tpl',
'position' => 150 'position' => 150
], ],
[ [
'template' => 'page/list/list.tpl', 'template' => 'page/list/list.tpl',
'block' => 'page_list_listbody', 'block' => 'page_list_listbody',
'file' => '/Application/views/blocks/page_list_listbody.tpl', 'file' => '/Application/views/blocks/page_list_listbody.tpl',
'position' => 150 'position' => 150
], ],
[ [
'template' => 'page/shop/start.tpl', 'template' => 'page/shop/start.tpl',
'block' => 'start_welcome_text', 'block' => 'start_welcome_text',
'file' => '/Application/views/blocks/start_welcome_text.tpl', 'file' => '/Application/views/blocks/start_welcome_text.tpl',
'position' => 150 'position' => 150
], ],
// Checkout process // remove_from_cart
// Begin CHeckout
[ [
'template' => 'page/checkout/user.tpl', 'template' => 'page/checkout/basket.tpl',
'block' => 'checkout_user_main', 'block' => 'checkout_basket_main',
'file' => '/Application/views/blocks/begin_checkout.tpl', 'file' => '/Application/views/blocks/remove_from_cart.tpl',
'position' => 150 'position' => 150
], ]
// Add payment info
// We add it into checkout_order_main ( checkout/order.tpl ) to make sure a payment is actually added;
// we'll also do it like that in the future for add_shipping_info ( not planed yet )
[
'template' => 'page/checkout/order.tpl',
'block' => 'checkout_order_main',
'file' => '/Application/views/blocks/add_payment_info.tpl',
'position' => 150
],
], ],
'events' => [ 'events' => [
'onActivate' => '\D3\GoogleAnalytics4\Setup\Events::onActivate', 'onActivate' => '\D3\GoogleAnalytics4\Setup\Events::onActivate',
'onDeactivate' => '\D3\GoogleAnalytics4\Setup\Events::onDeactivate', 'onDeactivate' => '\D3\GoogleAnalytics4\Setup\Events::onDeactivate',
], ],
]; ];