Merge remote-tracking branch 'remotes/origin/rel_1.x' into rel_2.x
Dieser Commit ist enthalten in:
Commit
d4df87bfff
@ -30,7 +30,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?
|
||||
<strong style="color: red">Hinweis (Fragezeichen) lesen!</strong>',
|
||||
'SHOP_MODULE_d3_gtm_settings_cookieName' => 'Cookie-Name',
|
||||
'SHOP_MODULE_d3_gtm_settings_hasOwnCookieManager' => 'Cookie Manager nutzen?',
|
||||
'SHOP_MODULE_d3_gtm_settings_cookieName' => 'CookieID',
|
||||
];
|
||||
|
@ -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/),
|
||||
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.3.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.2.2...2.3.2) - 2023-03-17
|
||||
### Added
|
||||
- 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
|
||||
### Fixed
|
||||
@ -29,6 +33,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Added
|
||||
- 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
|
||||
### Fixed
|
||||
- price formatting view_cart
|
||||
|
@ -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.
|
||||
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?
|
||||
|
@ -48,6 +48,11 @@ class ViewConfig extends ViewConfig_parent
|
||||
return true;
|
||||
}
|
||||
|
||||
// Aggrosoft Cookie Consent
|
||||
if (method_exists($this, "isCookieCategoryEnabled")) {
|
||||
return $this->isCookieCategoryEnabled($sCookieID);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -75,7 +80,7 @@ class ViewConfig extends ViewConfig_parent
|
||||
/** @var FrontendController $oShop */
|
||||
$oUser = $oConfig->getUser();
|
||||
|
||||
$cl = $this->getTopActionClassName();
|
||||
$cl = $this->getTopActiveClassName();
|
||||
$aPageTypes = [
|
||||
"content" => "cms",
|
||||
"details" => "product",
|
||||
@ -86,6 +91,7 @@ class ViewConfig extends ViewConfig_parent
|
||||
"payment" => "checkout",
|
||||
"order" => "checkout",
|
||||
"thankyou" => "checkout",
|
||||
"start" => "start",
|
||||
];
|
||||
|
||||
$dataLayer = [
|
||||
|
@ -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.
|
34
metadata.php
34
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>
|
||||
",
|
||||
'thumbnail' => 'thumbnail.png',
|
||||
'version' => '2.2.3',
|
||||
'version' => '2.3.2',
|
||||
'author' => 'Data Development (Inh.: Thomas Dartsch)',
|
||||
'email' => 'support@shopmodule.com',
|
||||
'url' => 'https://www.oxidmodule.com/',
|
||||
@ -28,8 +28,6 @@ $aModule = [
|
||||
// GA4 events
|
||||
'ga4_add_to_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_to_cart.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',
|
||||
],
|
||||
'blocks' => [
|
||||
@ -45,26 +43,31 @@ $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'
|
||||
],
|
||||
// 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
|
||||
[
|
||||
@ -79,6 +82,13 @@ $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' => [
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren