diff --git a/Application/translations/en/blagtm_lang.php b/Application/translations/en/blagtm_lang.php deleted file mode 100644 index 84293dc..0000000 --- a/Application/translations/en/blagtm_lang.php +++ /dev/null @@ -1,37 +0,0 @@ - - **/ - -$aLang = [ - 'charset' => 'UTF-8', - - - // das hier wird nicht mehr benötigt, aber ich lasse es drin, falls doch - // leserliche Namen für product list performance (GA) - 'VT_GTM_EE_productList' => 'Category', - 'VT_GTM_EE_searchList' => 'Search', - 'VT_GTM_EE_cross' => 'Crossselling', - 'VT_GTM_EE_accessories' => 'Accessories', - 'VT_GTM_EE_last' => 'Last Seen', - 'VT_GTM_EE_bargainItems' => 'Offer of the Week', - 'VT_GTM_EE_newItems' => 'Just Arrived', - 'VT_GTM_EE_topBox' => 'Topseller', - // ab hier wird wieder benötigt - - // Dimensionen im checkout - 'VT_GTM_EE_LOGINOPTION' => 'Existing Customer', - 'VT_GTM_EE_LOGINOPTION1' => 'Guest', - 'VT_GTM_EE_LOGINOPTION2' => 'Existing Customer', - 'VT_GTM_EE_LOGINOPTION3' => 'New Customer' -]; diff --git a/Application/views/admin/de/module_options.php b/Application/views/admin/de/module_options.php index b99525b..02f8416 100755 --- a/Application/views/admin/de/module_options.php +++ b/Application/views/admin/de/module_options.php @@ -25,22 +25,22 @@ input.confinput:hover {outline:3px solid #ff3600;} '; $aLang = [ 'charset' => 'UTF-8', - 'SHOP_MODULE_vt_gtm_sContainerID' => 'Container ID', - 'SHOP_MODULE_GROUP_vt_gtm_settings' => 'Einstellungen', - 'SHOP_MODULE_vt_gtm_blGA4enab' => 'GA4 Aktivieren', - 'SHOP_MODULE_vt_gtm_blUAenabled' => 'UA Aktivieren', - 'SHOP_MODULE_vt_gtm_blEnableDebug' => 'Debug-Modus aktivieren', + 'SHOP_MODULE_d3_gtm_sContainerID' => 'Container ID', + 'SHOP_MODULE_GROUP_d3_gtm_settings' => 'Einstellungen', + 'SHOP_MODULE_d3_gtm_blGA4enab' => 'GA4 Aktivieren', + 'SHOP_MODULE_d3_gtm_blUAenabled' => 'UA Aktivieren', + 'SHOP_MODULE_d3_gtm_blEnableDebug' => 'Debug-Modus aktivieren', // for cookie manager settings - 'SHOP_MODULE_GROUP_vt_gtm_settings_cookiemanager' => 'Cookie Manager Einstellungen', - 'SHOP_MODULE_vt_gtm_settings_hasOwnCookieManager' => 'Eigenen Cookie Manager nutzen? + 'SHOP_MODULE_GROUP_d3_gtm_settings_cookiemanager' => 'Cookie Manager Einstellungen', + 'SHOP_MODULE_d3_gtm_settings_hasOwnCookieManager' => 'Eigenen Cookie Manager nutzen? Hinweis (Fragezeichen) lesen!', - 'HELP_SHOP_MODULE_vt_gtm_settings_hasOwnCookieManager' => 'Stellen Sie sicher, dass Sie ein Modul installiert haben, + 'HELP_SHOP_MODULE_d3_gtm_settings_hasOwnCookieManager' => 'Stellen Sie sicher, dass Sie ein Modul installiert haben, dass die Methode "blAcceptedCookie" implementiert.
Sollten Sie sich nicht sicher sein kontaktieren Sie Ihren technischen Ansprechpartner.

Wichtig! Das Aktivieren dieser Checkbox kann ohne dem nötigen technischen Wissen den Shop-Ablauf im Frontend stören!
Die Checkbox muss nicht aktiviert werden, sofern die Cookies beispielsweise direkt via Google Cookie-Banner integriert werden. Bei Fragen kontaktieren Sie bitte auch hier einen entsprechenden technischen Ansprechpartner.', - 'SHOP_MODULE_vt_gtm_settings_cookieName' => 'Cookie-Name', + 'SHOP_MODULE_d3_gtm_settings_cookieName' => 'Cookie-Name', ]; diff --git a/Application/views/blocks/_gtm_js.tpl b/Application/views/blocks/_gtm_js.tpl index 0f22c6f..3436ec9 100755 --- a/Application/views/blocks/_gtm_js.tpl +++ b/Application/views/blocks/_gtm_js.tpl @@ -1,6 +1,6 @@ [{assign var="d3VtConfigObject" value=$oViewConf->getConfig()}] -[{if $d3VtConfigObject->getConfigParam('vt_gtm_settings_hasOwnCookieManager')}] - [{if $oViewConf->blAcceptedCookie($d3VtConfigObject->getConfigParam('vt_gtm_settings_cookieName'))}] +[{if $d3VtConfigObject->getConfigParam('d3_gtm_settings_hasOwnCookieManager')}] + [{if $oViewConf->blAcceptedCookie($d3VtConfigObject->getConfigParam('d3_gtm_settings_cookieName'))}] [{if $oViewConf->getGtmContainerId()}][{strip}] @@ -46,7 +46,6 @@ })(window, document, 'script', 'dataLayer', '[{$oViewConf->getGtmContainerId()}]'); - [{$oViewConf->triggerGA4events()}] [{if $oViewConf->getTopActionClassName() === "alist" }] [{* include file="ga4_view_item_list.tpl" gtmCategory=$oView->getActiveCategory() gtmProducts=$oView->getArticleList() listtype=$oView->getListType() *}] [{elseif $oViewConf->getTopActionClassName() === "details" }] diff --git a/Application/views/blocks/checkout_s2.tpl b/Application/views/blocks/checkout_s2.tpl index dcb7c7d..346ffb6 100644 --- a/Application/views/blocks/checkout_s2.tpl +++ b/Application/views/blocks/checkout_s2.tpl @@ -8,7 +8,7 @@ 'checkout': { 'actionField': { 'step': 2, - 'option':'[{oxmultilang ident="VT_GTM_EE_LOGINOPTION"|cat:$oView->getLoginOption()}]' + 'option':'[{oxmultilang ident="vt_GTM_EE_LOGINOPTION"|cat:$oView->getLoginOption()}]' } } } diff --git a/Modules/Core/ViewConfig.php b/Modules/Core/ViewConfig.php index ca5cc37..f1bd926 100644 --- a/Modules/Core/ViewConfig.php +++ b/Modules/Core/ViewConfig.php @@ -30,7 +30,7 @@ class ViewConfig extends ViewConfig_parent { if ($this->sContainerId === null) { - $this->sContainerId = $this->getConfig()->getConfigParam('vt_gtm_sContainerID'); + $this->sContainerId = $this->getConfig()->getConfigParam('d3_gtm_sContainerID'); } return $this->sContainerId; } @@ -41,7 +41,7 @@ class ViewConfig extends ViewConfig_parent { if ($this->blGA4enabled === null) { - $this->sContainerId = $this->getConfig()->getConfigParam('vt_gtm_blEnableGA4'); + $this->sContainerId = $this->getConfig()->getConfigParam('d3_gtm_blEnableGA4'); } return $this->blGA4enabled; @@ -81,40 +81,11 @@ class ViewConfig extends ViewConfig_parent //'httpref' => $_SERVER["HTTP_REFERER"] ?? "unknown" ]; - #return json_encode([$dataLayer], JSON_PRETTY_PRINT); + return json_encode([$dataLayer], JSON_PRETTY_PRINT); unset($dataLayer["user"]["http"]); // das brauchen wir hier nicht - return json_encode([$dataLayer], JSON_PRETTY_PRINT); - /* - // --- Produktdaten --- - $transactionProducts = []; - foreach($oOrder->getOrderArticles() as $_prod ) $transactionProducts[] = [ - 'name' => '', // (erforderlich) Produktname String - 'sku' => '', // (erforderlich) Produkt-SKU String - 'category' => '', // (optional) Produktkategorie String - 'price' => '', // (erforderlich) Preis pro Einheit Numerischer Wert - 'quantity' => '' // (erforderlich) Anzahl der Artikel Numerischer Wert - ]; - - // --- Transaktionsdaten --- - - $dataLayer['transactionId'] = $oOrder->oxorder__oxordernr->value; // (erforderlich) Eindeutige Transaktionskennung String - $dataLayer['transactionAffiliation'] = $oShop->oxshops__oxname->value; // (optional) Partner oder Geschäft String - $dataLayer['transactionTotal'] = $oOrder->oxorder__oxtotalordersum->value; // (erforderlich) Gesamtwert der Transaktion Numerischer Wert - $dataLayer['transactionShipping'] = $oOrder->oxorder__oxdelcost->value; // (optional) Versandkosten für die Transaktion Numerischer Wert - $dataLayer['transactionTax'] = ''; // (optional) Steuerbetrag für die Transaktion Numerischer Wert - $dataLayer['transactionProducts'] = $transactionProducts; // (optional) Liste der bei der Transaktion erworbenen Artikel Array von Produktobjekten - */ - } - - public function triggerGA4events() - { - // general events - - } - public function isPromotionList($listId) { $oConfig = Registry::getConfig(); diff --git a/metadata.php b/metadata.php index ab06efe..4f76652 100755 --- a/metadata.php +++ b/metadata.php @@ -46,10 +46,10 @@ $aModule = [ 'ga4_view_item_list.tpl' => 'd3/googleanalytics4/Application/views/ga4/view_item_list.tpl', 'ga4_view_promotion.tpl' => 'd3/googleanalytics4/Application/views/ga4/view_promotion.tpl', /* - 'gtm_ua_impression' => 'vt/GoogleTagManager/Application/views/ua/impression.tpl' - 'gtm_view_promotion.tpl' => 'vt/GoogleTagManager/Application/views/view_promotion.tpl', - 'gtm_select_promotion.tpl' => 'vt/GoogleTagManager/Application/views/select_promotion.tpl', - 'gtm_begin_checkout.tpl' => 'vt/GoogleTagManager/Application/views/begin_checkout.tpl', + 'gtm_ua_impression' => 'd3/GoogleTagManager/Application/views/ua/impression.tpl' + 'gtm_view_promotion.tpl' => 'd3/GoogleTagManager/Application/views/view_promotion.tpl', + 'gtm_select_promotion.tpl' => 'd3/GoogleTagManager/Application/views/select_promotion.tpl', + 'gtm_begin_checkout.tpl' => 'd3/GoogleTagManager/Application/views/begin_checkout.tpl', */ ], 'blocks' => [ @@ -145,36 +145,36 @@ $aModule = [ ], 'settings' => [ [ - 'group' => 'vt_gtm_settings', - 'name' => 'vt_gtm_sContainerID', + 'group' => 'd3_gtm_settings', + 'name' => 'd3_gtm_sContainerID', 'type' => 'str', 'value' => 'GTM-', 'position' => 0 ], [ - 'group' => 'vt_gtm_settings', - 'name' => 'vt_gtm_blGA4enab', + 'group' => 'd3_gtm_settings', + 'name' => 'd3_gtm_sContainerID', 'type' => 'bool', 'value' => true, 'position' => 1 ], [ - 'group' => 'vt_gtm_settings', - 'name' => 'vt_gtm_blEnableDebug', + 'group' => 'd3_gtm_settings', + 'name' => 'd3_gtm_blEnableDebug', 'type' => 'bool', 'value' => false, 'position' => 999 ], [ - 'group' => 'vt_gtm_settings_cookiemanager', - 'name' => 'vt_gtm_settings_hasOwnCookieManager', + 'group' => 'd3_gtm_settings_cookiemanager', + 'name' => 'd3_gtm_settings_hasOwnCookieManager', 'type' => 'bool', 'value' => false, 'position' => 999 ], [ - 'group' => 'vt_gtm_settings_cookiemanager', - 'name' => 'vt_gtm_settings_cookieName', + 'group' => 'd3_gtm_settings_cookiemanager', + 'name' => 'd3_gtm_settings_cookieName', 'type' => 'str', 'value' => 'example', 'position' => 999