Merge remote-tracking branch 'remotes/origin/rel_1.x' into rel_2.x
This commit is contained in:
commit
d4df87bfff
@ -30,7 +30,6 @@ $aLang = [
|
|||||||
|
|
||||||
// for cookie manager settings
|
// for cookie manager settings
|
||||||
'SHOP_MODULE_GROUP_d3_gtm_settings_cookiemanager' => 'Cookie Manager Einstellungen',
|
'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_hasOwnCookieManager' => 'Cookie Manager nutzen?',
|
||||||
<strong style="color: red">Hinweis (Fragezeichen) lesen!</strong>',
|
'SHOP_MODULE_d3_gtm_settings_cookieName' => 'CookieID',
|
||||||
'SHOP_MODULE_d3_gtm_settings_cookieName' => 'Cookie-Name',
|
|
||||||
];
|
];
|
||||||
|
@ -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()}]
|
|
||||||
<script type="text/javascript">
|
|
||||||
dataLayer.push({ecommerce: null});
|
|
||||||
dataLayer.push({
|
|
||||||
'event':'GA4_event',
|
|
||||||
'event_name': 'view_item',
|
|
||||||
'ecommerce': {
|
|
||||||
'items': [
|
|
||||||
{
|
|
||||||
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
|
|
||||||
'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]',
|
|
||||||
'item_variant': '[{if $gtmProduct->oxarticles__oxvarselect->value}][{$gtmProduct->oxarticles__oxvarselect->value}][{/if}]',
|
|
||||||
'price': [{$gtmProduct->oxarticles__oxprice->value|default:0}],
|
|
||||||
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
|
||||||
'item_category': '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]-[{/if}]',
|
|
||||||
'quantity': '1'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
[{/strip}]
|
|
16
CHANGELOG.md
16
CHANGELOG.md
@ -4,9 +4,13 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [2.2.3](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.2.2...2.2.3) - 2023-03-10
|
## [2.3.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.2.2...2.3.2) - 2023-03-17
|
||||||
### Removed
|
### Added
|
||||||
- unnecessary files to prevent confusion
|
- Aggrosoft-Cookie-Consent compatibility
|
||||||
|
### Fixed
|
||||||
|
- wrong function for pageview on thankyou page
|
||||||
|
### Deleted
|
||||||
|
- unused files
|
||||||
|
|
||||||
## [2.2.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.2.1...2.2.2) - 2023-02-22
|
## [2.2.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.2.1...2.2.2) - 2023-02-22
|
||||||
### Fixed
|
### Fixed
|
||||||
@ -29,6 +33,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Added
|
### Added
|
||||||
- using of ContainerFactory in ViewConfig
|
- using of ContainerFactory in ViewConfig
|
||||||
|
|
||||||
|
## [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
|
## [1.2.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.2...1.2.1) - 2023-02-22
|
||||||
### Fixed
|
### Fixed
|
||||||
- price formatting view_cart
|
- price formatting view_cart
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
## Technische Doku
|
# Technische Doku
|
||||||
### GA4 Events / Customizing
|
## 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.
|
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/`.
|
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?
|
*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/
|
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:
|
Für den geregelten Ablauf sind folgende Blöcke nötig:
|
||||||
- Suchergebnisse
|
- Suchergebnisse
|
||||||
- Blockname: search_results
|
- Blockname: search_results
|
||||||
@ -32,7 +32,7 @@ Für den geregelten Ablauf sind folgende Blöcke nötig:
|
|||||||
- Datei: page/checkout/thankyou.tpl
|
- Datei: page/checkout/thankyou.tpl
|
||||||
- GA4 Event: purchase
|
- 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.
|
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:
|
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.
|
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?
|
Sie nutzen einen eigenen, als Modul im Shop installierten, Cookie-manager?
|
||||||
Dann tragen Sie in den Folgeeinstellungen unter "Cookie Manager Einstellungen",
|
Dann tragen Sie in den Folgeeinstellungen unter "Cookie Manager Einstellungen",
|
||||||
die Cookie-ID des zugehörigen Cookies ein. Und aktivieren Sie diese Weiche,
|
die Cookie-ID des zugehörigen Cookies ein.
|
||||||
indem Sie den Haken bei "Eigenen Cookie Manager nutzen?" setzen.
|
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?
|
||||||
|
@ -48,6 +48,11 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Aggrosoft Cookie Consent
|
||||||
|
if (method_exists($this, "isCookieCategoryEnabled")) {
|
||||||
|
return $this->isCookieCategoryEnabled($sCookieID);
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +80,7 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
/** @var FrontendController $oShop */
|
/** @var FrontendController $oShop */
|
||||||
$oUser = $oConfig->getUser();
|
$oUser = $oConfig->getUser();
|
||||||
|
|
||||||
$cl = $this->getTopActionClassName();
|
$cl = $this->getTopActiveClassName();
|
||||||
$aPageTypes = [
|
$aPageTypes = [
|
||||||
"content" => "cms",
|
"content" => "cms",
|
||||||
"details" => "product",
|
"details" => "product",
|
||||||
@ -86,6 +91,7 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
"payment" => "checkout",
|
"payment" => "checkout",
|
||||||
"order" => "checkout",
|
"order" => "checkout",
|
||||||
"thankyou" => "checkout",
|
"thankyou" => "checkout",
|
||||||
|
"start" => "start",
|
||||||
];
|
];
|
||||||
|
|
||||||
$dataLayer = [
|
$dataLayer = [
|
||||||
|
@ -77,5 +77,6 @@ Die vollständigen Copyright- und Lizenzinformationen entnehmen Sie bitte der [L
|
|||||||
Zu diesem Modul haben beigetragen:
|
Zu diesem Modul haben beigetragen:
|
||||||
|
|
||||||
- [Marat Bedoev](https://github.com/vanilla-thunder)
|
- [Marat Bedoev](https://github.com/vanilla-thunder)
|
||||||
|
- [Christoph Stäblein [gn2]](https://github.com/reyneke-vosz)
|
||||||
|
|
||||||
Vielen Dank.
|
Vielen Dank.
|
32
metadata.php
32
metadata.php
@ -17,7 +17,7 @@ $aModule = [
|
|||||||
Die Entwicklung basiert auf einem Fork von Marat Bedoev - <a href='https://github.com/vanilla-thunder/oxid-module-gtm'>Github-Link</a>
|
Die Entwicklung basiert auf einem Fork von Marat Bedoev - <a href='https://github.com/vanilla-thunder/oxid-module-gtm'>Github-Link</a>
|
||||||
",
|
",
|
||||||
'thumbnail' => 'thumbnail.png',
|
'thumbnail' => 'thumbnail.png',
|
||||||
'version' => '2.2.3',
|
'version' => '2.3.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/',
|
||||||
@ -28,8 +28,6 @@ $aModule = [
|
|||||||
// GA4 events
|
// GA4 events
|
||||||
'ga4_add_to_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_to_cart.tpl',
|
'ga4_add_to_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_to_cart.tpl',
|
||||||
'ga4_search.tpl' => 'd3/googleanalytics4/Application/views/ga4/search.tpl',
|
'ga4_search.tpl' => 'd3/googleanalytics4/Application/views/ga4/search.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_item_list.tpl' => 'd3/googleanalytics4/Application/views/ga4/view_item_list.tpl',
|
||||||
],
|
],
|
||||||
'blocks' => [
|
'blocks' => [
|
||||||
@ -45,6 +43,19 @@ $aModule = [
|
|||||||
'block' => 'theme_svg_icons',
|
'block' => 'theme_svg_icons',
|
||||||
'file' => '/Application/views/blocks/_gtm_nojs.tpl'
|
'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
|
// checkout
|
||||||
// view_cart
|
// view_cart
|
||||||
[
|
[
|
||||||
@ -52,19 +63,11 @@ $aModule = [
|
|||||||
'block' => 'checkout_basket_main',
|
'block' => 'checkout_basket_main',
|
||||||
'file' => '/Application/views/blocks/checkout_s1.tpl'
|
'file' => '/Application/views/blocks/checkout_s1.tpl'
|
||||||
],
|
],
|
||||||
// purchase
|
|
||||||
[
|
[
|
||||||
'template' => 'page/checkout/thankyou.tpl',
|
'template' => 'page/checkout/thankyou.tpl',
|
||||||
'block' => 'checkout_thankyou_main',
|
'block' => 'checkout_thankyou_main',
|
||||||
'file' => '/Application/views/blocks/checkout_s5.tpl'
|
'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
|
// Lists
|
||||||
// view_item_list
|
// view_item_list
|
||||||
[
|
[
|
||||||
@ -79,6 +82,13 @@ $aModule = [
|
|||||||
'block' => 'search_results',
|
'block' => 'search_results',
|
||||||
'file' => '/Application/views/ga4/search.tpl',
|
'file' => '/Application/views/ga4/search.tpl',
|
||||||
'position' => 150
|
'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' => [
|
'settings' => [
|
||||||
|
Loading…
Reference in New Issue
Block a user