Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
db680b893f | |||
4458fc55ee | |||
6053219687 | |||
dbaf871c9e | |||
2a8c939afd | |||
02db7be9d8 | |||
aa616db0f2 | |||
60a3c797fb | |||
55306e0495 | |||
d856a994ab | |||
550c9dbdf9 | |||
44e54b7329 | |||
5f72d0837e | |||
201bcb6e37 | |||
97c3927998 | |||
cbe3293ff1 | |||
c7d3671265 | |||
3621ca606a |
@ -3,8 +3,10 @@
|
|||||||
var dataLayer = [{$oViewConf->getGtmDataLayer()}] || [];
|
var dataLayer = [{$oViewConf->getGtmDataLayer()}] || [];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
[{assign var="d3GtmContainerIdString" value=$oViewConf->getGtmContainerId()}]
|
||||||
|
|
||||||
[{if $oViewConf->D3blShowGtmScript()}]
|
[{if $oViewConf->D3blShowGtmScript()}]
|
||||||
[{if $oViewConf->getGtmContainerId()}]
|
[{if $d3GtmContainerIdString}]
|
||||||
[{strip}]
|
[{strip}]
|
||||||
|
|
||||||
[{if $oViewConf->isGtmConsentModeSetActivated()}]
|
[{if $oViewConf->isGtmConsentModeSetActivated()}]
|
||||||
@ -32,7 +34,7 @@
|
|||||||
j.async = true;
|
j.async = true;
|
||||||
j.src = '[{$oViewConf->getServerSidetaggingJsDomain()}]?id=' + i + dl;
|
j.src = '[{$oViewConf->getServerSidetaggingJsDomain()}]?id=' + i + dl;
|
||||||
f.parentNode.insertBefore(j, f);
|
f.parentNode.insertBefore(j, f);
|
||||||
})(window, document, 'script', 'dataLayer', '[{$oViewConf->getGtmContainerId()}]');
|
})(window, document, 'script', 'dataLayer', '[{$d3GtmContainerIdString}]');
|
||||||
</script>
|
</script>
|
||||||
<!-- End Google Tag Manager -->
|
<!-- End Google Tag Manager -->
|
||||||
[{/strip}]
|
[{/strip}]
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
[{$smarty.block.parent}]
|
[{$smarty.block.parent}]
|
||||||
|
|
||||||
[{include file="event/purchase.tpl"}]
|
[{include file="event/purchase.tpl"}]
|
@ -1,3 +1,3 @@
|
|||||||
[{$smarty.block.parent}]
|
[{$smarty.block.parent}]
|
||||||
|
|
||||||
[{include file="event/view_cart.tpl"}]
|
[{include file="event/view_cart.tpl"}]
|
@ -1,3 +1,3 @@
|
|||||||
[{$smarty.block.parent}]
|
[{$smarty.block.parent}]
|
||||||
|
|
||||||
[{include file="event/view_item.tpl"}]
|
[{include file="event/view_item.tpl"}]
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
[{if $d3CmpBasket->getAddToBasketDecision() && $d3CmpBasket->d3GtmRequestedArticleLoadedByAnid() !== null}]
|
[{if $d3CmpBasket && $d3CmpBasket->getAddToBasketDecision() && $d3CmpBasket->d3GtmRequestedArticleLoadedByAnid() !== null}]
|
||||||
[{assign var="oGtmProduct" value=$d3CmpBasket->d3GtmRequestedArticleLoadedByAnid()}]
|
[{assign var="oGtmProduct" value=$d3CmpBasket->d3GtmRequestedArticleLoadedByAnid()}]
|
||||||
[{assign var="oGtmAmountArticlesAdded" value=$d3CmpBasket->getD3GtmAddToCartAmountArticles()}]
|
[{assign var="oGtmAmountArticlesAdded" value=$d3CmpBasket->getD3GtmAddToCartAmountArticles()}]
|
||||||
[{*$smarty.block.parent*}]
|
[{*$smarty.block.parent*}]
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
[{$smarty.block.parent}]
|
|
||||||
|
|
||||||
[{block name="d3_ga4_remove_from_cart_block"}]
|
|
||||||
[{if $hasBeenReloaded}]
|
|
||||||
[{assign var="d3BasketPrice" value=$oxcmp_basket->getPrice()}]
|
|
||||||
[{capture assign=d3_ga4_remove_from_cart}]
|
|
||||||
[{strip}]
|
|
||||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
|
||||||
dataLayer.push({
|
|
||||||
'isRemoveFromCart': true,
|
|
||||||
'event': 'remove_from_cart',
|
|
||||||
'eventLabel':'remove_from_cart',
|
|
||||||
'ecommerce': {
|
|
||||||
'actionField': "step: 1",
|
|
||||||
'currency': "[{$currency->name}]",
|
|
||||||
'value': [{$d3BasketPrice->getPrice()}],
|
|
||||||
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
|
|
||||||
'items': [
|
|
||||||
[{foreach from=$toRemoveArticles->getArray() name=gtmRemovedItems item=rmItem key=rmItemindex}]
|
|
||||||
[{assign var="d3oItemPrice" value=$rmItem->getPrice()}]
|
|
||||||
[{assign var="gtmBasketItemCategory" value=$rmItem->getCategory()}]
|
|
||||||
{
|
|
||||||
'item_id': '[{$rmItem->getFieldData('oxartnum')}]',
|
|
||||||
'item_name': '[{$rmItem->getFieldData('oxtitle')}]',
|
|
||||||
'item_variant': '[{$rmItem->getFieldData('oxvarselect')}]',
|
|
||||||
[{if $gtmBasketItemCategory}]
|
|
||||||
'item_category': '[{$gtmBasketItemCategory->getSplitCategoryArray(0)}]',
|
|
||||||
'item_category_2': '[{$gtmBasketItemCategory->getSplitCategoryArray(1)}]',
|
|
||||||
'item_category_3': '[{$gtmBasketItemCategory->getSplitCategoryArray(2)}]',
|
|
||||||
'item_category_4': '[{$gtmBasketItemCategory->getSplitCategoryArray(3)}]',
|
|
||||||
'item_list_name': '[{$gtmBasketItemCategory->getSplitCategoryArray()}]',
|
|
||||||
[{/if}]
|
|
||||||
'price': [{$d3oItemPrice->getPrice()}],
|
|
||||||
'coupon': '[{foreach from=$oxcmp_basket->getVouchers() item=sVoucher key=key name=Voucher}][{$sVoucher->sVoucherNr}][{if !$smarty.foreach.Voucher.last}], [{/if}][{/foreach}]',
|
|
||||||
'quantity': '[{$rmItem->getFieldData('d3AmountThatGotRemoved')}]',
|
|
||||||
'position': [{$smarty.foreach.gtmRemovedItems.index}]
|
|
||||||
}[{if !$smarty.foreach.gtmRemovedItems.last}],[{/if}]
|
|
||||||
[{/foreach}]
|
|
||||||
]
|
|
||||||
}[{if $oViewConf->isDebugModeOn()}],
|
|
||||||
'debug_mode': 'true'
|
|
||||||
[{/if}]
|
|
||||||
});
|
|
||||||
[{/strip}]
|
|
||||||
[{/capture}]
|
|
||||||
[{oxscript add=$d3_ga4_remove_from_cart}]
|
|
||||||
[{/if}]
|
|
||||||
[{/block}]
|
|
@ -1,44 +0,0 @@
|
|||||||
[{$smarty.block.parent}]
|
|
||||||
|
|
||||||
[{assign var="gtmProducts" value=$oView->getArticleList()}]
|
|
||||||
|
|
||||||
[{block name="d3_ga4_view_search_result_block"}]
|
|
||||||
[{if $gtmProducts}]
|
|
||||||
[{capture assign=d3_ga4_view_search_result}]
|
|
||||||
[{strip}]
|
|
||||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
|
||||||
dataLayer.push({
|
|
||||||
'event': 'view_search_result',
|
|
||||||
'eventLabel':'view_search_result[{if $oViewConf->isDebugModeOn()}]_test[{/if}]',
|
|
||||||
'ecommerce': {
|
|
||||||
'search_term': '[{$searchparamforhtml}]',
|
|
||||||
'items': [
|
|
||||||
[{foreach from=$gtmProducts name="gtmProducts" item="gtmProduct"}]
|
|
||||||
[{assign var="d3PriceObject" value=$gtmProduct->getPrice()}]
|
|
||||||
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
|
||||||
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
|
|
||||||
{
|
|
||||||
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
|
|
||||||
'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]',
|
|
||||||
'price': [{$d3PriceObject->getPrice()}],
|
|
||||||
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
|
||||||
[{if $gtmCategory}]
|
|
||||||
'item_category': '[{$gtmCategory->getSplitCategoryArray(0)}]',
|
|
||||||
'item_category_2':'[{$gtmCategory->getSplitCategoryArray(1)}]',
|
|
||||||
'item_category_3':'[{$gtmCategory->getSplitCategoryArray(2)}]',
|
|
||||||
'item_category_4':'[{$gtmCategory->getSplitCategoryArray(3)}]',
|
|
||||||
'item_list_name':'[{$gtmCategory->getSplitCategoryArray()}]',
|
|
||||||
[{/if}]
|
|
||||||
'quantity': 1
|
|
||||||
}[{if !$smarty.foreach.gtmProducts.last}],[{/if}]
|
|
||||||
[{/foreach}]
|
|
||||||
]
|
|
||||||
}[{if $oViewConf->isDebugModeOn()}],
|
|
||||||
'debug_mode': 'true'
|
|
||||||
[{/if}]
|
|
||||||
});
|
|
||||||
[{/strip}]
|
|
||||||
[{/capture}]
|
|
||||||
[{oxscript add=$d3_ga4_view_search_result}]
|
|
||||||
[{/if}]
|
|
||||||
[{/block}]
|
|
151
CHANGELOG.md
151
CHANGELOG.md
@ -4,156 +4,21 @@ 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.17.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.16.0...2.17.0) - 2024-04-10
|
## [1.17.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.16.0...1.17.0) - 2024-04-11
|
||||||
### Added
|
### Added
|
||||||
- Google-Analytics default values
|
- multilang translations
|
||||||
- default values switch ( admin module settings )
|
- GA4 consent-mode default values
|
||||||
- translations
|
|
||||||
|
|
||||||
## Changed
|
### Changed
|
||||||
- centralized metadata-id
|
- metadataID centralized
|
||||||
|
|
||||||
## [2.16.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.15.0...2.16.0) - 2024-03-20
|
## [1.16.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.15.1...1.16.0) - 2024-04-11
|
||||||
### Added
|
### Added
|
||||||
- ( Google ) Server-Side tagging usability
|
- ( Google ) Server-Side tagging usability
|
||||||
|
|
||||||
## [2.15.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.14.0...2.15.0) - 2024-02-05
|
## [1.15.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.15.0...1.15.1) - 2024-04-11
|
||||||
### Fixed
|
### Fixed
|
||||||
- missing Component-ArticleDetails extension, missing ManufacturerListController extension
|
- false processing of template during missing necessary-component
|
||||||
|
|
||||||
## [2.14.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.13.1...2.14.0) - 2023-01-22
|
|
||||||
### Added
|
|
||||||
- add_to_cart Event to several new shop-pages (landing-page, Account, category article-list, start)
|
|
||||||
- PHPStan code-cleanup
|
|
||||||
### Changed
|
|
||||||
- template structure
|
|
||||||
- code cleanup
|
|
||||||
|
|
||||||
## [2.13.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.13.0...2.13.1) - 2023-01-03
|
|
||||||
### Fixed
|
|
||||||
- error on array-count at zero entries
|
|
||||||
|
|
||||||
## [2.13.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.12.0...2.13.0) - 2023-09-13
|
|
||||||
### Added
|
|
||||||
- extended Docs
|
|
||||||
### Changed
|
|
||||||
- control-param name
|
|
||||||
- control-param function
|
|
||||||
- adjusted check for set control-param
|
|
||||||
- consentmanager-script-adjustments
|
|
||||||
|
|
||||||
## [2.12.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.11.1...2.12.0) - 2023-09-07
|
|
||||||
### Added
|
|
||||||
- cookiebot functionality
|
|
||||||
|
|
||||||
## [2.11.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.10.1...2.11.0) - 2023-08-23
|
|
||||||
### Added
|
|
||||||
- manufacturer extension
|
|
||||||
- working debug_mode
|
|
||||||
### Changed
|
|
||||||
- check for 'article has been removed'
|
|
||||||
- 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.15.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.14.0...1.15.0) - 2024-01-25
|
## [1.15.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.14.0...1.15.0) - 2024-01-25
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@ -10,7 +10,38 @@ 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
|
In bestimmten Fällen, müssen Sie hier alternative Werte eintragen. Diese Fälle sind bedingt
|
||||||
nach der gewählten CMP (Consent Manager Platform).
|
nach der gewählten CMP (Consent Manager Platform).
|
||||||
|
|
||||||
> nähere Infos unter [CMP](#consent-manager-platform-cmp)
|
> nähere Infos unter [CMP](#consent-manager-platform-cmp)
|
||||||
|
|
||||||
|
## Blöcke
|
||||||
|
Für den geregelten Ablauf sind folgende Blöcke nötig:
|
||||||
|
- Suchergebnisse
|
||||||
|
- Blockname: search_results
|
||||||
|
- Datei: page/search/search.tpl
|
||||||
|
- GA4 Event: view_search_results
|
||||||
|
- Artikelliste
|
||||||
|
- Blockname: page_list_productlist
|
||||||
|
- Datei: page/list/list.tpl
|
||||||
|
- GA4 Event: view_item_list
|
||||||
|
- Detailseite
|
||||||
|
- Blockname: details_productmain_title
|
||||||
|
- Datei: page/details/inc/productmain.tpl
|
||||||
|
- GA4 Event: view_item
|
||||||
|
- dem WK hinzufĂĽgen (button)
|
||||||
|
- Blockname: details_productmain_tobasket
|
||||||
|
- Datei: page/details/inc/productmain.tpl
|
||||||
|
- GA4 Event: add_to_cart
|
||||||
|
- aus dem WK entfernen
|
||||||
|
- Blockname: checkout_basket_main
|
||||||
|
- Datei: page/checkout/basket.tpl
|
||||||
|
- GA4 Event: remove_from_cart
|
||||||
|
- Warenkorb
|
||||||
|
- Blockname: checkout_basket_main
|
||||||
|
- Datei: page/checkout/basket.tpl
|
||||||
|
- GA4 Event: view_cart
|
||||||
|
- abgeschlossener Kauf
|
||||||
|
- Blockname: checkout_thankyou_main
|
||||||
|
- 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.
|
FĂĽr die einfachste Ăśbersicht der enthaltenen Daten empfehle ich den Vorschau-Modus vom Google Tag Manager.
|
||||||
@ -49,7 +80,7 @@ Aktivieren Sie anschlieĂźend diese Weiche. Setzen Sie den Haken bei "Eigenen Coo
|
|||||||
- In der Usercentrics-Verwaltung die Services "Google Analytics" und "Google Tag Manager" anlegen
|
- In der Usercentrics-Verwaltung die Services "Google Analytics" und "Google Tag Manager" anlegen
|
||||||
- Den Service ```Google Tag Manager``` in den Moduleinstellungen des 'Google Analytics 4' unter
|
- Den Service ```Google Tag Manager``` in den Moduleinstellungen des 'Google Analytics 4' unter
|
||||||
Google Tag Manager eintragen
|
Google Tag Manager eintragen
|
||||||
|
-
|
||||||
- [Consent Management Provider](https://www.consentmanager.net/)
|
- [Consent Management Provider](https://www.consentmanager.net/)
|
||||||
- In der Consentmanager-Oberfläche den Anbieter "Google Tag Manager" mit der ID s905 hinzufügen
|
- In der Consentmanager-Oberfläche den Anbieter "Google Tag Manager" mit der ID s905 hinzufügen
|
||||||
- Im Frontend, im consentmanager-Pop-up nach dem 'Google Tag Manager' suchen
|
- Im Frontend, im consentmanager-Pop-up nach dem 'Google Tag Manager' suchen
|
||||||
@ -57,9 +88,6 @@ 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
|
||||||
|
|
||||||
- [Cookiefirst](https://cookiefirst.com)
|
- [Cookiebot](https://www.cookiebot.com)
|
||||||
- im Cookiefirst-Hub das jeweilige Cookie finden underen zugeordnete Kategorie kopieren
|
- Nähere Informationen folgen bald! Bis dato, besuchen Sie bitte die offizielle Webseite.
|
||||||
- die kopierte Kategory wird nun in den Einstellungen des Moduls hinterlegt:
|
|
||||||
```Erweiterungen > Module > Google Analytics 4 > Einstell. > Cookie Manager Einstellungen > Steuerungsparameter (vormals CookieID)```
|
|
||||||
- **Wichtig!** bei Nutzung des Consent-Managers von Google, muss zwangsläufig die Einstellung "Cookie manager Nutzen?" __ausgeschalten!__ werden
|
|
@ -120,4 +120,4 @@ class BasketController extends BasketController_parent
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -12,17 +12,12 @@
|
|||||||
|
|
||||||
namespace D3\GoogleAnalytics4\Modules\Core;
|
namespace D3\GoogleAnalytics4\Modules\Core;
|
||||||
|
|
||||||
use D3\GoogleAnalytics4\Application\Model\Constants;
|
|
||||||
use D3\GoogleAnalytics4\Application\Model\ManagerHandler;
|
use D3\GoogleAnalytics4\Application\Model\ManagerHandler;
|
||||||
use D3\GoogleAnalytics4\Application\Model\ManagerTypes;
|
use D3\GoogleAnalytics4\Application\Model\ManagerTypes;
|
||||||
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
||||||
|
use OxidEsales\Eshop\Application\Model\User;
|
||||||
use OxidEsales\Eshop\Core\Config;
|
use OxidEsales\Eshop\Core\Config;
|
||||||
use OxidEsales\Eshop\Application\Model\User;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;
|
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
|
||||||
|
|
||||||
class ViewConfig extends ViewConfig_parent
|
class ViewConfig extends ViewConfig_parent
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -34,10 +29,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', Constants::OXID_MODULE_ID);
|
|
||||||
}
|
}
|
||||||
return $this->sContainerId;
|
return $this->sContainerId;
|
||||||
}
|
}
|
||||||
@ -152,37 +144,38 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
|
|
||||||
private $blGA4enabled = null;
|
private $blGA4enabled = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws ContainerExceptionInterface
|
* @return null
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
*/
|
*/
|
||||||
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', Constants::OXID_MODULE_ID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->blGA4enabled;
|
return $this->blGA4enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function isGtmConsentModeSetActivated() :bool
|
public function isGtmConsentModeSetActivated() :bool
|
||||||
{
|
{
|
||||||
return $this->sContainerId = ContainerFactory::getInstance()
|
return Registry::getConfig()->getConfigParam('d3_gtm_blActivateConsentMode');
|
||||||
->getContainer()
|
|
||||||
->get(ModuleSettingBridgeInterface::class)
|
|
||||||
->get('d3_gtm_blActivateConsentMode', Constants::OXID_MODULE_ID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return false|string
|
||||||
|
*/
|
||||||
public function getGtmDataLayer()
|
public function getGtmDataLayer()
|
||||||
{
|
{
|
||||||
if (!$this->getGtmContainerId()) return "[]";
|
if (!$this->getGtmContainerId()) return "[]";
|
||||||
|
|
||||||
$oConfig = Registry::getConfig();
|
$oConfig = Registry::getConfig();
|
||||||
$oView = $oConfig->getTopActiveView();
|
$oView = $oConfig->getTopActiveView();
|
||||||
|
|
||||||
/** @var User|false|null $oUser */
|
/** @var User|false|null $oUser */
|
||||||
$oUser = $oConfig->getUser();
|
$oUser = $oConfig->getUser();
|
||||||
|
|
||||||
@ -214,11 +207,18 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
return json_encode([$dataLayer], JSON_PRETTY_PRINT);
|
return json_encode([$dataLayer], JSON_PRETTY_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function isDebugModeOn() :bool
|
public function isDebugModeOn() :bool
|
||||||
{
|
{
|
||||||
return Registry::getConfig()->getConfigParam('d3_gtm_blEnableDebug');
|
return Registry::getConfig()->getConfigParam('d3_gtm_blEnableDebug');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $listId
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function isPromotionList($listId)
|
public function isPromotionList($listId)
|
||||||
{
|
{
|
||||||
$oConfig = Registry::getConfig();
|
$oConfig = Registry::getConfig();
|
||||||
@ -227,27 +227,17 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
*/
|
*/
|
||||||
public function getServerSidetaggingJsDomain() :string
|
public function getServerSidetaggingJsDomain() :string
|
||||||
{
|
{
|
||||||
return ContainerFactory::getInstance()
|
return Registry::getConfig()->getConfigParam('d3_gtm_settings_serversidetagging_js');
|
||||||
->getContainer()
|
|
||||||
->get(ModuleSettingBridgeInterface::class)
|
|
||||||
->get('d3_gtm_settings_serversidetagging_js', Constants::OXID_MODULE_ID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
*/
|
*/
|
||||||
public function getServerSidetaggingNoJsDomain() :string
|
public function getServerSidetaggingNoJsDomain() :string
|
||||||
{
|
{
|
||||||
return ContainerFactory::getInstance()
|
return Registry::getConfig()->getConfigParam('d3_gtm_settings_serversidetagging_nojs');
|
||||||
->getContainer()
|
|
||||||
->get(ModuleSettingBridgeInterface::class)
|
|
||||||
->get('d3_gtm_settings_serversidetagging_nojs', Constants::OXID_MODULE_ID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
111
composer.json
111
composer.json
@ -1,56 +1,57 @@
|
|||||||
{
|
{
|
||||||
"name": "d3/google-analytics4",
|
"name": "d3/google-analytics4",
|
||||||
"description": "Google Tag Manager with new Google Analytics 4 for OXID eShop v6",
|
"description": "Google Tag Manager with new Google Analytics 4 for OXID eShop v6",
|
||||||
"type": "oxideshop-module",
|
"type": "oxideshop-module",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"oxid",
|
"oxid",
|
||||||
"modules",
|
"modules",
|
||||||
"eShop",
|
"eShop",
|
||||||
"d3",
|
"d3",
|
||||||
"google",
|
"google",
|
||||||
"ga4",
|
"ga4",
|
||||||
"googleanalytics",
|
"googleanalytics",
|
||||||
"gtm",
|
"gtm",
|
||||||
"configuration"
|
"configuration"
|
||||||
],
|
],
|
||||||
"homepage": "https://www.d3data.de",
|
"homepage": "https://www.d3data.de",
|
||||||
"license": [
|
"license": [
|
||||||
"GPL-3.0"
|
"GPL-3.0"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Marat Bedoev",
|
"name": "Marat Bedoev",
|
||||||
"email": "hello@mb-dev.pro"
|
"email": "hello@mb-dev.pro"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "D3 Data Development (Inh. Thomas Dartsch)",
|
"name": "D3 Data Development (Inh. Thomas Dartsch)",
|
||||||
"email": "info@shopmodule.com",
|
"email": "info@shopmodule.com",
|
||||||
"homepage": "https://www.d3data.de"
|
"homepage": "https://www.d3data.de"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"email": "support@shopmodule.com"
|
"email": "support@shopmodule.com"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"oxideshop": {
|
"oxideshop": {
|
||||||
"blacklist-filter": [
|
"blacklist-filter": [
|
||||||
"*.md",
|
"*.md",
|
||||||
"composer.json",
|
"composer.json",
|
||||||
".php-cs-fixer.php",
|
".php-cs-fixer.php",
|
||||||
"*.xml",
|
"*.xml",
|
||||||
"*.neon"
|
"*.neon"
|
||||||
],
|
],
|
||||||
"target-directory": "d3/googleanalytics4"
|
"target-directory": "d3/googleanalytics4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1",
|
"php": ">=7.1",
|
||||||
"oxid-esales/oxideshop-ce": "^6.5",
|
"oxid-esales/oxideshop-ce": "v6.0 - v6.3",
|
||||||
"google/apiclient":" ^2.0",
|
"google/apiclient":"^2.0",
|
||||||
"phpstan/phpstan": "^1.10" },
|
"phpstan/phpstan": "^1.8"
|
||||||
"autoload": {
|
},
|
||||||
"psr-4": {
|
"autoload": {
|
||||||
"D3\\GoogleAnalytics4\\": "../../../source/modules/d3/googleanalytics4"
|
"psr-4": {
|
||||||
}
|
"D3\\GoogleAnalytics4\\": "../../../source/modules/d3/googleanalytics4"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -49,7 +49,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.17.0',
|
'version' => '1.17.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/',
|
||||||
|
11
phpstan.neon
11
phpstan.neon
@ -1,15 +1,16 @@
|
|||||||
parameters:
|
parameters:
|
||||||
scanFiles:
|
scanFiles:
|
||||||
- IntelliSenseHelper.php
|
- IntelliSenseHelper.php
|
||||||
- ../../oxid-esales/oxideshop-ce/source/bootstrap.php
|
- ../../../../Shops/CE/6.1.x/616_/vendor/oxid-esales/oxideshop-ce/source/bootstrap.php
|
||||||
- ../../oxid-esales/oxideshop-ce/source/oxfunctions.php
|
- ../../../../Shops/CE/6.1.x/616_/vendor/oxid-esales/oxideshop-ce/source/oxfunctions.php
|
||||||
- ../../oxid-esales/oxideshop-ce/source/overridablefunctions.php
|
- ../../../../Shops/CE/6.1.x/616_/vendor/oxid-esales/oxideshop-ce/source/overridablefunctions.php
|
||||||
scanDirectories:
|
scanDirectories:
|
||||||
- ../../oxid-esales
|
- ../../../../Shops/CE/6.1.x/616_/vendor/oxid-esales
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
- '#.*is not subtype of Throwable.*#'
|
- '#.*is not subtype of Throwable.*#'
|
||||||
|
- '#\$sValue of method OxidEsales\\EshopCommunity\\Core\\Controller\\BaseController::addTplParam\(\) expects string,[ a-zA-Z\.]+#'
|
||||||
paths:
|
paths:
|
||||||
- ./
|
- ./
|
||||||
level: 5
|
level: 5
|
||||||
phpVersion: 80100
|
phpVersion: 70200
|
||||||
checkMissingIterableValueType: false
|
checkMissingIterableValueType: false
|
||||||
|
Reference in New Issue
Block a user