Compare commits
45 Commits
Author | SHA1 | Date | |
---|---|---|---|
5c98d99d80 | |||
da2966626e | |||
6fcee0671f | |||
f64eb35763 | |||
b2d8d597fd | |||
36ac641233 | |||
99af4cdfa9 | |||
eb2c7f73b9 | |||
575e35ffbc | |||
2e6acbe675 | |||
aae6c43786 | |||
17840d33b1 | |||
a49c29d7aa | |||
e90aba2c55 | |||
ea6b63fd2f | |||
6b18c50b42 | |||
443b456a0d | |||
216c53fa90 | |||
5355b0a7ad | |||
432ba54c84 | |||
8b344ffb85 | |||
0009926313 | |||
50be757355 | |||
60f61f4bab | |||
a93b1cf582 | |||
3f59d1f210 | |||
5ed924e840 | |||
d4ef0f35f9 | |||
c17ae1cef5 | |||
32e08a88ca | |||
9d9daf9a85 | |||
6eefc062ba | |||
3f89e26bde | |||
e624cfdfcb | |||
e2cdda530b | |||
3e65d05c0b | |||
561a2101f1 | |||
6fca52cc06 | |||
dfdc5d5edf | |||
ae6f9bfaa9 | |||
1d9e09b8b1 | |||
f9a0834d26 | |||
bb70cda626 | |||
c9a1174c98 | |||
f3b2911679 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.idea
|
@ -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>
|
'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>
|
||||||
<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.',
|
||||||
@ -44,5 +44,10 @@ $aLang = [
|
|||||||
'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_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.
|
||||||
|
'
|
||||||
];
|
];
|
||||||
|
124
CHANGELOG.md
124
CHANGELOG.md
@ -4,119 +4,31 @@ 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.12.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.11.1...2.12.0) - 2023-09-07
|
## [1.13.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.12.0...1.13.0) - 2023-09-13
|
||||||
|
### Added
|
||||||
|
- extended Docs
|
||||||
|
### Changed
|
||||||
|
- 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
|
### Added
|
||||||
- cookiebot functionality
|
- cookiebot functionality
|
||||||
|
|
||||||
## [2.11.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.10.1...2.11.0) - 2023-08-23
|
## [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
|
### Added
|
||||||
- manufacturer extension
|
- remove_from_cart
|
||||||
- working debug_mode
|
- 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
|
||||||
|
18
Docs/CMP/consentmanager.md
Normal file
18
Docs/CMP/consentmanager.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# 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,6 +5,13 @@ 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
|
||||||
@ -12,7 +19,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 (muss hinzugefĂĽgt werden)
|
- Blockname: page_list_productlist
|
||||||
- Datei: page/list/list.tpl
|
- Datei: page/list/list.tpl
|
||||||
- GA4 Event: view_item_list
|
- GA4 Event: view_item_list
|
||||||
- Detailseite
|
- Detailseite
|
||||||
@ -23,6 +30,10 @@ 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
|
||||||
@ -50,6 +61,9 @@ 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
|
||||||
|
@ -24,4 +24,5 @@ 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 {}
|
||||||
}
|
}
|
22
Modules/Application/Controller/ThankYouController.php
Normal file
22
Modules/Application/Controller/ThankYouController.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?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,9 +17,6 @@ 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
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -31,10 +28,7 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
{
|
{
|
||||||
if ($this->sContainerId === null)
|
if ($this->sContainerId === null)
|
||||||
{
|
{
|
||||||
$this->sContainerId = ContainerFactory::getInstance()
|
$this->sContainerId = Registry::getConfig()->getConfigParam('d3_gtm_sContainerID');
|
||||||
->getContainer()
|
|
||||||
->get(ModuleSettingBridgeInterface::class)
|
|
||||||
->get('d3_gtm_sContainerID', 'd3googleanalytics4');
|
|
||||||
}
|
}
|
||||||
return $this->sContainerId;
|
return $this->sContainerId;
|
||||||
}
|
}
|
||||||
@ -75,7 +69,7 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
|
|
||||||
$this->defineCookieManagerType();
|
$this->defineCookieManagerType();
|
||||||
|
|
||||||
$sCookieID = trim($oConfig->getConfigParam('d3_gtm_settings_cookieName'));
|
$sCookieID = trim($oConfig->getConfigParam('d3_gtm_settings_controlParameter'));
|
||||||
|
|
||||||
// Netensio Cookie Manager
|
// Netensio Cookie Manager
|
||||||
if ($this->sCookieManagerType === ManagerTypes::NET_COOKIE_MANAGER) {
|
if ($this->sCookieManagerType === ManagerTypes::NET_COOKIE_MANAGER) {
|
||||||
@ -117,9 +111,9 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
*/
|
*/
|
||||||
public function getGtmScriptAttributes() :string
|
public function getGtmScriptAttributes() :string
|
||||||
{
|
{
|
||||||
$sCookieId = trim(Registry::getConfig()->getConfigParam('d3_gtm_settings_cookieName'));
|
$sControlParameter = trim(Registry::getConfig()->getConfigParam('d3_gtm_settings_controlParameter'));
|
||||||
|
|
||||||
if (false === $this->shallUseOwnCookieManager()){
|
if (false === $this->shallUseOwnCookieManager() or ($sControlParameter === '')){
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,29 +122,20 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
or $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MANUALLY
|
or $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MANUALLY
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ($sCookieId) {
|
return 'data-usercentrics="' . $sControlParameter . '" type="text/plain" async=""';
|
||||||
return 'data-usercentrics="' . $sCookieId . '" type="text/plain" async=""';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->sCookieManagerType === ManagerTypes::CONSENTMANAGER)
|
if ($this->sCookieManagerType === ManagerTypes::CONSENTMANAGER)
|
||||||
{
|
{
|
||||||
if ($sCookieId) {
|
return 'type="text/plain" class="cmplazyload" data-cmp-vendor="'.$sControlParameter.'"';
|
||||||
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="' . $sCookieId .'"';
|
return 'type="text/plain" data-cookiefirst-category="' . $sControlParameter .'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->sCookieManagerType === ManagerTypes::COOKIEBOT){
|
if ($this->sCookieManagerType === ManagerTypes::COOKIEBOT){
|
||||||
return 'type="text/plain" data-cookieconsent="' . $sCookieId .'"';
|
return 'type="text/plain" data-cookieconsent="' . $sControlParameter .'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
@ -158,14 +143,12 @@ 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 = ContainerFactory::getInstance()
|
$this->sContainerId = Registry::getConfig()->getConfigParam('d3_gtm_blEnableGA4');
|
||||||
->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": "^6.5",
|
"oxid-esales/oxideshop-ce": "v6.0 - 6.3",
|
||||||
"google/apiclient":" ^2.0"
|
"google/apiclient":" ^2.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
13
metadata.php
13
metadata.php
@ -1,11 +1,13 @@
|
|||||||
<?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;
|
||||||
@ -26,16 +28,17 @@ $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.12.0',
|
'version' => '1.13.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,
|
||||||
OEManufacturer::class => Manufacturer::class,
|
|
||||||
OEBasket::class => Basket::class,
|
OEBasket::class => Basket::class,
|
||||||
OEBasketController::class => BasketController::class
|
OEBasketController::class => BasketController::class,
|
||||||
|
OEManufacturer::class => Manufacturer::class,
|
||||||
|
OEThankYouController::class => ThankYouController::class
|
||||||
],
|
],
|
||||||
'templates' => [],
|
'templates' => [],
|
||||||
'blocks' => [
|
'blocks' => [
|
||||||
@ -131,9 +134,9 @@ $aModule = [
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
'group' => 'd3_gtm_settings_cookiemanager',
|
'group' => 'd3_gtm_settings_cookiemanager',
|
||||||
'name' => 'd3_gtm_settings_cookieName',
|
'name' => 'd3_gtm_settings_controlParameter',
|
||||||
'type' => 'str',
|
'type' => 'str',
|
||||||
'value' => 'example',
|
'value' => '',
|
||||||
'position' => 999
|
'position' => 999
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
Reference in New Issue
Block a user