Merge branch 'dev_3.x_OXID7' of https://git.d3data.de/D3Public/GoogleAnalytics4 into dev_3.x_OXID7
This commit is contained in:
commit
6111cf50ad
15
Application/Component/Widget/d3GtmStartWidget.php
Normal file
15
Application/Component/Widget/d3GtmStartWidget.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?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 '';
|
||||
}
|
||||
}
|
@ -12,7 +12,7 @@ use OxidEsales\Eshop\Core\ViewConfig;
|
||||
|
||||
class GA4AdminUserInterface_main extends \OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController
|
||||
{
|
||||
protected $_sThisTemplate = 'ga4/admin/d3ga4uimain.tpl';
|
||||
protected $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/admin/d3ga4uimain';
|
||||
|
||||
public function render()
|
||||
{
|
||||
|
@ -7,19 +7,25 @@ use D3\GoogleAnalytics4\Application\Model\CMP\Usercentrics;
|
||||
class ManagerTypes
|
||||
{
|
||||
const EXTERNAL_SERVICE = "eigener Service";
|
||||
const INTERNAL_EXTERNAL_SERVICE = "externalService";
|
||||
const NET_COOKIE_MANAGER = "Netensio Cookie Manager";
|
||||
const INTERNAL_NET_COOKIE_MANAGER = "net_cookie_manager";
|
||||
|
||||
/**
|
||||
* Further information's:
|
||||
* https://github.com/aggrosoft/oxid-cookie-compliance
|
||||
*/
|
||||
const AGCOOKIECOMPLIANCE = "Aggrosoft Cookie Compliance";
|
||||
const INTERNAL_AGCOOKIECOMPLIANCE = "agcookiecompliance";
|
||||
|
||||
const CONSENTMANAGER = "Consentmanager";
|
||||
const INTERNAL_CONSENTMANAGER = "cmconsentmanager";
|
||||
|
||||
const COOKIEFIRST = "Cookiefirst";
|
||||
const INTERNAL_COOKIEFIRST = "cookiefirst";
|
||||
|
||||
const COOKIEBOT = "Cookiebot";
|
||||
const INTERNAL_COOKIEBOT = "cookiebot";
|
||||
|
||||
/**
|
||||
* @return array
|
||||
@ -27,14 +33,14 @@ class ManagerTypes
|
||||
public function getManagerList(): array
|
||||
{
|
||||
return [
|
||||
"externalService" => self::EXTERNAL_SERVICE,
|
||||
"agcookiecompliance" => self::AGCOOKIECOMPLIANCE,
|
||||
"net_cookie_manager" => self::NET_COOKIE_MANAGER,
|
||||
self::INTERNAL_EXTERNAL_SERVICE => self::EXTERNAL_SERVICE,
|
||||
self::INTERNAL_AGCOOKIECOMPLIANCE => self::AGCOOKIECOMPLIANCE,
|
||||
self::INTERNAL_NET_COOKIE_MANAGER => self::NET_COOKIE_MANAGER,
|
||||
Usercentrics::sModuleIncludationInternalName => Usercentrics::sModuleIncludationPublicName,
|
||||
Usercentrics::sExternalIncludationInternalName => Usercentrics::sExternalIncludationPublicName,
|
||||
"cmconsentmanager" => self::CONSENTMANAGER,
|
||||
"cookiefirst" => self::COOKIEFIRST,
|
||||
"cookiebot" => self::COOKIEBOT,
|
||||
self::INTERNAL_CONSENTMANAGER => self::CONSENTMANAGER,
|
||||
self::INTERNAL_COOKIEFIRST => self::COOKIEFIRST,
|
||||
self::INTERNAL_COOKIEBOT => self::COOKIEBOT,
|
||||
];
|
||||
}
|
||||
|
||||
@ -46,4 +52,21 @@ class ManagerTypes
|
||||
{
|
||||
return in_array($sManager, array_keys($this->getManagerList()), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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,
|
||||
ManagerTypes::INTERNAL_COOKIEFIRST,
|
||||
ManagerTypes::INTERNAL_COOKIEBOT,
|
||||
ManagerTypes::INTERNAL_EXTERNAL_SERVICE
|
||||
];
|
||||
}
|
||||
}
|
0
Application/views/admin/de/module_options.php → Application/views/admin_smarty/de/module_options.php
Executable file → Normal file
0
Application/views/admin/de/module_options.php → Application/views/admin_smarty/de/module_options.php
Executable file → Normal file
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/add_payment_info.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/begin_checkout.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/purchase.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/remove_from_cart.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/view_cart.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/view_item.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/view_item_list.tpl"}]
|
@ -1,3 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="event/view_search_result.tpl"}]
|
@ -1,48 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{block name="d3_ga4_remove_from_cart_block"}]
|
||||
[{if $hasBeenReloaded}]
|
||||
[{assign var="d3BasketPrice" value=$oxcmp_basket->getPrice()}]
|
||||
[{capture assign=d3_ga4_remove_from_cart}]
|
||||
[{strip}]
|
||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||
dataLayer.push({
|
||||
'isRemoveFromCart': true,
|
||||
'event': 'remove_from_cart',
|
||||
'eventLabel':'remove_from_cart',
|
||||
'ecommerce': {
|
||||
'actionField': "step: 1",
|
||||
'currency': "[{$currency->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=$toRemoveArticles->getArray() name=gtmRemovedItems item=rmItem key=rmItemindex}]
|
||||
[{assign var="d3oItemPrice" value=$rmItem->getPrice()}]
|
||||
[{assign var="gtmBasketItemCategory" value=$rmItem->getCategory()}]
|
||||
{
|
||||
'item_id': '[{$rmItem->getFieldData('oxartnum')}]',
|
||||
'item_name': '[{$rmItem->getFieldData('oxtitle')}]',
|
||||
'item_variant': '[{$rmItem->getFieldData('oxvarselect')}]',
|
||||
[{if $gtmBasketItemCategory}]
|
||||
'item_category': '[{$gtmBasketItemCategory->getSplitCategoryArray(0)}]',
|
||||
'item_category_2': '[{$gtmBasketItemCategory->getSplitCategoryArray(1)}]',
|
||||
'item_category_3': '[{$gtmBasketItemCategory->getSplitCategoryArray(2)}]',
|
||||
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3)}]',
|
||||
'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': '[{$rmItem->getFieldData('d3AmountThatGotRemoved')}]',
|
||||
'position': [{$smarty.foreach.gtmRemovedItems.index}]
|
||||
}[{if !$smarty.foreach.gtmRemovedItems.last}],[{/if}]
|
||||
[{/foreach}]
|
||||
]
|
||||
}[{if $oViewConf->isDebugModeOn()}],
|
||||
'debug_mode': 'true'
|
||||
[{/if}]
|
||||
});
|
||||
[{/strip}]
|
||||
[{/capture}]
|
||||
[{oxscript add=$d3_ga4_remove_from_cart}]
|
||||
[{/if}]
|
||||
[{/block}]
|
@ -1,44 +0,0 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{assign var="gtmProducts" value=$oView->getArticleList()}]
|
||||
|
||||
[{block name="d3_ga4_view_search_result_block"}]
|
||||
[{if $gtmProducts}]
|
||||
[{capture assign=d3_ga4_view_search_result}]
|
||||
[{strip}]
|
||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||
dataLayer.push({
|
||||
'event': 'view_search_result',
|
||||
'eventLabel':'view_search_result[{if $oViewConf->isDebugModeOn()}]_test[{/if}]',
|
||||
'ecommerce': {
|
||||
'search_term': '[{$searchparamforhtml}]',
|
||||
'items': [
|
||||
[{foreach from=$gtmProducts name="gtmProducts" item="gtmProduct"}]
|
||||
[{assign var="d3PriceObject" value=$gtmProduct->getPrice()}]
|
||||
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
||||
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
|
||||
{
|
||||
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
|
||||
'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]',
|
||||
'price': [{$d3PriceObject->getPrice()}],
|
||||
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||
[{if $gtmCategory}]
|
||||
'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]',
|
||||
'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]',
|
||||
'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]',
|
||||
'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3)}]',
|
||||
'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]',
|
||||
[{/if}]
|
||||
'quantity': 1
|
||||
}[{if !$smarty.foreach.gtmProducts.last}],[{/if}]
|
||||
[{/foreach}]
|
||||
]
|
||||
}[{if $oViewConf->isDebugModeOn()}],
|
||||
'debug_mode': 'true'
|
||||
[{/if}]
|
||||
});
|
||||
[{/strip}]
|
||||
[{/capture}]
|
||||
[{oxscript add=$d3_ga4_view_search_result}]
|
||||
[{/if}]
|
||||
[{/block}]
|
13
CHANGELOG.md
13
CHANGELOG.md
@ -6,6 +6,19 @@ 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
|
||||
|
||||
## [2.22.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.21.0...2.22.0) - 2024-09-21
|
||||
### Fixed
|
||||
- Consentmanager didn't get delivered
|
||||
### Changed
|
||||
- write "internal_names" of CMP to constants
|
||||
|
||||
## [2.21.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.20.1...2.21.0) - 2024-09-19
|
||||
### 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"
|
||||
|
@ -4,7 +4,7 @@ namespace D3\GoogleAnalytics4\Modules\Application\Controller;
|
||||
|
||||
class d3GtmAccountNoticeListController extends d3GtmAccountNoticeListController_parent
|
||||
{
|
||||
protected $_sThisTemplate = 'page/account/d3gtmnoticelist.tpl';
|
||||
protected $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/page/account/d3gtmnoticelist.tpl';
|
||||
|
||||
public function render()
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ namespace D3\GoogleAnalytics4\Modules\Application\Controller;
|
||||
|
||||
class d3GtmAccountRecommlistController extends d3GtmAccountRecommlistController_parent
|
||||
{
|
||||
protected $_sThisTemplate = 'page/account/d3gtmrecommendationlist.tpl';
|
||||
protected $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/page/account/d3gtmrecommendationlist.tpl';
|
||||
|
||||
public function render()
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ namespace D3\GoogleAnalytics4\Modules\Application\Controller;
|
||||
|
||||
class d3GtmAccountWishlistController extends d3GtmAccountWishlistController_parent
|
||||
{
|
||||
protected $_sThisTemplate = 'page/account/d3gtmwishlist.tpl';
|
||||
protected $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/page/account/d3gtmwishlist.tpl';
|
||||
|
||||
public function render()
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ class ViewConfig extends ViewConfig_parent
|
||||
$sCookieID = trim($this->d3GetModuleConfigParam('_sControlParameter'));
|
||||
|
||||
// Netensio Cookie Manager
|
||||
if ($this->sCookieManagerType === ManagerTypes::NET_COOKIE_MANAGER) {
|
||||
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_NET_COOKIE_MANAGER) {
|
||||
$oSession = Registry::getSession();
|
||||
$aCookies = $oSession->getVariable("aCookieSel");
|
||||
|
||||
@ -96,20 +96,18 @@ class ViewConfig extends ViewConfig_parent
|
||||
}
|
||||
|
||||
// Aggrosoft Cookie Consent
|
||||
if ($this->sCookieManagerType === ManagerTypes::AGCOOKIECOMPLIANCE) {
|
||||
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_AGCOOKIECOMPLIANCE) {
|
||||
if (method_exists($this, "isCookieCategoryEnabled")) {
|
||||
return $this->isCookieCategoryEnabled($sCookieID);
|
||||
}
|
||||
}
|
||||
|
||||
// UserCentrics or consentmanager
|
||||
|
||||
if (
|
||||
$this->sCookieManagerType === Usercentrics::sModuleIncludationInternalName
|
||||
or $this->sCookieManagerType === Usercentrics::sExternalIncludationInternalName
|
||||
or $this->sCookieManagerType === ManagerTypes::CONSENTMANAGER
|
||||
or $this->sCookieManagerType === ManagerTypes::COOKIEFIRST
|
||||
or $this->sCookieManagerType === ManagerTypes::COOKIEBOT
|
||||
or $this->sCookieManagerType === ManagerTypes::EXTERNAL_SERVICE
|
||||
in_array
|
||||
(
|
||||
$this->sCookieManagerType,
|
||||
(oxNew(ManagerTypes::class)->scriptTagDeliveredByDefaultArray())
|
||||
)
|
||||
)
|
||||
{
|
||||
// Always needs the script-tags delivered to the DOM.
|
||||
@ -141,16 +139,16 @@ class ViewConfig extends ViewConfig_parent
|
||||
return 'data-usercentrics="' . $sControlParameter . '" type="text/plain" async=""';
|
||||
}
|
||||
|
||||
if ($this->sCookieManagerType === ManagerTypes::CONSENTMANAGER)
|
||||
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_CONSENTMANAGER)
|
||||
{
|
||||
return 'type="text/plain" class="cmplazyload" data-cmp-vendor="'.$sControlParameter.'"';
|
||||
}
|
||||
|
||||
if ($this->sCookieManagerType === ManagerTypes::COOKIEFIRST){
|
||||
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_COOKIEFIRST){
|
||||
return 'type="text/plain" data-cookiefirst-category="' . $sControlParameter .'"';
|
||||
}
|
||||
|
||||
if ($this->sCookieManagerType === ManagerTypes::COOKIEBOT){
|
||||
if ($this->sCookieManagerType === ManagerTypes::INTERNAL_COOKIEBOT){
|
||||
return 'type="text/plain" data-cookieconsent="' . $sControlParameter .'"';
|
||||
}
|
||||
|
||||
|
43
Modules/Core/WidgetControl.php
Normal file
43
Modules/Core/WidgetControl.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
0
thumbnail.png → assets/thumbnail.png
Executable file → Normal file
0
thumbnail.png → assets/thumbnail.png
Executable file → Normal file
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
@ -28,20 +28,9 @@
|
||||
"homepage": "https://www.d3data.de"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"supports": {
|
||||
"email": "support@shopmodule.com"
|
||||
},
|
||||
"extra": {
|
||||
"oxideshop": {
|
||||
"blacklist-filter": [
|
||||
"*.md",
|
||||
"composer.json",
|
||||
".php-cs-fixer.php",
|
||||
"*.neon"
|
||||
],
|
||||
"target-directory": "d3/googleanalytics4"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"php": "^8.0",
|
||||
"oxid-esales/oxideshop-ce": "7.0 - 7.1",
|
||||
@ -50,7 +39,7 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"D3\\GoogleAnalytics4\\": "../../../source/modules/d3/googleanalytics4"
|
||||
"D3\\GoogleAnalytics4\\": ""
|
||||
}
|
||||
}
|
||||
}
|
59
metadata.php
59
metadata.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>
|
||||
",
|
||||
'thumbnail' => 'thumbnail.png',
|
||||
'version' => '2.20.0',
|
||||
'version' => '3.0.0',
|
||||
'author' => 'Data Development (Inh.: Thomas Dartsch)',
|
||||
'email' => 'support@shopmodule.com',
|
||||
'url' => 'https://www.oxidmodule.com/',
|
||||
@ -61,7 +61,8 @@ $aModule = [
|
||||
],
|
||||
'extend' => [
|
||||
// Core
|
||||
OEViewConfig::class => ViewConfig::class,
|
||||
OEViewConfig::class => ViewConfig::class,
|
||||
\OxidEsales\Eshop\Core\WidgetControl::class => \D3\GoogleAnalytics4\Modules\Core\WidgetControl::class,
|
||||
|
||||
// Model
|
||||
OECategory::class => Category::class,
|
||||
@ -87,97 +88,97 @@ $aModule = [
|
||||
],
|
||||
'templates' => [
|
||||
// Event files that store the GA4 Event-Information
|
||||
'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/begin_checkout.tpl' => 'd3/googleanalytics4/Application/views/event/begin_checkout.tpl',
|
||||
'event/add_payment_info.tpl' => 'd3/googleanalytics4/Application/views/event/add_payment_info.tpl',
|
||||
'event/purchase.tpl' => 'd3/googleanalytics4/Application/views/event/purchase.tpl',
|
||||
'event/view_item_list.tpl' => 'd3/googleanalytics4/Application/views/event/view_item_list.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',
|
||||
'@' . Constants::OXID_MODULE_ID . '/event/add_to_cart.tpl' => 'd3/googleanalytics4/Application/views/event/add_to_cart.tpl',
|
||||
'@' . Constants::OXID_MODULE_ID . '/event/view_item.tpl' => 'd3/googleanalytics4/Application/views/event/view_item.tpl',
|
||||
'@' . Constants::OXID_MODULE_ID . '/event/view_item.tpl' => 'd3/googleanalytics4/Application/views/event/view_item.tpl',
|
||||
'@' . Constants::OXID_MODULE_ID . '/event/begin_checkout.tpl' => 'd3/googleanalytics4/Application/views/event/begin_checkout.tpl',
|
||||
'@' . Constants::OXID_MODULE_ID . '/event/add_payment_info.tpl' => 'd3/googleanalytics4/Application/views/event/add_payment_info.tpl',
|
||||
'@' . Constants::OXID_MODULE_ID . '/event/purchase.tpl' => 'd3/googleanalytics4/Application/views/event/purchase.tpl',
|
||||
'@' . Constants::OXID_MODULE_ID . '/event/view_item_list.tpl' => 'd3/googleanalytics4/Application/views/event/view_item_list.tpl',
|
||||
'@' . Constants::OXID_MODULE_ID . '/event/view_search_result.tpl' => 'd3/googleanalytics4/Application/views/event/view_search_result.tpl',
|
||||
'@' . Constants::OXID_MODULE_ID . '/event/remove_from_cart.tpl' => 'd3/googleanalytics4/Application/views/event/remove_from_cart.tpl',
|
||||
|
||||
// complete overwritten file of OXID-Originals
|
||||
// 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/d3gtmrecommendationlist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmrecommendationlist.tpl',
|
||||
'page/account/d3gtmwishlist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmwishlist.tpl',
|
||||
'@' . Constants::OXID_MODULE_ID . 'page/account/d3gtmnoticelist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmnoticelist.tpl',
|
||||
'@' . Constants::OXID_MODULE_ID . 'page/account/d3gtmrecommendationlist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmrecommendationlist.tpl',
|
||||
'@' . Constants::OXID_MODULE_ID . 'page/account/d3gtmwishlist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmwishlist.tpl',
|
||||
|
||||
// Admin Templates
|
||||
'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',
|
||||
'@' . Constants::OXID_MODULE_ID . 'admin/d3ga4uimain.tpl' => 'd3/googleanalytics4/Application/views/admin/tpl/d3googleanalytics4_main.tpl',
|
||||
'@' . Constants::OXID_MODULE_ID . 'admin/d3ga4uiheaditem.tpl' => 'd3/googleanalytics4/Application/views/admin/tpl/d3googleanalytics4_headitem.tpl',
|
||||
],
|
||||
'blocks' => [
|
||||
// tag manager js
|
||||
[
|
||||
'template' => 'layout/base.tpl',
|
||||
'block' => 'head_meta_robots',
|
||||
'file' => '/Application/views/blocks/_gtm_js.tpl',
|
||||
'file' => 'views/smarty/blocks/_gtm_js.tpl',
|
||||
'position' => 150
|
||||
],
|
||||
// tag manager nojs
|
||||
[
|
||||
'template' => 'layout/base.tpl',
|
||||
'block' => 'theme_svg_icons',
|
||||
'file' => '/Application/views/blocks/_gtm_nojs.tpl'
|
||||
'file' => 'views/smarty/blocks/_gtm_nojs.tpl'
|
||||
],
|
||||
// details
|
||||
[
|
||||
'template' => 'page/details/inc/productmain.tpl',
|
||||
'block' => 'details_productmain_title',
|
||||
'file' => '/Application/views/blocks/view_item.tpl',
|
||||
'file' => 'views/smarty/blocks/view_item.tpl',
|
||||
'position' => 150
|
||||
],
|
||||
// View Cart
|
||||
[
|
||||
'template' => 'page/checkout/basket.tpl',
|
||||
'block' => 'checkout_basket_main',
|
||||
'file' => '/Application/views/blocks/view_cart.tpl'
|
||||
'file' => 'views/smarty/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',
|
||||
'file' => 'views/smarty/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',
|
||||
'file' => 'views/smarty/blocks/remove_from_cart.tpl',
|
||||
'position' => 150
|
||||
],
|
||||
[
|
||||
'template' => 'page/checkout/thankyou.tpl',
|
||||
'block' => 'checkout_thankyou_main',
|
||||
'file' => '/Application/views/blocks/purchase.tpl'
|
||||
'file' => 'views/smarty/blocks/purchase.tpl'
|
||||
],
|
||||
// Lists
|
||||
// view_item_list
|
||||
[
|
||||
'template' => 'page/list/list.tpl',
|
||||
'block' => 'page_list_productlist',
|
||||
'file' => '/Application/views/blocks/view_item_list.tpl',
|
||||
'file' => 'views/smarty/blocks/view_item_list.tpl',
|
||||
'position' => 150
|
||||
],
|
||||
// view_search_result
|
||||
[
|
||||
'template' => 'page/search/search.tpl',
|
||||
'block' => 'search_results',
|
||||
'file' => '/Application/views/blocks/view_search_result.tpl',
|
||||
'file' => 'views/smarty/blocks/view_search_result.tpl',
|
||||
'position' => 150
|
||||
],
|
||||
[
|
||||
'template' => 'page/list/list.tpl',
|
||||
'block' => 'page_list_listbody',
|
||||
'file' => '/Application/views/blocks/page_list_listbody.tpl',
|
||||
'file' => 'views/smarty/blocks/page_list_listbody.tpl',
|
||||
'position' => 150
|
||||
],
|
||||
[
|
||||
'template' => 'page/shop/start.tpl',
|
||||
'block' => 'start_welcome_text',
|
||||
'file' => '/Application/views/blocks/start_welcome_text.tpl',
|
||||
'file' => 'views/smarty/blocks/start_welcome_text.tpl',
|
||||
'position' => 150
|
||||
],
|
||||
// Checkout process
|
||||
@ -185,7 +186,7 @@ $aModule = [
|
||||
[
|
||||
'template' => 'page/checkout/user.tpl',
|
||||
'block' => 'checkout_user_main',
|
||||
'file' => '/Application/views/blocks/begin_checkout.tpl',
|
||||
'file' => 'views/smarty/blocks/begin_checkout.tpl',
|
||||
'position' => 150
|
||||
],
|
||||
// Add payment info
|
||||
@ -194,7 +195,7 @@ $aModule = [
|
||||
[
|
||||
'template' => 'page/checkout/order.tpl',
|
||||
'block' => 'checkout_order_main',
|
||||
'file' => '/Application/views/blocks/add_payment_info.tpl',
|
||||
'file' => 'views/smarty/blocks/add_payment_info.tpl',
|
||||
'position' => 150
|
||||
],
|
||||
],
|
||||
|
@ -80,7 +80,6 @@
|
||||
[{oxmultilang ident="D3CMP"}]
|
||||
</label>
|
||||
<select class="form-select w-50" name="editval[select][_HAS_STD_MANAGER]" aria-label="Default select example">
|
||||
<option value="NONE" selected>[{oxmultilang ident="D3NONE"}]</option>
|
||||
[{foreach from=$d3ManagerTypeArray key="sInternalName" item="sPublicName" name="editval[aCmpNameArray]"}]
|
||||
<option value="[{$sInternalName}]" [{if $sInternalName === $d3CurrentCMP}]SELECTED[{/if}]>[{$sPublicName}]</option>
|
||||
[{/foreach}]
|
0
Application/views/blocks/_gtm_js.tpl → views/smarty/blocks/_gtm_js.tpl
Executable file → Normal file
0
Application/views/blocks/_gtm_js.tpl → views/smarty/blocks/_gtm_js.tpl
Executable file → Normal file
@ -1,12 +1,12 @@
|
||||
[{if $oViewConf->D3blShowGtmScript()}]
|
||||
[{if $oViewConf->getGtmContainerId()}][{strip}]
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript>
|
||||
<iframe src="[{$oViewConf->getServerSidetaggingNoJsDomain()}]?id=[{$oViewConf->getGtmContainerId()}]"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
||||
</noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
[{/strip}][{/if}]
|
||||
[{/if}]
|
||||
|
||||
[{if $oViewConf->D3blShowGtmScript()}]
|
||||
[{if $oViewConf->getGtmContainerId()}][{strip}]
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript>
|
||||
<iframe src="[{$oViewConf->getServerSidetaggingNoJsDomain()}]?id=[{$oViewConf->getGtmContainerId()}]"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
||||
</noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
[{/strip}][{/if}]
|
||||
[{/if}]
|
||||
|
||||
[{$smarty.block.parent}]
|
3
views/smarty/blocks/add_payment_info.tpl
Normal file
3
views/smarty/blocks/add_payment_info.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/add_payment_info.tpl"}]
|
3
views/smarty/blocks/begin_checkout.tpl
Normal file
3
views/smarty/blocks/begin_checkout.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/begin_checkout.tpl"}]
|
3
views/smarty/blocks/details_productmain_tobasket.tpl
Normal file
3
views/smarty/blocks/details_productmain_tobasket.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
3
views/smarty/blocks/page_list_listbody.tpl
Normal file
3
views/smarty/blocks/page_list_listbody.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
3
views/smarty/blocks/purchase.tpl
Normal file
3
views/smarty/blocks/purchase.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/purchase.tpl"}]
|
3
views/smarty/blocks/remove_from_cart.tpl
Normal file
3
views/smarty/blocks/remove_from_cart.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/remove_from_cart.tpl"}]
|
3
views/smarty/blocks/start_welcome_text.tpl
Normal file
3
views/smarty/blocks/start_welcome_text.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
3
views/smarty/blocks/view_cart.tpl
Normal file
3
views/smarty/blocks/view_cart.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/view_cart.tpl"}]
|
3
views/smarty/blocks/view_item.tpl
Normal file
3
views/smarty/blocks/view_item.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/view_item.tpl"}]
|
3
views/smarty/blocks/view_item_list.tpl
Normal file
3
views/smarty/blocks/view_item_list.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/view_item_list.tpl"}]
|
3
views/smarty/blocks/view_search_result.tpl
Normal file
3
views/smarty/blocks/view_search_result.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{include file="@d3googleanalytics4/event/view_search_result.tpl"}]
|
@ -3,6 +3,7 @@
|
||||
[{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"}]
|
||||
@ -14,7 +15,7 @@
|
||||
'ecommerce':
|
||||
{
|
||||
'actionField': "Begin",
|
||||
'currency': "[{$currency->name}]",
|
||||
'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':
|
@ -41,4 +41,4 @@
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
@ -8,7 +8,7 @@
|
||||
<p class="alert alert-info">[{oxmultilang ident="WISH_LIST_EMPTY"}]</p>
|
||||
[{/if}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
|
||||
[{insert name="oxid_tracker" title=$template_title}]
|
||||
[{/capture}]
|
@ -21,7 +21,7 @@
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
|
||||
[{insert name="oxid_tracker" title=$template_title}]
|
||||
[{/capture}]
|
@ -34,7 +34,7 @@
|
||||
</p>
|
||||
[{/if}]
|
||||
|
||||
[{include file="event/add_to_cart.tpl" htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
[{include file='@d3googleanalytics4/event/add_to_cart.tpl' htmlIdAmountOfArticles='#amountToBasket'}]
|
||||
|
||||
[{insert name="oxid_tracker" title=$template_title}]
|
||||
[{/capture}]
|
Loading…
Reference in New Issue
Block a user