Compare commits

...

3 Commits
1.7.0 ... 1.8.0

Author SHA1 Message Date
MaxBUhe d4ef0f35f9 bump version && changelog to 1.8.0 2023-05-31 14:22:11 +02:00
MaxBUhe c17ae1cef5 fix explicit manager bug
bug would adjust the script even if the check for an own cookieManager is not set
2023-05-31 14:11:50 +02:00
MaxBUhe 32e08a88ca rm typo in readme 2023-05-31 10:29:49 +02:00
5 changed files with 20 additions and 6 deletions

View File

@ -1,4 +1,4 @@
[{if $oViewConf->D3blShowGtmScript() && !$oViewConf->getCookieManagerType()}]
[{if $oViewConf->D3blShowGtmScript()}]
[{if $oViewConf->getGtmContainerId()}][{strip}]
<!-- Google Tag Manager (noscript) -->
<noscript>

View File

@ -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.8.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.7.0...1.8.0) - 2023-05-31
### Fixed
- bug in explicit manager selection
## [1.7.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.6.0...1.7.0) - 2023-05-31
### Added
- extended call to read the technical documentation

View File

@ -12,7 +12,7 @@ Für den geregelten Ablauf sind folgende Blöcke nötig:
- Datei: page/search/search.tpl
- GA4 Event: view_search_results
- Artikelliste
- Blockname: page_list_productlist (muss hinzugefĂĽgt werden)
- Blockname: page_list_productlist
- Datei: page/list/list.tpl
- GA4 Event: view_item_list
- Detailseite

View File

@ -27,7 +27,6 @@ class ViewConfig extends ViewConfig_parent
{
if ($this->sContainerId === null)
{
$this->sContainerId = $this->getConfig()->getConfigParam('d3_gtm_sContainerID');
}
return $this->sContainerId;
@ -77,6 +76,14 @@ class ViewConfig extends ViewConfig_parent
return $this->sCookieManagerType;
}
/**
* @return bool
*/
public function shallUseOwnCookieManager()
{
return (bool) Registry::getConfig()->getConfigParam('d3_gtm_settings_hasOwnCookieManager');
}
/**
* @return bool
*/
@ -86,7 +93,7 @@ class ViewConfig extends ViewConfig_parent
$oConfig = Registry::getConfig();
// No Cookie Manager in use
if (!$oConfig->getConfigParam('d3_gtm_settings_hasOwnCookieManager')) {
if (false === $this->shallUseOwnCookieManager()) {
return true;
}
@ -113,7 +120,6 @@ class ViewConfig extends ViewConfig_parent
return true;
}
// Cookie Manager not (yet) supported
return false;
}
@ -126,6 +132,10 @@ class ViewConfig extends ViewConfig_parent
{
$oConfig = Registry::getConfig();
if (false === $this->shallUseOwnCookieManager()){
return "";
}
if ($this->getCookieManagerType() === "oxps_usercentrics" or $this->getExplicitManager() === 'USERCENTRICS') {
$sCookieId = $oConfig->getConfigParam('d3_gtm_settings_cookieName');

View File

@ -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' => '1.7.0',
'version' => '1.8.0',
'author' => 'Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'https://www.oxidmodule.com/',