From 5e358fc6845151f0355d165e6e737570f754442b Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 1 Feb 2023 15:32:28 +0100 Subject: [PATCH 01/13] add own cookie-check method; rm unnecessary help-text --- Application/views/admin/de/module_options.php | 7 ------- Application/views/blocks/_gtm_js.tpl | 2 +- Modules/Core/ViewConfig.php | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Application/views/admin/de/module_options.php b/Application/views/admin/de/module_options.php index 572b734..bfa9bc5 100755 --- a/Application/views/admin/de/module_options.php +++ b/Application/views/admin/de/module_options.php @@ -35,12 +35,5 @@ $aLang = [ '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_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_d3_gtm_settings_cookieName' => 'Cookie-Name', ]; diff --git a/Application/views/blocks/_gtm_js.tpl b/Application/views/blocks/_gtm_js.tpl index cb6081c..e070806 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('d3_gtm_settings_hasOwnCookieManager')}] - [{if $oViewConf->blAcceptedCookie($d3VtConfigObject->getConfigParam('d3_gtm_settings_cookieName'))}] + [{if $oViewConf->D3blAcceptedCookie($d3VtConfigObject->getConfigParam('d3_gtm_settings_cookieName'))}] [{if $oViewConf->getGtmContainerId()}][{strip}] diff --git a/Modules/Core/ViewConfig.php b/Modules/Core/ViewConfig.php index 837cca8..e40fe90 100644 --- a/Modules/Core/ViewConfig.php +++ b/Modules/Core/ViewConfig.php @@ -32,6 +32,22 @@ class ViewConfig extends ViewConfig_parent return $this->sContainerId; } + /** + * @param $sCookieID + * @return bool + */ + public function D3blAcceptedCookie($sCookieID) + { + $oSession = Registry::getSession(); + $aCookies = $oSession->getVariable("aCookieSel"); + + if (!is_null($aCookies) && is_array($aCookies) && array_key_exists($sCookieID, $aCookies) && $aCookies[$sCookieID] == "1") { + return true; + } + + return false; + } + private $blGA4enabled = null; public function isGA4enabled() From 667b48ac4b993a7b7d2478fb37a3fcf7a129a11d Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 1 Feb 2023 15:33:52 +0100 Subject: [PATCH 02/13] rm unnecessary hint --- Application/views/admin/de/module_options.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Application/views/admin/de/module_options.php b/Application/views/admin/de/module_options.php index bfa9bc5..50e9200 100755 --- a/Application/views/admin/de/module_options.php +++ b/Application/views/admin/de/module_options.php @@ -33,7 +33,6 @@ $aLang = [ // for cookie manager settings 'SHOP_MODULE_GROUP_d3_gtm_settings_cookiemanager' => 'Cookie Manager Einstellungen', - 'SHOP_MODULE_d3_gtm_settings_hasOwnCookieManager' => 'Eigenen Cookie Manager nutzen? - Hinweis (Fragezeichen) lesen!', + 'SHOP_MODULE_d3_gtm_settings_hasOwnCookieManager' => 'Eigenen Cookie Manager nutzen?', 'SHOP_MODULE_d3_gtm_settings_cookieName' => 'Cookie-Name', ]; From 25234abfd8f48bc1c93b463c78fbbc43a0e71ec5 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 1 Feb 2023 15:42:59 +0100 Subject: [PATCH 03/13] bump version --- CHANGELOG.md | 4 ++++ metadata.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7121cb..3034bfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ 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.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.1...1.2) - 2023-02-01 +### Added +- own cookie-check-handler + ## [1.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.0...1.1) - 2023-01-27 ### Added - block section for add_to_basket js diff --git a/metadata.php b/metadata.php index 7bc3d9a..269d467 100755 --- a/metadata.php +++ b/metadata.php @@ -17,7 +17,7 @@ $aModule = [ Die Entwicklung basiert auf einem Fork von Marat Bedoev - Github-Link ", 'thumbnail' => 'thumbnail.png', - 'version' => '1.1.0', + 'version' => '1.2.0', 'author' => 'Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'https://www.oxidmodule.com/', From 98533cf7f71bbbdd619779903bfc4b13f1da92e2 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 22 Feb 2023 13:46:27 +0100 Subject: [PATCH 04/13] add special price formatting --- Application/views/blocks/checkout_s1.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Application/views/blocks/checkout_s1.tpl b/Application/views/blocks/checkout_s1.tpl index 79bfee6..498b7dc 100644 --- a/Application/views/blocks/checkout_s1.tpl +++ b/Application/views/blocks/checkout_s1.tpl @@ -4,6 +4,8 @@ [{assign var='gtmCartArticles' value=$oView->getBasketArticles()}] [{strip}][{capture assign=d3_ga4_view_cart}] + let iPrice = "[{oxprice price=$oxcmp_basket->getPrice()}]"; + dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */ dataLayer.push({ 'event': 'view_cart', @@ -11,7 +13,7 @@ 'ecommerce': { 'actionField': "step: 1", 'currency': "[{$currency->name}]", - 'value': [{oxprice price=$oxcmp_basket->getPrice()}], + 'value': iPrice.replace("€", ""), 'items': [ [{foreach from=$oxcmp_basket->getContents() item=basketitem name=gtmCartContents key=basketindex}] [{assign var='_price' value=$basketitem->getUnitPrice()}] From 707e389f54d9f69700ba30636695f6cd03c5df29 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 22 Feb 2023 14:21:24 +0100 Subject: [PATCH 05/13] bump version --- CHANGELOG.md | 4 ++++ metadata.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3034bfb..1ab6f05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ 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.2.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.2...1.2.1) - 2023-02-22 +### Fixed +- price formatting in view_cart + ## [1.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.1...1.2) - 2023-02-01 ### Added - own cookie-check-handler diff --git a/metadata.php b/metadata.php index 269d467..0b3a55d 100755 --- a/metadata.php +++ b/metadata.php @@ -17,7 +17,7 @@ $aModule = [ Die Entwicklung basiert auf einem Fork von Marat Bedoev - Github-Link ", 'thumbnail' => 'thumbnail.png', - 'version' => '1.2.0', + 'version' => '1.2.1', 'author' => 'Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'https://www.oxidmodule.com/', From 5fe656988c37b8e08fd92c9bc0e33cd895de1b06 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 10 Mar 2023 11:22:49 +0100 Subject: [PATCH 06/13] genuine cleaning off of unnecessary files (prevent confusion) --- Application/views/blocks/_impression.tpl | 66 ------------------ Application/views/blocks/add_to_cart.tpl | 5 -- Application/views/blocks/checkout_s2.tpl | 18 ----- Application/views/blocks/checkout_s3.tpl | 9 --- Application/views/blocks/checkout_s4.tpl | 9 --- Application/views/blocks/detail.tpl | 25 ------- .../views/blocks/widget_product_list.tpl | 37 ---------- Application/views/ga4/add_payment_info.tpl | 0 Application/views/ga4/add_shipping_info.tpl | 0 Application/views/ga4/begin_checkout.tpl | 0 Application/views/ga4/generate_lead.tpl | 0 Application/views/ga4/login.tpl | 0 Application/views/ga4/purchase.tpl | 36 ---------- Application/views/ga4/remove_from_cart.tpl | 0 Application/views/ga4/select_content.tpl | 0 Application/views/ga4/select_item.tpl | 0 Application/views/ga4/select_promotion.tpl | 0 Application/views/ga4/sign_up.tpl | 0 Application/views/ga4/view_cart.tpl | 0 Application/views/ga4/view_promotion.tpl | 0 metadata.php | 68 +++---------------- 21 files changed, 10 insertions(+), 263 deletions(-) delete mode 100644 Application/views/blocks/_impression.tpl delete mode 100644 Application/views/blocks/add_to_cart.tpl delete mode 100644 Application/views/blocks/checkout_s2.tpl delete mode 100644 Application/views/blocks/checkout_s3.tpl delete mode 100644 Application/views/blocks/checkout_s4.tpl delete mode 100644 Application/views/blocks/detail.tpl delete mode 100644 Application/views/blocks/widget_product_list.tpl delete mode 100755 Application/views/ga4/add_payment_info.tpl delete mode 100755 Application/views/ga4/add_shipping_info.tpl delete mode 100755 Application/views/ga4/begin_checkout.tpl delete mode 100755 Application/views/ga4/generate_lead.tpl delete mode 100755 Application/views/ga4/login.tpl delete mode 100755 Application/views/ga4/purchase.tpl delete mode 100755 Application/views/ga4/remove_from_cart.tpl delete mode 100755 Application/views/ga4/select_content.tpl delete mode 100755 Application/views/ga4/select_item.tpl delete mode 100755 Application/views/ga4/select_promotion.tpl delete mode 100755 Application/views/ga4/sign_up.tpl delete mode 100755 Application/views/ga4/view_cart.tpl delete mode 100755 Application/views/ga4/view_promotion.tpl diff --git a/Application/views/blocks/_impression.tpl b/Application/views/blocks/_impression.tpl deleted file mode 100644 index 362f469..0000000 --- a/Application/views/blocks/_impression.tpl +++ /dev/null @@ -1,66 +0,0 @@ -[{$smarty.block.parent}] -[{* -[{strip}] - [{assign var="gtmProduct" value=$oView->getProduct()}] - [{assign var="gtmCategory" value=$gtmProduct->getCategory()}] - [{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}] - - [{if !$head }] - [{assign var=$head value=$oView->getViewParameter('head')}] - [{/if}] - -[{/strip}] -*}] \ No newline at end of file diff --git a/Application/views/blocks/add_to_cart.tpl b/Application/views/blocks/add_to_cart.tpl deleted file mode 100644 index 0202833..0000000 --- a/Application/views/blocks/add_to_cart.tpl +++ /dev/null @@ -1,5 +0,0 @@ -[{if $oxcmp_basket->isNewItemAdded() && $smarty.session._newitem}] - - [{* include file="ga4_add_to_cart.tpl" gtmProduct=$smarty.session._newitem *}] -[{/if}] -[{$smarty.block.parent}] diff --git a/Application/views/blocks/checkout_s2.tpl b/Application/views/blocks/checkout_s2.tpl deleted file mode 100644 index 346ffb6..0000000 --- a/Application/views/blocks/checkout_s2.tpl +++ /dev/null @@ -1,18 +0,0 @@ -[{strip}] - -[{/strip}] -[{$smarty.block.parent}] \ No newline at end of file diff --git a/Application/views/blocks/checkout_s3.tpl b/Application/views/blocks/checkout_s3.tpl deleted file mode 100644 index 701d486..0000000 --- a/Application/views/blocks/checkout_s3.tpl +++ /dev/null @@ -1,9 +0,0 @@ - -[{$smarty.block.parent}] \ No newline at end of file diff --git a/Application/views/blocks/checkout_s4.tpl b/Application/views/blocks/checkout_s4.tpl deleted file mode 100644 index 108e59d..0000000 --- a/Application/views/blocks/checkout_s4.tpl +++ /dev/null @@ -1,9 +0,0 @@ - -[{$smarty.block.parent}] \ No newline at end of file diff --git a/Application/views/blocks/detail.tpl b/Application/views/blocks/detail.tpl deleted file mode 100644 index bf4322a..0000000 --- a/Application/views/blocks/detail.tpl +++ /dev/null @@ -1,25 +0,0 @@ -[{$smarty.block.parent}] -[{assign var="gtmProduct" value=$oView->getProduct()}] -[{assign var="gtmCategory" value=$gtmProduct->getCategory()}] -[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}] - - \ No newline at end of file diff --git a/Application/views/blocks/widget_product_list.tpl b/Application/views/blocks/widget_product_list.tpl deleted file mode 100644 index 7a9524b..0000000 --- a/Application/views/blocks/widget_product_list.tpl +++ /dev/null @@ -1,37 +0,0 @@ -[{$smarty.block.parent}] -[{assign var="gtmProduct" value=$oView->getProduct()}] -[{if $gtmProduct}] - [{assign var="gtmCategory" value=$gtmProduct->getCategory()}] - [{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}] - - -[{/if}] \ No newline at end of file diff --git a/Application/views/ga4/add_payment_info.tpl b/Application/views/ga4/add_payment_info.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/add_shipping_info.tpl b/Application/views/ga4/add_shipping_info.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/begin_checkout.tpl b/Application/views/ga4/begin_checkout.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/generate_lead.tpl b/Application/views/ga4/generate_lead.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/login.tpl b/Application/views/ga4/login.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/purchase.tpl b/Application/views/ga4/purchase.tpl deleted file mode 100755 index f4f1e29..0000000 --- a/Application/views/ga4/purchase.tpl +++ /dev/null @@ -1,36 +0,0 @@ -[{strip}] - -[{/strip}] \ No newline at end of file diff --git a/Application/views/ga4/remove_from_cart.tpl b/Application/views/ga4/remove_from_cart.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/select_content.tpl b/Application/views/ga4/select_content.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/select_item.tpl b/Application/views/ga4/select_item.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/select_promotion.tpl b/Application/views/ga4/select_promotion.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/sign_up.tpl b/Application/views/ga4/sign_up.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/view_cart.tpl b/Application/views/ga4/view_cart.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/view_promotion.tpl b/Application/views/ga4/view_promotion.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/metadata.php b/metadata.php index 87f7b6c..c9a602b 100755 --- a/metadata.php +++ b/metadata.php @@ -26,23 +26,11 @@ $aModule = [ ], 'templates' => [ // GA4 events - 'ga4_add_payment_info.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_payment_info.tpl', - 'add_shipping_info.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_shipping_info.tpl', 'ga4_add_to_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_to_cart.tpl', - 'ga4_begin_checkout.tpl' => 'd3/googleanalytics4/Application/views/ga4/begin_checkout.tpl', - 'ga4_generate_lead.tpl' => 'd3/googleanalytics4/Application/views/ga4/generate_lead.tpl', - 'ga4_login.tpl' => 'd3/googleanalytics4/Application/views/ga4/login.tpl', - 'ga4_purchase.tpl' => 'd3/googleanalytics4/Application/views/ga4/purchase.tpl', - 'ga4_remove_from_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/remove_from_cart.tpl', 'ga4_search.tpl' => 'd3/googleanalytics4/Application/views/ga4/search.tpl', - 'ga4_select_content.tpl' => 'd3/googleanalytics4/Application/views/ga4/select_content.tpl', - 'ga4_select_item.tpl' => 'd3/googleanalytics4/Application/views/ga4/select_item.tpl', - 'ga4_select_promotion.tpl' => 'd3/googleanalytics4/Application/views/ga4/select_promotion.tpl', - 'ga4_sign_up.tpl' => 'd3/googleanalytics4/Application/views/ga4/sign_up.tpl', - 'ga4_view_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/view_cart.tpl', + // article-details // view_item 'ga4_view_item.tpl' => 'd3/googleanalytics4/Application/views/ga4/view_item.tpl', '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', ], 'blocks' => [ // tag manager js @@ -57,55 +45,26 @@ $aModule = [ 'block' => 'theme_svg_icons', 'file' => '/Application/views/blocks/_gtm_nojs.tpl' ], - // widget_product_list - [ - 'template' => 'widget/product/list.tpl', - 'block' => 'widget_product_list', - 'file' => '/Application/views/blocks/widget_product_list.tpl' - ], - // details - [ - 'template' => 'page/details/inc/productmain.tpl', - 'block' => 'details_productmain_title', - 'file' => '/Application/views/blocks/detail.tpl', - 'position' => 150 - ], // checkout + // view_cart [ 'template' => 'page/checkout/basket.tpl', 'block' => 'checkout_basket_main', 'file' => '/Application/views/blocks/checkout_s1.tpl' ], - [ - 'template' => 'form/user_checkout_change.tpl', - 'block' => 'user_checkout_change', - 'file' => '/Application/views/blocks/checkout_s2.tpl' - ], - [ - 'template' => 'form/user_checkout_register.tpl', - 'block' => 'user_checkout_register', - 'file' => '/Application/views/blocks/checkout_s2.tpl' - ], - [ - 'template' => 'form/user_checkout_noregister.tpl', - 'block' => 'user_checkout_noregister', - 'file' => '/Application/views/blocks/checkout_s2.tpl' - ], - [ - 'template' => 'page/checkout/payment.tpl', - 'block' => 'checkout_payment_main', - 'file' => '/Application/views/blocks/checkout_s3.tpl' - ], - [ - 'template' => 'page/checkout/order.tpl', - 'block' => 'checkout_order_main', - 'file' => '/Application/views/blocks/checkout_s4.tpl' - ], + // purchase [ 'template' => 'page/checkout/thankyou.tpl', 'block' => 'checkout_thankyou_main', 'file' => '/Application/views/blocks/checkout_s5.tpl' ], + // add_to_cart + [ + 'template' => 'page/details/inc/productmain.tpl', + 'block' => 'details_productmain_tobasket', + 'file' => '/Application/views/ga4/add_to_cart.tpl', + 'position' => 150 + ], // Lists // view_item_list [ @@ -120,13 +79,6 @@ $aModule = [ 'block' => 'search_results', 'file' => '/Application/views/ga4/search.tpl', 'position' => 150 - ], - // add_to_cart - [ - 'template' => 'page/details/inc/productmain.tpl', - 'block' => 'details_productmain_tobasket', - 'file' => '/Application/views/ga4/add_to_cart.tpl', - 'position' => 150 ] ], 'settings' => [ From 63007e9b0220fb99671523d783792af67a513540 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 10 Mar 2023 11:25:12 +0100 Subject: [PATCH 07/13] bump version --- CHANGELOG.md | 3 +++ metadata.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c251d0d..509abec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ 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). +## [2.2.3](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.2.2...2.2.3) - 2023-03-10 +### Removed +- unnecessary files to prevent confusion ## [2.2.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.2.1...2.2.2) - 2023-02-22 ### Fixed diff --git a/metadata.php b/metadata.php index c9a602b..d1e47e4 100755 --- a/metadata.php +++ b/metadata.php @@ -17,7 +17,7 @@ $aModule = [ Die Entwicklung basiert auf einem Fork von Marat Bedoev - Github-Link ", 'thumbnail' => 'thumbnail.png', - 'version' => '2.2.2', + 'version' => '2.2.3', 'author' => 'Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'https://www.oxidmodule.com/', From 1ff6f0159ff9807a3ce2c08c0ac138d0b65ea88b Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Thu, 16 Mar 2023 10:59:39 +0100 Subject: [PATCH 08/13] rm overblowing files --- Application/views/blocks/_impression.tpl | 66 --------------------- Application/views/blocks/add_to_cart.tpl | 5 -- Application/views/blocks/checkout_s2.tpl | 18 ------ Application/views/blocks/checkout_s3.tpl | 9 --- Application/views/blocks/checkout_s4.tpl | 9 --- Application/views/ga4/add_payment_info.tpl | 0 Application/views/ga4/add_shipping_info.tpl | 0 Application/views/ga4/begin_checkout.tpl | 0 Application/views/ga4/generate_lead.tpl | 0 Application/views/ga4/login.tpl | 0 Application/views/ga4/purchase.tpl | 36 ----------- Application/views/ga4/remove_from_cart.tpl | 0 Application/views/ga4/select_content.tpl | 0 Application/views/ga4/select_item.tpl | 0 Application/views/ga4/select_promotion.tpl | 0 Application/views/ga4/sign_up.tpl | 0 Application/views/ga4/view_cart.tpl | 0 Application/views/ga4/view_item.tpl | 26 -------- Application/views/ga4/view_promotion.tpl | 0 metadata.php | 39 ------------ 20 files changed, 208 deletions(-) delete mode 100644 Application/views/blocks/_impression.tpl delete mode 100644 Application/views/blocks/add_to_cart.tpl delete mode 100644 Application/views/blocks/checkout_s2.tpl delete mode 100644 Application/views/blocks/checkout_s3.tpl delete mode 100644 Application/views/blocks/checkout_s4.tpl delete mode 100755 Application/views/ga4/add_payment_info.tpl delete mode 100755 Application/views/ga4/add_shipping_info.tpl delete mode 100755 Application/views/ga4/begin_checkout.tpl delete mode 100755 Application/views/ga4/generate_lead.tpl delete mode 100755 Application/views/ga4/login.tpl delete mode 100755 Application/views/ga4/purchase.tpl delete mode 100755 Application/views/ga4/remove_from_cart.tpl delete mode 100755 Application/views/ga4/select_content.tpl delete mode 100755 Application/views/ga4/select_item.tpl delete mode 100755 Application/views/ga4/select_promotion.tpl delete mode 100755 Application/views/ga4/sign_up.tpl delete mode 100755 Application/views/ga4/view_cart.tpl delete mode 100644 Application/views/ga4/view_item.tpl delete mode 100755 Application/views/ga4/view_promotion.tpl diff --git a/Application/views/blocks/_impression.tpl b/Application/views/blocks/_impression.tpl deleted file mode 100644 index 362f469..0000000 --- a/Application/views/blocks/_impression.tpl +++ /dev/null @@ -1,66 +0,0 @@ -[{$smarty.block.parent}] -[{* -[{strip}] - [{assign var="gtmProduct" value=$oView->getProduct()}] - [{assign var="gtmCategory" value=$gtmProduct->getCategory()}] - [{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}] - - [{if !$head }] - [{assign var=$head value=$oView->getViewParameter('head')}] - [{/if}] - -[{/strip}] -*}] \ No newline at end of file diff --git a/Application/views/blocks/add_to_cart.tpl b/Application/views/blocks/add_to_cart.tpl deleted file mode 100644 index 0202833..0000000 --- a/Application/views/blocks/add_to_cart.tpl +++ /dev/null @@ -1,5 +0,0 @@ -[{if $oxcmp_basket->isNewItemAdded() && $smarty.session._newitem}] - - [{* include file="ga4_add_to_cart.tpl" gtmProduct=$smarty.session._newitem *}] -[{/if}] -[{$smarty.block.parent}] diff --git a/Application/views/blocks/checkout_s2.tpl b/Application/views/blocks/checkout_s2.tpl deleted file mode 100644 index 346ffb6..0000000 --- a/Application/views/blocks/checkout_s2.tpl +++ /dev/null @@ -1,18 +0,0 @@ -[{strip}] - -[{/strip}] -[{$smarty.block.parent}] \ No newline at end of file diff --git a/Application/views/blocks/checkout_s3.tpl b/Application/views/blocks/checkout_s3.tpl deleted file mode 100644 index 701d486..0000000 --- a/Application/views/blocks/checkout_s3.tpl +++ /dev/null @@ -1,9 +0,0 @@ - -[{$smarty.block.parent}] \ No newline at end of file diff --git a/Application/views/blocks/checkout_s4.tpl b/Application/views/blocks/checkout_s4.tpl deleted file mode 100644 index 108e59d..0000000 --- a/Application/views/blocks/checkout_s4.tpl +++ /dev/null @@ -1,9 +0,0 @@ - -[{$smarty.block.parent}] \ No newline at end of file diff --git a/Application/views/ga4/add_payment_info.tpl b/Application/views/ga4/add_payment_info.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/add_shipping_info.tpl b/Application/views/ga4/add_shipping_info.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/begin_checkout.tpl b/Application/views/ga4/begin_checkout.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/generate_lead.tpl b/Application/views/ga4/generate_lead.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/login.tpl b/Application/views/ga4/login.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/purchase.tpl b/Application/views/ga4/purchase.tpl deleted file mode 100755 index f4f1e29..0000000 --- a/Application/views/ga4/purchase.tpl +++ /dev/null @@ -1,36 +0,0 @@ -[{strip}] - -[{/strip}] \ No newline at end of file diff --git a/Application/views/ga4/remove_from_cart.tpl b/Application/views/ga4/remove_from_cart.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/select_content.tpl b/Application/views/ga4/select_content.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/select_item.tpl b/Application/views/ga4/select_item.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/select_promotion.tpl b/Application/views/ga4/select_promotion.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/sign_up.tpl b/Application/views/ga4/sign_up.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/view_cart.tpl b/Application/views/ga4/view_cart.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/Application/views/ga4/view_item.tpl b/Application/views/ga4/view_item.tpl deleted file mode 100644 index e44d842..0000000 --- a/Application/views/ga4/view_item.tpl +++ /dev/null @@ -1,26 +0,0 @@ -[{strip}] - [{* variable $gtmProduct is passed from parent tempalte *}] - [{assign var="gtmCurrency" value=$oView->getActCurrency()}] - [{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}] - [{assign var="gtmCategory" value=$gtmProduct->getCategory()}] - -[{/strip}] \ No newline at end of file diff --git a/Application/views/ga4/view_promotion.tpl b/Application/views/ga4/view_promotion.tpl deleted file mode 100755 index e69de29..0000000 diff --git a/metadata.php b/metadata.php index 0b3a55d..3a21f67 100755 --- a/metadata.php +++ b/metadata.php @@ -26,23 +26,9 @@ $aModule = [ ], 'templates' => [ // GA4 events - 'ga4_add_payment_info.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_payment_info.tpl', - 'add_shipping_info.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_shipping_info.tpl', 'ga4_add_to_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_to_cart.tpl', - 'ga4_begin_checkout.tpl' => 'd3/googleanalytics4/Application/views/ga4/begin_checkout.tpl', - 'ga4_generate_lead.tpl' => 'd3/googleanalytics4/Application/views/ga4/generate_lead.tpl', - 'ga4_login.tpl' => 'd3/googleanalytics4/Application/views/ga4/login.tpl', - 'ga4_purchase.tpl' => 'd3/googleanalytics4/Application/views/ga4/purchase.tpl', - 'ga4_remove_from_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/remove_from_cart.tpl', 'ga4_search.tpl' => 'd3/googleanalytics4/Application/views/ga4/search.tpl', - 'ga4_select_content.tpl' => 'd3/googleanalytics4/Application/views/ga4/select_content.tpl', - 'ga4_select_item.tpl' => 'd3/googleanalytics4/Application/views/ga4/select_item.tpl', - 'ga4_select_promotion.tpl' => 'd3/googleanalytics4/Application/views/ga4/select_promotion.tpl', - 'ga4_sign_up.tpl' => 'd3/googleanalytics4/Application/views/ga4/sign_up.tpl', - 'ga4_view_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/view_cart.tpl', - 'ga4_view_item.tpl' => 'd3/googleanalytics4/Application/views/ga4/view_item.tpl', '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', ], 'blocks' => [ // tag manager js @@ -76,31 +62,6 @@ $aModule = [ 'block' => 'checkout_basket_main', 'file' => '/Application/views/blocks/checkout_s1.tpl' ], - [ - 'template' => 'form/user_checkout_change.tpl', - 'block' => 'user_checkout_change', - 'file' => '/Application/views/blocks/checkout_s2.tpl' - ], - [ - 'template' => 'form/user_checkout_register.tpl', - 'block' => 'user_checkout_register', - 'file' => '/Application/views/blocks/checkout_s2.tpl' - ], - [ - 'template' => 'form/user_checkout_noregister.tpl', - 'block' => 'user_checkout_noregister', - 'file' => '/Application/views/blocks/checkout_s2.tpl' - ], - [ - 'template' => 'page/checkout/payment.tpl', - 'block' => 'checkout_payment_main', - 'file' => '/Application/views/blocks/checkout_s3.tpl' - ], - [ - 'template' => 'page/checkout/order.tpl', - 'block' => 'checkout_order_main', - 'file' => '/Application/views/blocks/checkout_s4.tpl' - ], [ 'template' => 'page/checkout/thankyou.tpl', 'block' => 'checkout_thankyou_main', From 13df965a0341838375a460b768f3623688ff56ce Mon Sep 17 00:00:00 2001 From: Christoph Staeblein Date: Fri, 17 Mar 2023 08:58:15 +0100 Subject: [PATCH 09/13] bug-fix: wrong function for pageview on thankyou page --- Modules/Core/ViewConfig.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/Core/ViewConfig.php b/Modules/Core/ViewConfig.php index e40fe90..a1e36a7 100644 --- a/Modules/Core/ViewConfig.php +++ b/Modules/Core/ViewConfig.php @@ -70,7 +70,7 @@ class ViewConfig extends ViewConfig_parent $oUser = $oConfig->getUser(); - $cl = $this->getTopActionClassName(); + $cl = $this->getTopActiveClassName(); $aPageTypes = [ "content" => "cms", "details" => "product", @@ -81,6 +81,7 @@ class ViewConfig extends ViewConfig_parent "payment" => "checkout", "order" => "checkout", "thankyou" => "checkout", + "start" => "start", ]; $dataLayer = [ From 0e55c3e38ff85d2bf1caa9fd6927b0552209b43f Mon Sep 17 00:00:00 2001 From: Christoph Staeblein Date: Fri, 17 Mar 2023 10:59:50 +0100 Subject: [PATCH 10/13] add: Aggrosoft-Cookie-Consent compatibility --- Modules/Core/ViewConfig.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Modules/Core/ViewConfig.php b/Modules/Core/ViewConfig.php index a1e36a7..3722337 100644 --- a/Modules/Core/ViewConfig.php +++ b/Modules/Core/ViewConfig.php @@ -45,6 +45,11 @@ class ViewConfig extends ViewConfig_parent return true; } + // Aggrosoft Cookie Consent + if (method_exists($this, "isCookieCategoryEnabled")) { + return $this->isCookieCategoryEnabled($sCookieID); + } + return false; } From 4e0988307a0ee8eb53029035bee9f19fa5e524f7 Mon Sep 17 00:00:00 2001 From: MaxBuhe01 Date: Fri, 17 Mar 2023 14:03:53 +0100 Subject: [PATCH 11/13] bump readme files --- Docs/README.md | 28 +++++++++++++++++++++------- README.md | 1 + 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Docs/README.md b/Docs/README.md index b526a3b..de361e6 100644 --- a/Docs/README.md +++ b/Docs/README.md @@ -1,11 +1,11 @@ -## Technische Doku -### GA4 Events / Customizing +# Technische Doku +## GA4 Events / Customizing Für alle implementierten GA4 Events existieren Templates unter `source/modules/d3/googleanalytics4/Application/views/ga4/`, dabei entspricht der Dateiname dem Eventnamen in GA4. Die Einbindung dieser Event-Templates erfolgt über TPL-Blöcke unter `source/modules/d3/googleanalytics4/Application/views/blocks/`. *Hinweis: nicht alle templates sind bereits gefüllt. Wünschen Sie die Implementierung eines unausgefüllten templates? Kommen Sie auf uns zu unter https://www.d3data.de/ -### Blöcke +## Blöcke Für den geregelten Ablauf sind folgende Blöcke nötig: - Suchergebnisse - Blockname: search_results @@ -32,7 +32,7 @@ Für den geregelten Ablauf sind folgende Blöcke nötig: - Datei: page/checkout/thankyou.tpl - GA4 Event: purchase -### Verfügbare Datalayer Variablen +## Verfügbare Datalayer Variablen Für die einfachste Übersicht der enthaltenen Daten empfehle ich den Vorschau-Modus vom Google Tag Manager. Bei jedem Seitenaufruf wird die Datenschicht mit einigen wenigen Infos erstellt, die man zum reinen Erfassen der Seitenaufrufe benötigt: @@ -44,8 +44,22 @@ Bei jedem Seitenaufruf wird die Datenschicht mit einigen wenigen Infos erstellt, Alle für Ecommerce Tracking relevanten Daten werden mit speziellen Ecommerce Events in die Datenschicht eingefügt. -### Cookie-Handling +## Cookie-Handling Sie nutzen einen eigenen, als Modul im Shop installierten, Cookie-manager? Dann tragen Sie in den Folgeeinstellungen unter "Cookie Manager Einstellungen", -die Cookie-ID des zugehörigen Cookies ein. Und aktivieren Sie diese Weiche, -indem Sie den Haken bei "Eigenen Cookie Manager nutzen?" setzen. \ No newline at end of file +die Cookie-ID des zugehörigen Cookies ein. +Aktivieren Sie anschließend diese Weiche. Setzen Sie den Haken bei "Eigenen Cookie Manager nutzen?". + +### Unterstützung für +- [aggrosoft - oxid-cookie-compliance](https://github.com/aggrosoft/oxid-cookie-compliance) + - https://github.com/aggrosoft/oxid-cookie-compliance + - die entsprechend gewählte Kategorie in den Moduleinstellungen des 'Google Analytics 4' unter + ```Einstell. > Cookie Manager Einstellungen > Cookie-ID``` eintragen + +- [Netensio - Cookie Consent Manager](https://www.netensio.de/oxid-eshop-module/cookie-consent-manager-fuer-oxid-eshop.html) + - Modul entsprechend konfigurieren + - CookieID des angelegten Cookies in den Moduleinstellungen des 'Google Analytics 4' unter + ```Einstell. > Cookie Manager Einstellungen > Cookie-ID``` eintragen + +- [OXID Cookie Management powered by usercentrics](https://docs.oxid-esales.com/modules/usercentrics/de/latest/einfuehrung.html) + - soweit ich weiß nichts weiter? diff --git a/README.md b/README.md index 228ad5e..fc213b9 100644 --- a/README.md +++ b/README.md @@ -77,5 +77,6 @@ Die vollständigen Copyright- und Lizenzinformationen entnehmen Sie bitte der [L Zu diesem Modul haben beigetragen: - [Marat Bedoev](https://github.com/vanilla-thunder) +- [Christoph Stäblein [gn2]](https://github.com/reyneke-vosz) Vielen Dank. \ No newline at end of file From d8fa06233b0cb6c163da5a70fc14e490292f8dd7 Mon Sep 17 00:00:00 2001 From: MaxBuhe01 Date: Fri, 17 Mar 2023 14:49:28 +0100 Subject: [PATCH 12/13] adjust translation --- Application/views/admin/de/module_options.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/views/admin/de/module_options.php b/Application/views/admin/de/module_options.php index 50e9200..2508743 100755 --- a/Application/views/admin/de/module_options.php +++ b/Application/views/admin/de/module_options.php @@ -33,6 +33,6 @@ $aLang = [ // for cookie manager settings 'SHOP_MODULE_GROUP_d3_gtm_settings_cookiemanager' => 'Cookie Manager Einstellungen', - 'SHOP_MODULE_d3_gtm_settings_hasOwnCookieManager' => 'Eigenen Cookie Manager nutzen?', - 'SHOP_MODULE_d3_gtm_settings_cookieName' => 'Cookie-Name', + 'SHOP_MODULE_d3_gtm_settings_hasOwnCookieManager' => 'Cookie Manager nutzen?', + 'SHOP_MODULE_d3_gtm_settings_cookieName' => 'CookieID', ]; From 4222c947a9b49bc94a7ab99b6e052c2347355b6a Mon Sep 17 00:00:00 2001 From: MaxBuhe01 Date: Fri, 17 Mar 2023 14:49:49 +0100 Subject: [PATCH 13/13] bump versions and changelog --- CHANGELOG.md | 6 ++++++ metadata.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ab6f05..4f8c94f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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.3.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.2.1...1.3.1) - 2023-03-17 +### Added +- Aggrosoft-Cookie-Consent compatibility +### Fixed +- wrong function for pageview on thankyou page + ## [1.2.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.2...1.2.1) - 2023-02-22 ### Fixed - price formatting in view_cart diff --git a/metadata.php b/metadata.php index 3a21f67..d816bd6 100755 --- a/metadata.php +++ b/metadata.php @@ -17,7 +17,7 @@ $aModule = [ Die Entwicklung basiert auf einem Fork von Marat Bedoev - Github-Link ", 'thumbnail' => 'thumbnail.png', - 'version' => '1.2.1', + 'version' => '1.3.1', 'author' => 'Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'https://www.oxidmodule.com/',