Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
97c3927998 | |||
cbe3293ff1 | |||
c7d3671265 | |||
3621ca606a |
@ -27,52 +27,6 @@ $aLang = [
|
|||||||
'SHOP_MODULE_d3_gtm_blGA4enab' => 'GA4 Aktivieren',
|
'SHOP_MODULE_d3_gtm_blGA4enab' => 'GA4 Aktivieren',
|
||||||
'SHOP_MODULE_d3_gtm_blUAenabled' => 'UA Aktivieren',
|
'SHOP_MODULE_d3_gtm_blUAenabled' => 'UA Aktivieren',
|
||||||
'SHOP_MODULE_d3_gtm_blEnableDebug' => 'Debug-Modus aktivieren',
|
'SHOP_MODULE_d3_gtm_blEnableDebug' => 'Debug-Modus aktivieren',
|
||||||
'SHOP_MODULE_GROUP_d3_gtm_settings_serversidetagging' => 'Server-Side tagging',
|
|
||||||
'SHOP_MODULE_d3_gtm_settings_serversidetagging_js' => 'Servercontainer Ausführender-Code',
|
|
||||||
'HELP_SHOP_MODULE_d3_gtm_settings_serversidetagging_js' => 'Diese Domain wird im <strong>aktiven</strong>-code ausgefüht. Das heißt,
|
|
||||||
dass es sich hierbei um das HTML-Tag <code>script</code> handelt.
|
|
||||||
Dieses kümmert sich darum, dass die, im data_layer
|
|
||||||
zusammengefassten Daten an den GTM weitergeleitet werden.<br>
|
|
||||||
<br>
|
|
||||||
<h4>Folgend eine Darstellung, was genau ausgetauscht wird</h4>
|
|
||||||
<pre>
|
|
||||||
<code>
|
|
||||||
Vorher:
|
|
||||||
https://www.googletagmanager.com/gtm.js?id=
|
|
||||||
|
|
||||||
Nachher:
|
|
||||||
{Domain}?id=
|
|
||||||
</code>
|
|
||||||
</pre>
|
|
||||||
Die Conatiner-ID wird weiterhin im Punkt "Einstellung" eingetragen!
|
|
||||||
',
|
|
||||||
'SHOP_MODULE_d3_gtm_settings_serversidetagging_nojs' => 'Servercontainer NICHT Ausführender-Code<br><br>
|
|
||||||
"Serverseitiges Tagging ist eine neue Möglichkeit, mit Google Tag Manager Ihre Anwendung geräteübergreifend zu verwalten.<br>
|
|
||||||
Servercontainer verwenden dasselbe Tag-, Trigger- und Variablenmodell, das Sie gewohnt sind.<br>
|
|
||||||
Außerdem bieten sie neue Tools, mit denen Sie Nutzeraktivitäten überall messen können." <br>
|
|
||||||
<br>
|
|
||||||
- Quelle <a href="https://developers.google.com/tag-platform/tag-manager/server-side/intro">Developers-Google Server-Side tagging</a><br>
|
|
||||||
<br>
|
|
||||||
<strong>Verändern Sie die Werte nur, wenn Sie Server-Side tagging verwenden wollen!</strong>
|
|
||||||
',
|
|
||||||
'HELP_SHOP_MODULE_d3_gtm_settings_serversidetagging_nojs' => 'Diese Domain wird im <strong>passiven</strong>-code ausgefüht. Das heißt,
|
|
||||||
dass es sich hierbei um das HTML-Tag <code>noscript</code> handelt.
|
|
||||||
Dieses wird ausgeführt, wenn aus einem bestimmten Grund
|
|
||||||
das Javascript nicht ausgeführt wird.<br>
|
|
||||||
( keine Cookies erlaubt, JavaScript-Unterbindung, ... )
|
|
||||||
<br>
|
|
||||||
<h4>Folgend eine Darstellung, was genau ausgetauscht wird</h4>
|
|
||||||
<pre>
|
|
||||||
<code>
|
|
||||||
Vorher:
|
|
||||||
src="https://www.googletagmanager.com/ns.html?id={Container-ID}"
|
|
||||||
|
|
||||||
Nachher:
|
|
||||||
src="{Domain}?id={Container-ID}"
|
|
||||||
</code>
|
|
||||||
</pre>
|
|
||||||
Die Conatiner-ID wird weiterhin im Punkt "Einstellung" eingetragen!
|
|
||||||
',
|
|
||||||
|
|
||||||
// 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',
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
w[l].push({'gtm.start': new Date().getTime(), event: 'gtm.js'});
|
w[l].push({'gtm.start': new Date().getTime(), event: 'gtm.js'});
|
||||||
var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
|
var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
|
||||||
j.async = true;
|
j.async = true;
|
||||||
j.src = '[{$oViewConf->getServerSidetaggingJsDomain()}]?id=' + i + dl;
|
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
|
||||||
f.parentNode.insertBefore(j, f);
|
f.parentNode.insertBefore(j, f);
|
||||||
})(window, document, 'script', 'dataLayer', '[{$oViewConf->getGtmContainerId()}]');
|
})(window, document, 'script', 'dataLayer', '[{$oViewConf->getGtmContainerId()}]');
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
[{if $oViewConf->getGtmContainerId()}][{strip}]
|
[{if $oViewConf->getGtmContainerId()}][{strip}]
|
||||||
<!-- Google Tag Manager (noscript) -->
|
<!-- Google Tag Manager (noscript) -->
|
||||||
<noscript>
|
<noscript>
|
||||||
<iframe src="[{$oViewConf->getServerSidetaggingNoJsDomain()}]?id=[{$oViewConf->getGtmContainerId()}]"
|
<iframe src="https://www.googletagmanager.com/ns.html?id=[{$oViewConf->getGtmContainerId()}]"
|
||||||
height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
||||||
</noscript>
|
</noscript>
|
||||||
<!-- End Google Tag Manager (noscript) -->
|
<!-- End Google Tag Manager (noscript) -->
|
||||||
|
@ -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}]
|
|
142
CHANGELOG.md
142
CHANGELOG.md
@ -4,147 +4,9 @@ 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.16.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.15.0...2.16.0) - 2024-03-20
|
## [1.15.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.15.0...1.15.1) - 2024-04-11
|
||||||
### Added
|
|
||||||
- ( Google ) Server-Side tagging usability
|
|
||||||
|
|
||||||
## [2.15.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.14.0...2.15.0) - 2024-02-05
|
|
||||||
### 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
|
||||||
|
@ -12,6 +12,37 @@ 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
|
||||||
@ -58,8 +89,5 @@ Aktivieren Sie anschließend diese Weiche. Setzen Sie den Haken bei "Eigenen Coo
|
|||||||
- 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
|
|
@ -15,13 +15,9 @@ namespace D3\GoogleAnalytics4\Modules\Core;
|
|||||||
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
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -33,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', 'd3googleanalytics4');
|
|
||||||
}
|
}
|
||||||
return $this->sContainerId;
|
return $this->sContainerId;
|
||||||
}
|
}
|
||||||
@ -151,18 +144,12 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
|
|
||||||
private $blGA4enabled = null;
|
private $blGA4enabled = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @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', 'd3googleanalytics4');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->blGA4enabled;
|
return $this->blGA4enabled;
|
||||||
@ -174,6 +161,7 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
|
|
||||||
$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();
|
||||||
|
|
||||||
@ -215,30 +203,4 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
$oConfig = Registry::getConfig();
|
$oConfig = Registry::getConfig();
|
||||||
$aPromotionListIds = $oConfig->getConfigParam("") ?? ['bargainItems', 'newItems', 'topBox', 'alsoBought', 'accessories', 'cross'];
|
$aPromotionListIds = $oConfig->getConfigParam("") ?? ['bargainItems', 'newItems', 'topBox', 'alsoBought', 'accessories', 'cross'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
*/
|
|
||||||
public function getServerSidetaggingJsDomain() :string
|
|
||||||
{
|
|
||||||
return ContainerFactory::getInstance()
|
|
||||||
->getContainer()
|
|
||||||
->get(ModuleSettingBridgeInterface::class)
|
|
||||||
->get('d3_gtm_settings_serversidetagging_js', 'd3googleanalytics4');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
*/
|
|
||||||
public function getServerSidetaggingNoJsDomain() :string
|
|
||||||
{
|
|
||||||
return ContainerFactory::getInstance()
|
|
||||||
->getContainer()
|
|
||||||
->get(ModuleSettingBridgeInterface::class)
|
|
||||||
->get('d3_gtm_settings_serversidetagging_nojs', 'd3googleanalytics4');
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -45,9 +45,10 @@
|
|||||||
},
|
},
|
||||||
"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": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"D3\\GoogleAnalytics4\\": "../../../source/modules/d3/googleanalytics4"
|
"D3\\GoogleAnalytics4\\": "../../../source/modules/d3/googleanalytics4"
|
||||||
|
15
metadata.php
15
metadata.php
@ -48,7 +48,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.16.0',
|
'version' => '1.15.1',
|
||||||
'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/',
|
||||||
@ -210,18 +210,5 @@ $aModule = [
|
|||||||
'value' => 'none',
|
'value' => 'none',
|
||||||
'constraints' => 'NONE|CONSENTMANAGER|USERCENTRICS|COOKIEFIRST|COOKIEBOT',
|
'constraints' => 'NONE|CONSENTMANAGER|USERCENTRICS|COOKIEFIRST|COOKIEBOT',
|
||||||
],
|
],
|
||||||
// OST929760 - Erweiterung für Serverside Tagging
|
|
||||||
[
|
|
||||||
'group' => 'd3_gtm_settings_serversidetagging',
|
|
||||||
'name' => 'd3_gtm_settings_serversidetagging_js',
|
|
||||||
'type' => 'str',
|
|
||||||
'value' => 'https://www.googletagmanager.com/gtm.js',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'group' => 'd3_gtm_settings_serversidetagging',
|
|
||||||
'name' => 'd3_gtm_settings_serversidetagging_nojs',
|
|
||||||
'type' => 'str',
|
|
||||||
'value' => 'https://www.googletagmanager.com/ns.html',
|
|
||||||
],
|
|
||||||
]
|
]
|
||||||
];
|
];
|
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