Compare commits
103 Commits
Author | SHA1 | Date | |
---|---|---|---|
7c6b0215a5 | |||
84e3895db8 | |||
1e479503a7 | |||
9e7b4653ea | |||
7b1241ab97 | |||
0f15df8364 | |||
71b743ddcc | |||
c0206f741f | |||
22bec30621 | |||
49bfd5be09 | |||
6002540268 | |||
cc89303595 | |||
7062d935f4 | |||
9f1deab099 | |||
2cc0368633 | |||
b0a1c20419 | |||
54fcbf88c9 | |||
0ae67c823b | |||
ab4232fb4a | |||
0ec765955e | |||
d505d8530a | |||
fd79710158 | |||
d2ef663dd3 | |||
fec30b1109 | |||
5c53d83f32 | |||
8a7c25fad9 | |||
429069e0cf | |||
50f9fbca23 | |||
cb18feba82 | |||
47b8622018 | |||
92a91d0194 | |||
226a80f138 | |||
5dd7b51fb5 | |||
7b82476e8b | |||
bfc2ca8ad6 | |||
e48b21022c | |||
b4bf91660e | |||
3d62993dfc | |||
679a49823c | |||
106fea9c91 | |||
13132e6da0 | |||
5c478124bc | |||
12613357b3 | |||
95e0cab68c | |||
1d194d445a | |||
bf3fee5ce5 | |||
3c280a3adb | |||
6217524828 | |||
5ef600ff2a | |||
a40d922f42 | |||
dae5f66f81 | |||
347e551194 | |||
000c49c56b | |||
002cc69d2a | |||
af78809ae5 | |||
d531ba648b | |||
a0c650fca3 | |||
af341a984b | |||
122dd4cf53 | |||
27798703b0 | |||
8eb734be8a | |||
616f31ecba | |||
527eec1355 | |||
1966d3008e | |||
bd51b37159 | |||
718b60e12c | |||
d4df87bfff | |||
63007e9b02 | |||
5fe656988c | |||
9cb3a54824 | |||
2f6fd8a31c | |||
8f9ed021d6 | |||
0ef3d3373a | |||
fd2b4a5bbe | |||
1c0d55bdc3 | |||
7c1f99e678 | |||
126e746651 | |||
1c45a16356 | |||
1589f202a9 | |||
55bd7b7fb4 | |||
3c1e6a11ff | |||
9ac78a0d43 | |||
e2bcb34051 | |||
4ea0c19d7b | |||
56740f1f10 | |||
daed30a585 | |||
48d411ac3f | |||
b530366cb8 | |||
975d07056a | |||
24bf113d30 | |||
ca6a810fa3 | |||
62b382eadf | |||
45d8e45137 | |||
70f2308575 | |||
6eb15ec080 | |||
d722c46a74 | |||
d847a34e99 | |||
7b55d1d57c | |||
a25be1069c | |||
5200232a32 | |||
bcd785774b | |||
5ba613df30 | |||
a1dc0a6a58 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
.idea
|
|
@ -36,8 +36,6 @@ class ManagerTypes
|
|||||||
|
|
||||||
const COOKIEFIRST = "COOKIEFIRST";
|
const COOKIEFIRST = "COOKIEFIRST";
|
||||||
|
|
||||||
const COOKIEBOT = "COOKIEBOT";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
@ -50,8 +48,7 @@ class ManagerTypes
|
|||||||
"oxps_usercentrics" => self::USERCENTRICS_MODULE,
|
"oxps_usercentrics" => self::USERCENTRICS_MODULE,
|
||||||
"usercentrics" => self::USERCENTRICS_MANUALLY,
|
"usercentrics" => self::USERCENTRICS_MANUALLY,
|
||||||
"consentmanager" => self::CONSENTMANAGER,
|
"consentmanager" => self::CONSENTMANAGER,
|
||||||
"cookiefirst" => self::COOKIEFIRST,
|
"cookiefirst" => self::COOKIEFIRST
|
||||||
"cookiebot" => self::COOKIEBOT,
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,11 +31,11 @@ $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' => 'Cookie Manager nutzen?',
|
'SHOP_MODULE_d3_gtm_settings_hasOwnCookieManager' => 'Cookie Manager nutzen?',
|
||||||
'HELP_SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER' => 'Mehr Informationen zu den genannten Coookie-Manager finden Sie auf den folgenden Home-Pages<br><br>
|
'HELP_SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER' => 'Mehr Informationen zu den genannten Coookie-Manager finden Sie auf den folgenden Home-Pages<br>
|
||||||
<a href="https://consentmanager.net/">Consentmanager</a><br>
|
<a href="https://consentmanager.net/">Consentmanager</a><br>
|
||||||
<a href="https://usercentrics.com/">Usercentrics</a><br>
|
<a href="https://usercentrics.com/">Usercentrics</a><br>
|
||||||
<a href="https://cookiefirst.com">Cookiefirst</a><br>
|
<a href="https://cookiefirst.com">Cookiefirst</a><br>
|
||||||
<hr>
|
|
||||||
Bei weiteren Fragen stehen wir gern zur Verfügung! Kontaktieren Sie uns einfach unter <a href="https://www.d3data.de/">https://www.d3data.de/</a>',
|
Bei weiteren Fragen stehen wir gern zur Verfügung! Kontaktieren Sie uns einfach unter <a href="https://www.d3data.de/">https://www.d3data.de/</a>',
|
||||||
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER' => 'Nutzen Sie eine der folgenden Einbindungen?<br>
|
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER' => 'Nutzen Sie eine der folgenden Einbindungen?<br>
|
||||||
Dann wählen Sie bitte die zutreffende aus.',
|
Dann wählen Sie bitte die zutreffende aus.',
|
||||||
@ -43,11 +43,5 @@ $aLang = [
|
|||||||
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_CONSENTMANAGER' => 'consentmanager',
|
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_CONSENTMANAGER' => 'consentmanager',
|
||||||
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_USERCENTRICS' => 'usercentrics',
|
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_USERCENTRICS' => 'usercentrics',
|
||||||
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_COOKIEFIRST' => 'cookiefirst',
|
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_COOKIEFIRST' => 'cookiefirst',
|
||||||
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_COOKIEBOT' => 'Cookiebot',
|
'SHOP_MODULE_d3_gtm_settings_cookieName' => 'CookieID',
|
||||||
'SHOP_MODULE_d3_gtm_settings_controlParameter' => 'Steuerungsparameter',
|
|
||||||
'HELP_SHOP_MODULE_d3_gtm_settings_controlParameter' => 'Nähere infos zum <a target="_blank" href="https://git.d3data.de/D3Public/GoogleAnalytics4/src/branch/master/Docs">"<strong>Steuerungsparameter</strong>"</a><hr>
|
|
||||||
<strong>Beachte:</strong><br>
|
|
||||||
Sofern Sie die <a target="_blank" href="https://consentmanager.net" style="color: blue">consentmanager</a> CMP verwenden,
|
|
||||||
bitte ich Sie, gründlichst, die Hinweise der <a target="_blank" href="https://git.d3data.de/D3Public/GoogleAnalytics4/src/branch/master/Docs/CMP/consentmanager.md">Moduldokumentation/Consentmanager</a> zu lesen.
|
|
||||||
'
|
|
||||||
];
|
];
|
||||||
|
126
CHANGELOG.md
126
CHANGELOG.md
@ -4,31 +4,115 @@ 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).
|
||||||
|
|
||||||
## [1.13.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.12.0...1.13.0) - 2023-09-13
|
## [2.11.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.10.1...2.11.0) - 2023-08-23
|
||||||
### Added
|
### Added
|
||||||
- extended Docs
|
- manufacturer extension
|
||||||
### Changed
|
- working debug_mode
|
||||||
- control-param name
|
|
||||||
- control-param function
|
|
||||||
- adjusted check for set control-param
|
|
||||||
- consentmanager-script-adjustments
|
|
||||||
|
|
||||||
## [1.12.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.11.1...1.12.0) - 2023-09-07
|
|
||||||
### Added
|
|
||||||
- cookiebot functionality
|
|
||||||
|
|
||||||
## [1.11.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.11.0...1.11.1) - 2023-08-17
|
|
||||||
### Fixed
|
|
||||||
- metadata class entry
|
|
||||||
|
|
||||||
## [1.11.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.10.0...1.11.0) - 2023-08-16
|
|
||||||
### Added
|
|
||||||
- remove_from_cart
|
|
||||||
- auto debug_mode setter
|
|
||||||
- manufacturer extension for breadcrumb
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- check for 'article has been removed'
|
||||||
- general template cleanup
|
- general template cleanup
|
||||||
|
|
||||||
|
## [2.10.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.10.0...2.10.1) - 2023-08-03
|
||||||
|
### Added
|
||||||
|
- missing param to identify the event
|
||||||
|
|
||||||
|
## [2.10.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.9.2...2.10.0) - 2023-08-02
|
||||||
|
### Added
|
||||||
|
- new Event "remove_from_cart"
|
||||||
|
|
||||||
|
## [2.9.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.9.1...2.9.2) - 2023-06-29
|
||||||
|
### Fixed
|
||||||
|
- wrong variable for category-object check
|
||||||
|
|
||||||
|
## [2.9.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.9.0...2.9.1) - 2023-06-27
|
||||||
|
### Fixed
|
||||||
|
- deny method call on no category
|
||||||
|
|
||||||
|
## [2.9.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.8.0...2.9.0) - 2023-06-27
|
||||||
|
### Added
|
||||||
|
- Cookiefirst usability
|
||||||
|
|
||||||
|
## [2.8.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.7.0...2.8.0) - 2023-06-23
|
||||||
|
### Added
|
||||||
|
- Method to get the in order used Payment-Name
|
||||||
|
- Method to get the current Article Category
|
||||||
|
- Following Entries to dedicated event-templates
|
||||||
|
- coupon
|
||||||
|
- paymentType
|
||||||
|
- item_list_name
|
||||||
|
- item_category
|
||||||
|
### Changed
|
||||||
|
- all used template-files have a more dedicated name
|
||||||
|
- general code cleanup
|
||||||
|
|
||||||
|
## [2.7.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.6.0...2.7.0) - 2023-06-19
|
||||||
|
### Changed
|
||||||
|
- add_to_cart event template-structure
|
||||||
|
|
||||||
|
## [2.6.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.5.0...2.6.0) - 2023-05-31
|
||||||
|
### Added
|
||||||
|
- add settings to explicit choose an external service (usercentrics/ consentmanager)
|
||||||
|
- position to block-extension
|
||||||
|
- extended instructions to check for in readme
|
||||||
|
### Fixed
|
||||||
|
- usercentrics script
|
||||||
|
- missing right articleList-getter
|
||||||
|
### Changed
|
||||||
|
- view_item_list-template block extension
|
||||||
|
- cookieManager handling
|
||||||
|
### Removed
|
||||||
|
- additional check for cookieManagerType
|
||||||
|
|
||||||
|
## [2.5.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.4.0...2.5.0) - 2023-05-23
|
||||||
|
### Added
|
||||||
|
- additional settings to explicitly indicate that consentmanager is used
|
||||||
|
### Fixed
|
||||||
|
- unnecessary converting of int to str
|
||||||
|
- missing PriceObject-bug
|
||||||
|
### Changed
|
||||||
|
- genuine code cleanup
|
||||||
|
|
||||||
|
## [2.4.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.3.3...2.4.0) - 2023-05-02
|
||||||
|
### Added
|
||||||
|
- "OXID Cookie Management powered by usercentrics" compatibility
|
||||||
|
- usercentrics defined script attributes
|
||||||
|
- cookie-manager evaluation
|
||||||
|
### Changed
|
||||||
|
- genuine clean up of base-js-files
|
||||||
|
|
||||||
|
## [2.3.3](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.3.2...2.3.3) - 2023-03-20
|
||||||
|
### Fixed
|
||||||
|
- metadata file path for view_item
|
||||||
|
|
||||||
|
## [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
|
||||||
|
- price formatting in view_cart
|
||||||
|
|
||||||
|
## [2.2.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.1.1...2.2.1) - 2023-02-21
|
||||||
|
### Added
|
||||||
|
- cookie handling
|
||||||
|
|
||||||
|
## [2.1.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.1...2.1.1) - 2023-01-27
|
||||||
|
### Fixed
|
||||||
|
- add missing class import
|
||||||
|
|
||||||
|
## [2.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.0...2.1) - 2023-01-27
|
||||||
|
### Added
|
||||||
|
- block section for add_to_basket js
|
||||||
|
- template block order positions
|
||||||
|
|
||||||
|
## [2.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.1...2.0) - 2023-01-20
|
||||||
|
### Added
|
||||||
|
- using of ContainerFactory in ViewConfig
|
||||||
|
|
||||||
## [1.10.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.9.0...1.10.0) - 2023-06-27
|
## [1.10.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.9.0...1.10.0) - 2023-06-27
|
||||||
### Added
|
### Added
|
||||||
- Following Entries to dedicated event-templates
|
- Following Entries to dedicated event-templates
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
# Consentmanager
|
|
||||||
## 1. Steuerungsparameter
|
|
||||||
Tragen Sie hier die gewünschte ID des zu prüfenden Anbieters (Vendor-ID) ein.<br>
|
|
||||||
Diese ID finden Sie in Ihrem Consentmanager-Dashboard, links, unter "CMP > Anbieter".
|
|
||||||
|
|
||||||
Nähere Informationen hierzu suchen Sie bitte auf der offiziellen Webseite von [app.consentmanager](https://help.consentmanager.de/books/cmp/page/4-configuring-vendors-and-cookies).
|
|
||||||
|
|
||||||
## 2. Gebräuchliche ID's
|
|
||||||
- s26 (Google Analytics/ GA/ GA4)
|
|
||||||
- s905 (Google Tag Manager/ GTM)
|
|
||||||
|
|
||||||
## 3. Einrichtung GTM
|
|
||||||
Die von Ihnen eingetragene ID muss oder ist schlussendlich die ID, auf die im GTM-Umfeld geprüft wird.
|
|
||||||
Das heißt, dass sich die Eintragung nach GTM, oder umgekehrt, richtet.
|
|
||||||
|
|
||||||
### Unterstützung benötigt?
|
|
||||||
Kein Problem!
|
|
||||||
Kontaktieren Sie uns gern unter [d3data.de](https://www.d3data.de)
|
|
@ -5,13 +5,6 @@ Die Einbindung dieser Event-Templates erfolgt über TPL-Blöcke unter `source/mo
|
|||||||
*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/
|
||||||
|
|
||||||
## Steuerungsparameter
|
|
||||||
Tragen Sie hier im Normalfall die ID des zu prüfenden Cookies ein.
|
|
||||||
In bestimmten Fällen, müssen Sie hier alternative Werte eintragen. Diese Fälle sind bedingt
|
|
||||||
nach der gewählten CMP (Consent Manager Platform).
|
|
||||||
|
|
||||||
> nähere Infos unter [CMP](#consent-manager-platform-cmp)
|
|
||||||
|
|
||||||
## 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
|
||||||
@ -19,7 +12,7 @@ Für den geregelten Ablauf sind folgende Blöcke nötig:
|
|||||||
- Datei: page/search/search.tpl
|
- Datei: page/search/search.tpl
|
||||||
- GA4 Event: view_search_results
|
- GA4 Event: view_search_results
|
||||||
- Artikelliste
|
- Artikelliste
|
||||||
- Blockname: page_list_productlist
|
- Blockname: page_list_productlist (muss hinzugefügt werden)
|
||||||
- Datei: page/list/list.tpl
|
- Datei: page/list/list.tpl
|
||||||
- GA4 Event: view_item_list
|
- GA4 Event: view_item_list
|
||||||
- Detailseite
|
- Detailseite
|
||||||
@ -30,10 +23,6 @@ Für den geregelten Ablauf sind folgende Blöcke nötig:
|
|||||||
- Blockname: details_productmain_tobasket
|
- Blockname: details_productmain_tobasket
|
||||||
- Datei: page/details/inc/productmain.tpl
|
- Datei: page/details/inc/productmain.tpl
|
||||||
- GA4 Event: add_to_cart
|
- GA4 Event: add_to_cart
|
||||||
- aus dem WK entfernen
|
|
||||||
- Blockname: checkout_basket_main
|
|
||||||
- Datei: page/checkout/basket.tpl
|
|
||||||
- GA4 Event: remove_from_cart
|
|
||||||
- Warenkorb
|
- Warenkorb
|
||||||
- Blockname: checkout_basket_main
|
- Blockname: checkout_basket_main
|
||||||
- Datei: page/checkout/basket.tpl
|
- Datei: page/checkout/basket.tpl
|
||||||
@ -61,9 +50,6 @@ Dann tragen Sie in den Folgeeinstellungen unter "Cookie Manager Einstellungen",
|
|||||||
die Cookie-ID des zugehörigen Cookies ein.
|
die Cookie-ID des zugehörigen Cookies ein.
|
||||||
Aktivieren Sie anschließend diese Weiche. Setzen Sie den Haken bei "Eigenen Cookie Manager nutzen?".
|
Aktivieren Sie anschließend diese Weiche. Setzen Sie den Haken bei "Eigenen Cookie Manager nutzen?".
|
||||||
|
|
||||||
## Consent Manager Platform (CMP)
|
|
||||||
- [Consentmanager](https://git.d3data.de/D3Public/GoogleAnalytics4/src/branch/master/Docs/CMP/consentmanager.md)
|
|
||||||
|
|
||||||
### Unterstützung für
|
### Unterstützung für
|
||||||
- [aggrosoft - oxid-cookie-compliance](https://github.com/aggrosoft/oxid-cookie-compliance)
|
- [aggrosoft - oxid-cookie-compliance](https://github.com/aggrosoft/oxid-cookie-compliance)
|
||||||
- https://github.com/aggrosoft/oxid-cookie-compliance
|
- https://github.com/aggrosoft/oxid-cookie-compliance
|
||||||
@ -88,6 +74,3 @@ Aktivieren Sie anschließend diese Weiche. Setzen Sie den Haken bei "Eigenen Coo
|
|||||||
- prüfen, ob ein Cookie vorgegeben ist
|
- prüfen, ob ein Cookie vorgegeben ist
|
||||||
- sonst, in der Consentmanager-Oberfläche Cookie-Liste entsprechendes Cookie suchen und im Admin unter
|
- sonst, in der Consentmanager-Oberfläche Cookie-Liste entsprechendes Cookie suchen und im Admin unter
|
||||||
```Einstell. > Cookie Manager Einstellungen > Cookie-ID``` eintragen
|
```Einstell. > Cookie Manager Einstellungen > Cookie-ID``` eintragen
|
||||||
|
|
||||||
- [Cookiebot](https://www.cookiebot.com)
|
|
||||||
- Nähere Informationen folgen bald! Bis dato, besuchen Sie bitte die offizielle Webseite.
|
|
@ -24,5 +24,4 @@ namespace D3\GoogleAnalytics4\Modules\Application\Model{
|
|||||||
|
|
||||||
namespace D3\GoogleAnalytics4\Modules\Application\Controller{
|
namespace D3\GoogleAnalytics4\Modules\Application\Controller{
|
||||||
class BasketController_parent extends \OxidEsales\Eshop\Application\Controller\BasketController {}
|
class BasketController_parent extends \OxidEsales\Eshop\Application\Controller\BasketController {}
|
||||||
class ThankYouController_parent extends \OxidEsales\Eshop\Application\Controller\ThankYouController {}
|
|
||||||
}
|
}
|
@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace D3\GoogleAnalytics4\Modules\Application\Controller;
|
|
||||||
|
|
||||||
use OxidEsales\Eshop\Application\Model\Country;
|
|
||||||
|
|
||||||
class ThankYouController extends ThankYouController_parent
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @return Country
|
|
||||||
*/
|
|
||||||
public function d3GAGetUserCountry()
|
|
||||||
{
|
|
||||||
$sCountryId = $this->getOrder()->getFieldData('oxbillcountryid');
|
|
||||||
|
|
||||||
/** @var Country $oCountry */
|
|
||||||
$oCountry = oxNew(Country::class);
|
|
||||||
$oCountry->load($sCountryId);
|
|
||||||
|
|
||||||
return $oCountry;
|
|
||||||
}
|
|
||||||
}
|
|
@ -17,6 +17,9 @@ use D3\GoogleAnalytics4\Application\Model\ManagerTypes;
|
|||||||
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
||||||
use OxidEsales\Eshop\Core\Config;
|
use OxidEsales\Eshop\Core\Config;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
|
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
|
||||||
|
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ModuleSettingBridgeInterface;
|
||||||
|
|
||||||
class ViewConfig extends ViewConfig_parent
|
class ViewConfig extends ViewConfig_parent
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -28,7 +31,10 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
{
|
{
|
||||||
if ($this->sContainerId === null)
|
if ($this->sContainerId === null)
|
||||||
{
|
{
|
||||||
$this->sContainerId = Registry::getConfig()->getConfigParam('d3_gtm_sContainerID');
|
$this->sContainerId = ContainerFactory::getInstance()
|
||||||
|
->getContainer()
|
||||||
|
->get(ModuleSettingBridgeInterface::class)
|
||||||
|
->get('d3_gtm_sContainerID', 'd3googleanalytics4');
|
||||||
}
|
}
|
||||||
return $this->sContainerId;
|
return $this->sContainerId;
|
||||||
}
|
}
|
||||||
@ -69,7 +75,7 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
|
|
||||||
$this->defineCookieManagerType();
|
$this->defineCookieManagerType();
|
||||||
|
|
||||||
$sCookieID = trim($oConfig->getConfigParam('d3_gtm_settings_controlParameter'));
|
$sCookieID = trim($oConfig->getConfigParam('d3_gtm_settings_cookieName'));
|
||||||
|
|
||||||
// Netensio Cookie Manager
|
// Netensio Cookie Manager
|
||||||
if ($this->sCookieManagerType === ManagerTypes::NET_COOKIE_MANAGER) {
|
if ($this->sCookieManagerType === ManagerTypes::NET_COOKIE_MANAGER) {
|
||||||
@ -92,7 +98,6 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
or $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MANUALLY
|
or $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MANUALLY
|
||||||
or $this->sCookieManagerType === ManagerTypes::CONSENTMANAGER
|
or $this->sCookieManagerType === ManagerTypes::CONSENTMANAGER
|
||||||
or $this->sCookieManagerType === ManagerTypes::COOKIEFIRST
|
or $this->sCookieManagerType === ManagerTypes::COOKIEFIRST
|
||||||
or $this->sCookieManagerType === ManagerTypes::COOKIEBOT
|
|
||||||
or $this->sCookieManagerType === ManagerTypes::EXTERNAL_SERVICE
|
or $this->sCookieManagerType === ManagerTypes::EXTERNAL_SERVICE
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -111,9 +116,9 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
*/
|
*/
|
||||||
public function getGtmScriptAttributes() :string
|
public function getGtmScriptAttributes() :string
|
||||||
{
|
{
|
||||||
$sControlParameter = trim(Registry::getConfig()->getConfigParam('d3_gtm_settings_controlParameter'));
|
$sCookieId = trim(Registry::getConfig()->getConfigParam('d3_gtm_settings_cookieName'));
|
||||||
|
|
||||||
if (false === $this->shallUseOwnCookieManager() or ($sControlParameter === '')){
|
if (false === $this->shallUseOwnCookieManager()){
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,20 +127,25 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
or $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MANUALLY
|
or $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MANUALLY
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return 'data-usercentrics="' . $sControlParameter . '" type="text/plain" async=""';
|
if ($sCookieId) {
|
||||||
|
return 'data-usercentrics="' . $sCookieId . '" type="text/plain" async=""';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->sCookieManagerType === ManagerTypes::CONSENTMANAGER)
|
if ($this->sCookieManagerType === ManagerTypes::CONSENTMANAGER)
|
||||||
{
|
{
|
||||||
return 'type="text/plain" class="cmplazyload" data-cmp-vendor="'.$sControlParameter.'"';
|
if ($sCookieId) {
|
||||||
|
return 'async
|
||||||
|
type="text/plain"
|
||||||
|
data-cmp-src="https://www.googletagmanager.com/gtm.js?id='.$this->getGtmContainerId().'"
|
||||||
|
class="cmplazyload"
|
||||||
|
data-cmp-vendor="s905"
|
||||||
|
';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->sCookieManagerType === ManagerTypes::COOKIEFIRST){
|
if ($this->sCookieManagerType === ManagerTypes::COOKIEFIRST){
|
||||||
return 'type="text/plain" data-cookiefirst-category="' . $sControlParameter .'"';
|
return 'type="text/plain" data-cookiefirst-category="' . $sCookieId .'"';
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->sCookieManagerType === ManagerTypes::COOKIEBOT){
|
|
||||||
return 'type="text/plain" data-cookieconsent="' . $sControlParameter .'"';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
@ -143,12 +153,14 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
|
|
||||||
private $blGA4enabled = null;
|
private $blGA4enabled = null;
|
||||||
|
|
||||||
|
|
||||||
public function isGA4enabled()
|
public function isGA4enabled()
|
||||||
{
|
{
|
||||||
if ($this->blGA4enabled === null)
|
if ($this->blGA4enabled === null)
|
||||||
{
|
{
|
||||||
$this->sContainerId = Registry::getConfig()->getConfigParam('d3_gtm_blEnableGA4');
|
$this->sContainerId = ContainerFactory::getInstance()
|
||||||
|
->getContainer()
|
||||||
|
->get(ModuleSettingBridgeInterface::class)
|
||||||
|
->get('d3_gtm_blEnableGA4', 'd3googleanalytics4');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->blGA4enabled;
|
return $this->blGA4enabled;
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1",
|
"php": ">=7.1",
|
||||||
"oxid-esales/oxideshop-ce": "v6.0 - 6.3",
|
"oxid-esales/oxideshop-ce": "^6.5",
|
||||||
"google/apiclient":" ^2.0"
|
"google/apiclient":" ^2.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
15
metadata.php
15
metadata.php
@ -1,13 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use D3\GoogleAnalytics4\Modules\Application\Controller\BasketController;
|
use D3\GoogleAnalytics4\Modules\Application\Controller\BasketController;
|
||||||
use D3\GoogleAnalytics4\Modules\Application\Controller\ThankYouController;
|
|
||||||
use D3\GoogleAnalytics4\Modules\Application\Model\Basket as Basket;
|
use D3\GoogleAnalytics4\Modules\Application\Model\Basket as Basket;
|
||||||
use D3\GoogleAnalytics4\Modules\Application\Model\Category as Category;
|
use D3\GoogleAnalytics4\Modules\Application\Model\Category as Category;
|
||||||
use D3\GoogleAnalytics4\Modules\Application\Model\Manufacturer as Manufacturer;
|
use D3\GoogleAnalytics4\Modules\Application\Model\Manufacturer as Manufacturer;
|
||||||
use D3\GoogleAnalytics4\Modules\Core\ViewConfig;
|
use D3\GoogleAnalytics4\Modules\Core\ViewConfig;
|
||||||
use OxidEsales\Eshop\Application\Controller\BasketController as OEBasketController;
|
use OxidEsales\Eshop\Application\Controller\BasketController as OEBasketController;
|
||||||
use OxidEsales\Eshop\Application\Controller\ThankYouController as OEThankYouController;
|
|
||||||
use OxidEsales\Eshop\Application\Model\Basket as OEBasket;
|
use OxidEsales\Eshop\Application\Model\Basket as OEBasket;
|
||||||
use OxidEsales\Eshop\Application\Model\Category as OECategory;
|
use OxidEsales\Eshop\Application\Model\Category as OECategory;
|
||||||
use OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer;
|
use OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer;
|
||||||
@ -28,17 +26,16 @@ $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' => '1.13.0',
|
'version' => '2.11.0',
|
||||||
'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/',
|
||||||
'extend' => [
|
'extend' => [
|
||||||
OEViewConfig::class => ViewConfig::class,
|
OEViewConfig::class => ViewConfig::class,
|
||||||
OECategory::class => Category::class,
|
OECategory::class => Category::class,
|
||||||
OEBasket::class => Basket::class,
|
|
||||||
OEBasketController::class => BasketController::class,
|
|
||||||
OEManufacturer::class => Manufacturer::class,
|
OEManufacturer::class => Manufacturer::class,
|
||||||
OEThankYouController::class => ThankYouController::class
|
OEBasket::class => Basket::class,
|
||||||
|
OEBasketController::class => BasketController::class
|
||||||
],
|
],
|
||||||
'templates' => [],
|
'templates' => [],
|
||||||
'blocks' => [
|
'blocks' => [
|
||||||
@ -134,9 +131,9 @@ $aModule = [
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
'group' => 'd3_gtm_settings_cookiemanager',
|
'group' => 'd3_gtm_settings_cookiemanager',
|
||||||
'name' => 'd3_gtm_settings_controlParameter',
|
'name' => 'd3_gtm_settings_cookieName',
|
||||||
'type' => 'str',
|
'type' => 'str',
|
||||||
'value' => '',
|
'value' => 'example',
|
||||||
'position' => 999
|
'position' => 999
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -144,7 +141,7 @@ $aModule = [
|
|||||||
'name' => 'd3_gtm_settings_HAS_STD_MANAGER',
|
'name' => 'd3_gtm_settings_HAS_STD_MANAGER',
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'value' => 'none',
|
'value' => 'none',
|
||||||
'constraints' => 'NONE|CONSENTMANAGER|USERCENTRICS|COOKIEFIRST|COOKIEBOT',
|
'constraints' => 'NONE|CONSENTMANAGER|USERCENTRICS|COOKIEFIRST',
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
];
|
];
|
Reference in New Issue
Block a user