Compare commits
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
2f6fd8a31c | |||
8f9ed021d6 | |||
0ef3d3373a | |||
fd2b4a5bbe | |||
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 |
@ -30,11 +30,7 @@ $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' => 'Eigenen Cookie Manager nutzen?
|
||||||
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER' => 'Nutzen Sie eine der folgenden Einbindungen?<br>
|
<strong style="color: red">Hinweis (Fragezeichen) lesen!</strong>',
|
||||||
Dann wählen Sie bitte die zutreffende aus.',
|
'SHOP_MODULE_d3_gtm_settings_cookieName' => 'Cookie-Name',
|
||||||
'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_NONE' => '---',
|
|
||||||
'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_cookieName' => 'CookieID',
|
|
||||||
];
|
];
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
[{* Always prepare the data layer to avoid errors *}]
|
[{assign var="d3VtConfigObject" value=$oViewConf->getConfig()}]
|
||||||
<script>
|
[{if $d3VtConfigObject->getConfigParam('d3_gtm_settings_hasOwnCookieManager')}]
|
||||||
var dataLayer = [{$oViewConf->getGtmDataLayer()}] || [];
|
[{if $oViewConf->D3blAcceptedCookie($d3VtConfigObject->getConfigParam('d3_gtm_settings_cookieName'))}]
|
||||||
</script>
|
|
||||||
|
|
||||||
[{if $oViewConf->D3blShowGtmScript()}]
|
|
||||||
[{if $oViewConf->getGtmContainerId()}][{strip}]
|
[{if $oViewConf->getGtmContainerId()}][{strip}]
|
||||||
<!-- Google Tag Manager -->
|
<!-- Google Tag Manager -->
|
||||||
<script [{$oViewConf->getGtmScriptAttributes()}]>
|
<script>
|
||||||
|
var dataLayer = [{$oViewConf->getGtmDataLayer()}] || [];
|
||||||
(function (w, d, s, l, i) {
|
(function (w, d, s, l, i) {
|
||||||
w[l] = w[l] || [];
|
w[l] = w[l] || [];
|
||||||
w[l].push({'gtm.start': new Date().getTime(), event: 'gtm.js'});
|
w[l].push({'gtm.start': new Date().getTime(), event: 'gtm.js'});
|
||||||
@ -17,15 +16,44 @@
|
|||||||
})(window, document, 'script', 'dataLayer', '[{$oViewConf->getGtmContainerId()}]');
|
})(window, document, 'script', 'dataLayer', '[{$oViewConf->getGtmContainerId()}]');
|
||||||
</script>
|
</script>
|
||||||
<!-- End Google Tag Manager -->
|
<!-- End Google Tag Manager -->
|
||||||
|
|
||||||
[{if $oViewConf->getTopActionClassName() === "alist" }]
|
[{if $oViewConf->getTopActionClassName() === "alist" }]
|
||||||
[{* include file="ga4_view_item_list.tpl" gtmCategory=$oView->getActiveCategory() gtmProducts=$oView->getArticleList() listtype=$oView->getListType() *}]
|
[{* include file="ga4_view_item_list.tpl" gtmCategory=$oView->getActiveCategory() gtmProducts=$oView->getArticleList() listtype=$oView->getListType() *}]
|
||||||
[{elseif $oViewConf->getTopActionClassName() === "details" }]
|
[{elseif $oViewConf->getTopActionClassName() === "details" }]
|
||||||
[{* include file="ga4_view_item.tpl" gtmProduct=$oView->getProduct() *}]
|
[{* include file="ga4_view_item.tpl" gtmProduct=$oView->getProduct() *}]
|
||||||
[{elseif $oViewConf->getTopActionClassName() === "search" }]
|
[{elseif $oViewConf->getTopActionClassName() === "search" }]
|
||||||
[{elseif $oViewConf->getTopActionClassName() === "basket" }]
|
[{elseif $oViewConf->getTopActionClassName() === "basket" }]
|
||||||
|
|
||||||
[{/if}]
|
[{/if}]
|
||||||
[{/strip}][{/if}]
|
[{/strip}][{/if}]
|
||||||
|
[{else}]
|
||||||
|
<script>
|
||||||
|
var dataLayer = [{$oViewConf->getGtmDataLayer()}] || [];
|
||||||
|
</script>
|
||||||
[{/if}]
|
[{/if}]
|
||||||
|
[{else}]
|
||||||
|
[{if $oViewConf->getGtmContainerId()}][{strip}]
|
||||||
|
<!-- Google Tag Manager -->
|
||||||
|
<script>
|
||||||
|
var dataLayer = [{$oViewConf->getGtmDataLayer()}] || [];
|
||||||
|
(function (w, d, s, l, i) {
|
||||||
|
w[l] = w[l] || [];
|
||||||
|
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 : '';
|
||||||
|
j.async = true;
|
||||||
|
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
|
||||||
|
f.parentNode.insertBefore(j, f);
|
||||||
|
})(window, document, 'script', 'dataLayer', '[{$oViewConf->getGtmContainerId()}]');
|
||||||
|
</script>
|
||||||
|
<!-- End Google Tag Manager -->
|
||||||
|
[{if $oViewConf->getTopActionClassName() === "alist" }]
|
||||||
|
[{* include file="ga4_view_item_list.tpl" gtmCategory=$oView->getActiveCategory() gtmProducts=$oView->getArticleList() listtype=$oView->getListType() *}]
|
||||||
|
[{elseif $oViewConf->getTopActionClassName() === "details" }]
|
||||||
|
[{* include file="ga4_view_item.tpl" gtmProduct=$oView->getProduct() *}]
|
||||||
|
[{elseif $oViewConf->getTopActionClassName() === "search" }]
|
||||||
|
[{elseif $oViewConf->getTopActionClassName() === "basket" }]
|
||||||
|
|
||||||
|
[{/if}]
|
||||||
|
[{/strip}][{/if}]
|
||||||
|
[{/if}]
|
||||||
|
|
||||||
[{$smarty.block.parent}]
|
[{$smarty.block.parent}]
|
@ -1,12 +1,8 @@
|
|||||||
[{if $oViewConf->D3blShowGtmScript()}]
|
[{if $oViewConf->getGtmContainerId()}][{strip}]
|
||||||
[{if $oViewConf->getGtmContainerId()}][{strip}]
|
|
||||||
<!-- Google Tag Manager (noscript) -->
|
<!-- Google Tag Manager (noscript) -->
|
||||||
<noscript>
|
<noscript>
|
||||||
<iframe src="https://www.googletagmanager.com/ns.html?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) -->[{/strip}][{/if}]
|
||||||
[{/strip}][{/if}]
|
|
||||||
[{/if}]
|
|
||||||
|
|
||||||
[{$smarty.block.parent}]
|
[{$smarty.block.parent}]
|
66
Application/views/blocks/_impression.tpl
Normal file
66
Application/views/blocks/_impression.tpl
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
[{$smarty.block.parent}]
|
||||||
|
[{*
|
||||||
|
[{strip}]
|
||||||
|
[{assign var="gtmProduct" value=$oView->getProduct()}]
|
||||||
|
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
|
||||||
|
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
||||||
|
|
||||||
|
[{if !$head }]
|
||||||
|
[{assign var=$head value=$oView->getViewParameter('head')}]
|
||||||
|
[{/if}]
|
||||||
|
<script>
|
||||||
|
var gtmItem = {
|
||||||
|
'id': '[{$gtmProduct->oxarticles__oxartnum->value}]',
|
||||||
|
'item_id': '[{$gtmProduct->oxarticles__oxartnum->value}]',
|
||||||
|
|
||||||
|
'name': '[{$gtmProduct->oxarticles__oxtitle->value}]',
|
||||||
|
'item_name': '[{$gtmProduct->oxarticles__oxtitle->value}]',
|
||||||
|
|
||||||
|
'variant': '[{if $gtmProduct->oxarticles__oxvarselect->value}][{$gtmProduct->oxarticles__oxvarselect->value}][{/if}]',
|
||||||
|
'item_variant': '[{if $gtmProduct->oxarticles__oxvarselect->value}][{$gtmProduct->oxarticles__oxvarselect->value}][{/if}]',
|
||||||
|
|
||||||
|
'brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||||
|
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||||
|
|
||||||
|
'price': [{$gtmProduct->oxarticles__oxprice->value}],
|
||||||
|
|
||||||
|
'category': '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]no category[{/if}]',
|
||||||
|
'item_category': '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]no category[{/if}]',
|
||||||
|
|
||||||
|
[{if $listId == 'productList' || $listId == 'categoryList'}]
|
||||||
|
/* category list */
|
||||||
|
'list': '[{$listId}]',
|
||||||
|
'item_list_id': '[{$listId}]',
|
||||||
|
'item_list_name': '[{$head}]',
|
||||||
|
[{elseif $listId}]
|
||||||
|
/* category list */
|
||||||
|
'list': '[{$listId}]',
|
||||||
|
'promotion_id': '[{$listId}]',
|
||||||
|
'promotion_name': '[{$head}]',
|
||||||
|
[{/if}]
|
||||||
|
'position': [{$iIndex}],
|
||||||
|
'index': [{$iIndex}],
|
||||||
|
'quantity': '1'
|
||||||
|
};
|
||||||
|
/* UA */
|
||||||
|
dataLayer.push({ ecommerce: null });
|
||||||
|
dataLayer.push({
|
||||||
|
'event': 'UA_event',
|
||||||
|
'event_name': 'Impression',
|
||||||
|
'ecommerce': {
|
||||||
|
'currencyCode': '[{$currency->name}]',
|
||||||
|
'impressions': [gtmItem]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
/* GA4 */
|
||||||
|
dataLayer.push({ ecommerce: null });
|
||||||
|
dataLayer.push({
|
||||||
|
'event': 'GA4_event',
|
||||||
|
'event_name': 'view_item_list',
|
||||||
|
'ecommerce': {
|
||||||
|
'items': [gtmItem]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
[{/strip}]
|
||||||
|
*}]
|
5
Application/views/blocks/add_to_cart.tpl
Normal file
5
Application/views/blocks/add_to_cart.tpl
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[{if $oxcmp_basket->isNewItemAdded() && $smarty.session._newitem}]
|
||||||
|
<!-- [{$smarty.session._newitem|@var_dump}] -->
|
||||||
|
[{* include file="ga4_add_to_cart.tpl" gtmProduct=$smarty.session._newitem *}]
|
||||||
|
[{/if}]
|
||||||
|
[{$smarty.block.parent}]
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
[{*$oxcmp_basket|get_class_methods|dumpvar*}]
|
[{*$oxcmp_basket|get_class_methods|dumpvar*}]
|
||||||
|
|
||||||
[{assign var="d3BasketPrice" value=$oxcmp_basket->getPrice()}]
|
|
||||||
|
|
||||||
[{assign var='gtmCartArticles' value=$oView->getBasketArticles()}]
|
[{assign var='gtmCartArticles' value=$oView->getBasketArticles()}]
|
||||||
[{strip}][{capture assign=d3_ga4_view_cart}]
|
[{strip}][{capture assign=d3_ga4_view_cart}]
|
||||||
|
let iPrice = "[{oxprice price=$oxcmp_basket->getPrice()}]";
|
||||||
|
|
||||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||||
dataLayer.push({
|
dataLayer.push({
|
||||||
'event': 'view_cart',
|
'event': 'view_cart',
|
||||||
@ -13,15 +13,15 @@
|
|||||||
'ecommerce': {
|
'ecommerce': {
|
||||||
'actionField': "step: 1",
|
'actionField': "step: 1",
|
||||||
'currency': "[{$currency->name}]",
|
'currency': "[{$currency->name}]",
|
||||||
'value': [{$d3BasketPrice->getPrice()}],
|
'value': iPrice.replace("€", ""),
|
||||||
'items': [
|
'items': [
|
||||||
[{foreach from=$oxcmp_basket->getContents() item=basketitem name=gtmCartContents key=basketindex}]
|
[{foreach from=$oxcmp_basket->getContents() item=basketitem name=gtmCartContents key=basketindex}]
|
||||||
[{assign var="d3oItemPrice" value=$basketitem->getPrice()}]
|
[{assign var='_price' value=$basketitem->getUnitPrice()}]
|
||||||
{
|
{
|
||||||
'item_id': '[{$gtmCartArticles[$basketindex]->getFieldData('oxartnum')}]',
|
'item_id': '[{$gtmCartArticles[$basketindex]->oxarticles__oxartnum->value}]',
|
||||||
'item_name': '[{$gtmCartArticles[$basketindex]->getFieldData('oxtitle')}]',
|
'item_name': '[{$gtmCartArticles[$basketindex]->oxarticles__oxtitle->value}]',
|
||||||
'item_variant': '[{$gtmCartArticles[$basketindex]->getFieldData('oxvarselect')}]',
|
'item_variant': '[{$gtmCartArticles[$basketindex]->oxarticles__oxvarselect->value}]',
|
||||||
'price': [{$d3oItemPrice->getPrice()}],
|
'price': [{$_price->getPrice()}],
|
||||||
'quantity':[{$basketitem->getAmount()}],
|
'quantity':[{$basketitem->getAmount()}],
|
||||||
'position':[{$smarty.foreach.gtmCartContents.index}]
|
'position':[{$smarty.foreach.gtmCartContents.index}]
|
||||||
}[{if !$smarty.foreach.gtmCartContents.last}],[{/if}]
|
}[{if !$smarty.foreach.gtmCartContents.last}],[{/if}]
|
||||||
|
18
Application/views/blocks/checkout_s2.tpl
Normal file
18
Application/views/blocks/checkout_s2.tpl
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[{strip}]
|
||||||
|
<script>
|
||||||
|
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||||
|
dataLayer.push({
|
||||||
|
'event':'ee.checkout',
|
||||||
|
'eventLabel':'Checkout Step 2',
|
||||||
|
'ecommerce': {
|
||||||
|
'checkout': {
|
||||||
|
'actionField': {
|
||||||
|
'step': 2,
|
||||||
|
'option':'[{oxmultilang ident="vt_GTM_EE_LOGINOPTION"|cat:$oView->getLoginOption()}]'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
[{/strip}]
|
||||||
|
[{$smarty.block.parent}]
|
9
Application/views/blocks/checkout_s3.tpl
Normal file
9
Application/views/blocks/checkout_s3.tpl
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<script>
|
||||||
|
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||||
|
dataLayer.push({
|
||||||
|
'event': 'ee.checkout',
|
||||||
|
'eventLabel': 'Checkout Step 3',
|
||||||
|
'ecommerce': {'checkout': {'actionField': {'step': 3}}}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
[{$smarty.block.parent}]
|
9
Application/views/blocks/checkout_s4.tpl
Normal file
9
Application/views/blocks/checkout_s4.tpl
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<script>
|
||||||
|
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||||
|
dataLayer.push({
|
||||||
|
"event": "ee.checkout",
|
||||||
|
'eventLabel': 'Checkou Step 4',
|
||||||
|
"ecommerce": {"checkout": {"actionField": {"step": 4}}}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
[{$smarty.block.parent}]
|
@ -10,22 +10,21 @@
|
|||||||
'event': 'purchase',
|
'event': 'purchase',
|
||||||
'eventLabel':'Checkout Step 5',
|
'eventLabel':'Checkout Step 5',
|
||||||
'ecommerce': {
|
'ecommerce': {
|
||||||
'transaction_id': '[{$_gtmOrder->getFieldData("oxordernr")}]',
|
'transaction_id': '[{$_gtmOrder->oxorder__oxordernr->value}]',
|
||||||
'affiliation': '[{$oxcmp_shop->getFieldData("oxname")}]',
|
'affiliation': '[{$oxcmp_shop->oxshops__oxname->value}]',
|
||||||
'value': [{$_gtmOrder->getTotalOrderSum()}],
|
'value': '[{$_gtmOrder->oxorder__oxtotalordersum->value}]',
|
||||||
'tax': [{math equation="x+y" x=$_gtmOrder->getFieldData("oxartvatprice1") y=$_gtmOrder->getFieldData("oxartvatprice2") }],
|
'tax': '[{math equation="x+y" x=$_gtmOrder->oxorder__oxartvatprice1->value y=$_gtmOrder->oxorder__oxartvatprice2->value }]',
|
||||||
'shipping': [{$_gtmOrder->getFieldData("oxdelcost")}],
|
'shipping': '[{$_gtmOrder->oxorder__oxdelcost->value}]',
|
||||||
'currency': '[{$_gtmOrder->getFieldData('oxcurrency')}]',
|
'currency': '[{$_gtmOrder->getFieldData('oxcurrency')}]',
|
||||||
'items':
|
'items':
|
||||||
[
|
[
|
||||||
[{foreach from=$_gtmArticles item="d3BasketArticle" name="gtmArticles"}]
|
[{foreach from=$_gtmArticles item="_gtmArticle" name="gtmArticles"}]
|
||||||
[{assign var="d3oArticlePrice" value=$d3BasketArticle->getPrice()}]
|
|
||||||
{
|
{
|
||||||
'id': '[{$d3BasketArticle->getFieldData("oxartnum")}]',
|
'id': '[{$_gtmArticle->oxorderarticles__oxartnum->value}]',
|
||||||
'name': '[{$d3BasketArticle->getFieldData("oxtitle")}]',
|
'name': '[{$_gtmArticle->oxorderarticles__oxtitle->value}]',
|
||||||
'variant': '[{$d3BasketArticle->getFieldData("oxselvariant")}]',
|
'variant': '[{$_gtmArticle->oxorderarticles__oxselvariant->value}]',
|
||||||
'price': [{$d3oArticlePrice->getPrice()}],
|
'price': [{$_gtmArticle->oxorderarticles__oxprice->value}],
|
||||||
'quantity': [{$d3BasketArticle->getFieldData("oxamount")}],
|
'quantity': [{$_gtmArticle->oxorderarticles__oxamount->value}],
|
||||||
'position': [{$smarty.foreach.gtmArticles.iteration}]
|
'position': [{$smarty.foreach.gtmArticles.iteration}]
|
||||||
}[{if !$smarty.foreach.gtmArticles.last}],[{/if}]
|
}[{if !$smarty.foreach.gtmArticles.last}],[{/if}]
|
||||||
[{/foreach}]
|
[{/foreach}]
|
||||||
|
25
Application/views/blocks/detail.tpl
Normal file
25
Application/views/blocks/detail.tpl
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
[{$smarty.block.parent}]
|
||||||
|
[{assign var="gtmProduct" value=$oView->getProduct()}]
|
||||||
|
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
|
||||||
|
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
||||||
|
|
||||||
|
<script>
|
||||||
|
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||||
|
dataLayer.push({
|
||||||
|
'event': 'view_item',
|
||||||
|
'eventLabel':'Product View',
|
||||||
|
'ecommerce': {
|
||||||
|
'currency': '[{$currency->name}]',
|
||||||
|
'items': [
|
||||||
|
{
|
||||||
|
'item_name': '[{$gtmProduct->oxarticles__oxtitle->value}]',
|
||||||
|
'item_id': '[{$gtmProduct->oxarticles__oxartnum->value}]',
|
||||||
|
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||||
|
'item_category': '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]-[{/if}]',
|
||||||
|
'item_variant': '[{if $gtmProduct->oxarticles__oxvarselect->value}][{$gtmProduct->oxarticles__oxvarselect->value}][{/if}]',
|
||||||
|
'price': [{$gtmProduct->oxarticles__oxprice->value}]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
@ -1,26 +0,0 @@
|
|||||||
[{$smarty.block.parent}]
|
|
||||||
[{assign var="gtmProduct" value=$oView->getProduct()}]
|
|
||||||
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
|
|
||||||
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
|
||||||
|
|
||||||
<script>
|
|
||||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
|
||||||
dataLayer.push({
|
|
||||||
'event': 'view_item',
|
|
||||||
'eventLabel':'Product View',
|
|
||||||
'ecommerce': {
|
|
||||||
'currency': '[{$currency->name}]',
|
|
||||||
'items': [
|
|
||||||
{
|
|
||||||
'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]',
|
|
||||||
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
|
|
||||||
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
|
||||||
'item_category': '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]-[{/if}]',
|
|
||||||
'item_variant': '[{if $gtmProduct->getFieldData("oxvarselect")}][{$gtmProduct->getFieldData("oxvarselect")}][{/if}]',
|
|
||||||
[{assign var="d3PriceObject" value=$gtmProduct->getPrice()}]
|
|
||||||
'price': [{$d3PriceObject->getPrice()}]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
37
Application/views/blocks/widget_product_list.tpl
Normal file
37
Application/views/blocks/widget_product_list.tpl
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
[{$smarty.block.parent}]
|
||||||
|
[{assign var="gtmProduct" value=$oView->getProduct()}]
|
||||||
|
[{if $gtmProduct}]
|
||||||
|
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
|
||||||
|
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
||||||
|
<script>
|
||||||
|
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||||
|
dataLayer.push({
|
||||||
|
'event': 'ee.impression',
|
||||||
|
'eventLabel':'Impression',
|
||||||
|
'ecommerce': {
|
||||||
|
'currencyCode': '[{$currency->name}]',
|
||||||
|
'impressions': [
|
||||||
|
{
|
||||||
|
'name': '[{$gtmProduct->getFieldData('oxtitle')}]',
|
||||||
|
'id': '[{$gtmProduct->getFieldData('oxartnum')}]',
|
||||||
|
'price': [{$gtmProduct->getFieldData('oxprice')}],
|
||||||
|
'brand': '[{if $gtmManufacturer}][{$gtmManufacturer->getFieldData('oxtitle')}][{/if}]',
|
||||||
|
'category': '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]-[{/if}]',
|
||||||
|
'variant': '[{if $gtmProduct->getFieldData('oxvarselect')}][{$gtmProduct->getFieldData('oxvarselect')}][{/if}]'
|
||||||
|
[{if $list && $position}],
|
||||||
|
'list': '[{$list}]',
|
||||||
|
'position': [{"_"|str_replace:"":$position}]
|
||||||
|
[{/if}]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!--
|
||||||
|
sWidgetType [{$sWidgetType}] | [{$oView->getViewParameter('sWidgetType')}]
|
||||||
|
sListType [{$sListType}] | [{$oView->getViewParameter('sListType')}]
|
||||||
|
iIndex [{$iIndex}] | [{$oView->getViewParameter('iIndex')}]
|
||||||
|
listId [{$listId}] | [{$oView->getViewParameter('listId')}]
|
||||||
|
testid [{$testid}] | [{$oView->getViewParameter('testid')}]
|
||||||
|
-->
|
||||||
|
[{/if}]
|
0
Application/views/ga4/add_payment_info.tpl
Executable file
0
Application/views/ga4/add_payment_info.tpl
Executable file
0
Application/views/ga4/add_shipping_info.tpl
Executable file
0
Application/views/ga4/add_shipping_info.tpl
Executable file
@ -1,19 +1,10 @@
|
|||||||
[{$smarty.block.parent}]
|
[{$smarty.block.parent}]
|
||||||
|
|
||||||
[{* variable $gtmProduct is passed from parent tempalte *}]
|
[{*$gtmProduct|get_class_methods|dumpvar*}]
|
||||||
[{assign var="d3PriceObject" value=$gtmProduct->getPrice()}]
|
|
||||||
[{assign var="gtmCurrency" value=$oView->getActCurrency()}]
|
|
||||||
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
|
||||||
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
|
|
||||||
|
|
||||||
[{capture assign=d3_ga4_add_to_cart}]
|
[{capture assign=d3_ga4_add_to_cart}]
|
||||||
[{block name="d3_ga4_add_to_basket"}]
|
[{block name="d3_ga4_add_to_basket"}]
|
||||||
$("#toBasket").click(function(event) {
|
$("#toBasket").click(function(event) {
|
||||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
|
||||||
|
|
||||||
let itemCategories = '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]no category[{/if}]'.split('/');
|
|
||||||
|
|
||||||
[{*** Debug cases ***}]
|
|
||||||
[{*event.preventDefault();*}]
|
[{*event.preventDefault();*}]
|
||||||
|
|
||||||
let iArtQuantity = $("#amountToBasket").val();
|
let iArtQuantity = $("#amountToBasket").val();
|
||||||
@ -24,24 +15,45 @@
|
|||||||
'eventLabel': 'add_to_cart',
|
'eventLabel': 'add_to_cart',
|
||||||
'ecommerce': {
|
'ecommerce': {
|
||||||
'currency': "[{$currency->name}]",
|
'currency': "[{$currency->name}]",
|
||||||
'value': iArtQuantity*[{$d3PriceObject->getPrice()}],
|
'value': iArtQuantity*[{$gtmProduct->getFieldData('oxprice')}],
|
||||||
'items': [
|
'items': [
|
||||||
{
|
{
|
||||||
'item_id': '[{$gtmProduct->getFieldData('oxartnum')}]',
|
'item_id': '[{$gtmProduct->getFieldData('oxartnum')}]',
|
||||||
'item_name': '[{$gtmProduct->getFieldData('oxtitle')}]',
|
'item_name': '[{$gtmProduct->getFieldData('oxtitle')}]',
|
||||||
'price': [{$d3PriceObject->getPrice()}],
|
'price': '[{$gtmProduct->getFieldData('oxprice')}]',
|
||||||
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||||
'item_variant': '[{if $gtmProduct->getFieldData('oxvarselect')}][{$gtmProduct->getFieldData('oxvarselect')}][{/if}]',
|
'item_variant': '[{if $gtmProduct->getFieldData('oxvarselect')}][{$gtmProduct->getFieldData('oxvarselect')}][{/if}]',
|
||||||
'item_category': itemCategories[0] || 'no category',
|
'item_category': itemCategories[0] || 'no category',
|
||||||
'item_category_2':itemCategories[1] || '',
|
'item_category_2':itemCategories[1] || '',
|
||||||
'item_category_3':itemCategories[2] || '',
|
'item_category_3':itemCategories[2] || '',
|
||||||
'item_category_4':itemCategories[3] || '',
|
'item_category_4':itemCategories[3] || '',
|
||||||
|
[{if false}]
|
||||||
|
[{* ??? what *}]
|
||||||
|
'item_list_name': 'Search Results', // If associated with a list selection.
|
||||||
|
'item_list_id': 'SR123', // If associated with a list selection.
|
||||||
|
'index': 1, // If associated with a list selection.
|
||||||
|
[{/if}]
|
||||||
'quantity': iArtQuantity
|
'quantity': iArtQuantity
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
[{/block}]
|
[{/block}]
|
||||||
[{/capture}]
|
[{/capture}]
|
||||||
[{oxscript add=$d3_ga4_add_to_cart}]
|
[{oxscript add=$d3_ga4_add_to_cart}]
|
||||||
|
|
||||||
|
[{strip}]
|
||||||
|
[{* variable $gtmProduct is passed from parent tempalte *}]
|
||||||
|
|
||||||
|
[{assign var="gtmCurrency" value=$oView->getActCurrency()}]
|
||||||
|
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
||||||
|
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
|
||||||
|
|
||||||
|
<script>
|
||||||
|
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||||
|
|
||||||
|
let itemCategories = '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]no category[{/if}]'.split('/');
|
||||||
|
|
||||||
|
</script>
|
||||||
|
[{/strip}]
|
0
Application/views/ga4/begin_checkout.tpl
Executable file
0
Application/views/ga4/begin_checkout.tpl
Executable file
0
Application/views/ga4/generate_lead.tpl
Executable file
0
Application/views/ga4/generate_lead.tpl
Executable file
0
Application/views/ga4/login.tpl
Executable file
0
Application/views/ga4/login.tpl
Executable file
36
Application/views/ga4/purchase.tpl
Executable file
36
Application/views/ga4/purchase.tpl
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
[{strip}]
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
dataLayer.push({ ecommerce: null });
|
||||||
|
dataLayer.push({
|
||||||
|
[{assign var="oBasket" value=$order->getBasket()}]
|
||||||
|
[{assign var="iVat" value=0}]
|
||||||
|
|
||||||
|
'event':'purchase',
|
||||||
|
'ecommerce':{
|
||||||
|
'purchase':{
|
||||||
|
'actionField':{
|
||||||
|
'id': [{$order->getFieldData('oxordernr')}],
|
||||||
|
'ordernr': [{$order->getFieldData('oxtotalordersum')}],
|
||||||
|
'tax': [{$order->d3GetSumOrderVat()}],
|
||||||
|
'shipping': [{$order->getFieldData('oxdelcost')}],
|
||||||
|
'currency': "[{$order->getFieldData('oxcurrency')}]"
|
||||||
|
},
|
||||||
|
'products':[
|
||||||
|
[{foreach from=$order->getOrderArticles() item=listItem}]
|
||||||
|
[{assign var="orderArticle" value=$listItem->getArticle()}]
|
||||||
|
{
|
||||||
|
'item_id': "[{$listItem->getFieldData('oxartnum')}]",
|
||||||
|
'item_name': "[{$listItem->getFieldData('oxtitle')}]",
|
||||||
|
'currency': "[{$order->getFieldData('oxcurrency')}]",
|
||||||
|
'articleVat': [{$orderArticle->getArticleVat()}],
|
||||||
|
'price': [{$orderArticle->getBasePrice()}],
|
||||||
|
'quantity': [{$listItem->getFieldData('oxamount')}]
|
||||||
|
},
|
||||||
|
[{/foreach}]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
[{/strip}]
|
0
Application/views/ga4/remove_from_cart.tpl
Executable file
0
Application/views/ga4/remove_from_cart.tpl
Executable file
@ -13,13 +13,12 @@
|
|||||||
'search_term': '[{$searchparamforhtml}]',
|
'search_term': '[{$searchparamforhtml}]',
|
||||||
'items': [
|
'items': [
|
||||||
[{foreach from=$gtmProducts name="gtmProducts" item="gtmProduct"}]
|
[{foreach from=$gtmProducts name="gtmProducts" item="gtmProduct"}]
|
||||||
[{assign var="d3PriceObject" value=$gtmProduct->getPrice()}]
|
|
||||||
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
||||||
[{if !$gtmCategory}][{assign var="gtmCategory" value=$gtmProduct->getCategory()}][{/if}]
|
[{if !$gtmCategory}][{assign var="gtmCategory" value=$gtmProduct->getCategory()}][{/if}]
|
||||||
{
|
{
|
||||||
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
|
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
|
||||||
'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]',
|
'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]',
|
||||||
'price': [{$d3PriceObject->getPrice()}],
|
'price': [{$gtmProduct->oxarticles__oxprice->value|default:'0'}],
|
||||||
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||||
'item_category': '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]-[{/if}]',
|
'item_category': '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]-[{/if}]',
|
||||||
'quantity': 1
|
'quantity': 1
|
||||||
|
0
Application/views/ga4/select_content.tpl
Executable file
0
Application/views/ga4/select_content.tpl
Executable file
0
Application/views/ga4/select_item.tpl
Executable file
0
Application/views/ga4/select_item.tpl
Executable file
0
Application/views/ga4/select_promotion.tpl
Executable file
0
Application/views/ga4/select_promotion.tpl
Executable file
0
Application/views/ga4/sign_up.tpl
Executable file
0
Application/views/ga4/sign_up.tpl
Executable file
0
Application/views/ga4/view_cart.tpl
Executable file
0
Application/views/ga4/view_cart.tpl
Executable file
26
Application/views/ga4/view_item.tpl
Normal file
26
Application/views/ga4/view_item.tpl
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[{strip}]
|
||||||
|
[{* variable $gtmProduct is passed from parent tempalte *}]
|
||||||
|
[{assign var="gtmCurrency" value=$oView->getActCurrency()}]
|
||||||
|
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
||||||
|
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
|
||||||
|
<script type="text/javascript">
|
||||||
|
dataLayer.push({ecommerce: null});
|
||||||
|
dataLayer.push({
|
||||||
|
'event':'GA4_event',
|
||||||
|
'event_name': 'view_item',
|
||||||
|
'ecommerce': {
|
||||||
|
'items': [
|
||||||
|
{
|
||||||
|
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
|
||||||
|
'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]',
|
||||||
|
'item_variant': '[{if $gtmProduct->oxarticles__oxvarselect->value}][{$gtmProduct->oxarticles__oxvarselect->value}][{/if}]',
|
||||||
|
'price': [{$gtmProduct->oxarticles__oxprice->value|default:0}],
|
||||||
|
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||||
|
'item_category': '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]-[{/if}]',
|
||||||
|
'quantity': '1'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
[{/strip}]
|
@ -1,5 +1,4 @@
|
|||||||
[{$smarty.block.parent}]
|
[{assign var="gtmProducts" value=$products}]
|
||||||
[{assign var="gtmProducts" value=$oView->getArticleList()}]
|
|
||||||
|
|
||||||
[{assign var="breadCrumb" value=''}]
|
[{assign var="breadCrumb" value=''}]
|
||||||
|
|
||||||
@ -16,13 +15,12 @@
|
|||||||
'item_list_name': '[{foreach from=$oView->getBreadCrumb() item=sCrum}][{if $sCrum.title }][{$breadCrumb|cat:$sCrum.title|cat:" > "}][{/if}][{/foreach}]',
|
'item_list_name': '[{foreach from=$oView->getBreadCrumb() item=sCrum}][{if $sCrum.title }][{$breadCrumb|cat:$sCrum.title|cat:" > "}][{/if}][{/foreach}]',
|
||||||
'items': [
|
'items': [
|
||||||
[{foreach from=$gtmProducts name="gtmProducts" item="gtmProduct"}]
|
[{foreach from=$gtmProducts name="gtmProducts" item="gtmProduct"}]
|
||||||
[{assign var="d3PriceObject" value=$gtmProduct->getPrice()}]
|
|
||||||
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
||||||
[{if !$gtmCategory}][{assign var="gtmCategory" value=$gtmProduct->getCategory()}][{/if}]
|
[{if !$gtmCategory}][{assign var="gtmCategory" value=$gtmProduct->getCategory()}][{/if}]
|
||||||
{
|
{
|
||||||
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
|
'item_id': '[{$gtmProduct->getFieldData("oxartnum")}]',
|
||||||
'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]',
|
'item_name': '[{$gtmProduct->getFieldData("oxtitle")}]',
|
||||||
'price': [{$d3PriceObject->getPrice()}],
|
'price': [{$gtmProduct->oxarticles__oxprice->value|default:'0'}],
|
||||||
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
'item_brand': '[{if $gtmManufacturer}][{$gtmManufacturer->oxmanufacturers__oxtitle->value}][{/if}]',
|
||||||
'item_category': '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]-[{/if}]',
|
'item_category': '[{if $gtmCategory}][{$gtmCategory->getLink()|parse_url:5|ltrim:"/"|rtrim:"/"}][{else}]-[{/if}]',
|
||||||
'quantity': 1
|
'quantity': 1
|
||||||
|
0
Application/views/ga4/view_promotion.tpl
Executable file
0
Application/views/ga4/view_promotion.tpl
Executable file
51
CHANGELOG.md
51
CHANGELOG.md
@ -4,55 +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).
|
||||||
|
|
||||||
## [1.9.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.8.0...1.9.0) - 2023-06-19
|
|
||||||
### Changed
|
|
||||||
- add_to_cart event template-structure
|
|
||||||
|
|
||||||
## [1.8.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.7.0...1.8.0) - 2023-05-31
|
## [2.2.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.2.1...2.2.2) - 2023-02-22
|
||||||
### Fixed
|
### Fixed
|
||||||
- bug in explicit manager selection
|
- price formatting in view_cart
|
||||||
|
|
||||||
## [1.7.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.6.0...1.7.0) - 2023-05-31
|
## [2.2.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.1.1...2.2.1) - 2023-02-21
|
||||||
### Added
|
### Added
|
||||||
- extended call to read the technical documentation
|
- cookie handling
|
||||||
### Changed
|
|
||||||
- block-extension for view_item_list
|
|
||||||
- way of getting list-articles in view_item_list
|
|
||||||
|
|
||||||
## [1.6.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.5.0...1.6.0) - 2023-05-30
|
## [2.1.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.1...2.1.1) - 2023-01-27
|
||||||
### Added
|
|
||||||
- possibility to choose between consentmanager && usercentrics
|
|
||||||
- position to block extension
|
|
||||||
### Changed
|
|
||||||
- genuine code cleanup
|
|
||||||
- usercentrics includation script
|
|
||||||
|
|
||||||
## [1.5.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.4.0...1.5.0) - 2023-05-23
|
|
||||||
### Added
|
|
||||||
- additional settings to explicitly indicate that consentmanager is used
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- unnecessary converting of int to str
|
- add missing class import
|
||||||
- missing PriceObject-bug
|
|
||||||
### Changed
|
|
||||||
- genuine code cleanup
|
|
||||||
|
|
||||||
## [1.4.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.3.1...1.4.0) - 2023-05-02
|
## [2.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/2.0...2.1) - 2023-01-27
|
||||||
### Added
|
### Added
|
||||||
- "OXID Cookie Management powered by usercentrics" compatibility
|
- block section for add_to_basket js
|
||||||
- usercentrics defined script attributes
|
- template block order positions
|
||||||
- cookie-manager evaluation
|
|
||||||
### Changed
|
|
||||||
- genuine clean up of base-js-files
|
|
||||||
|
|
||||||
## [1.3.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.2.1...1.3.1) - 2023-03-17
|
## [2.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.1...2.0) - 2023-01-20
|
||||||
### Added
|
### Added
|
||||||
- Aggrosoft-Cookie-Consent compatibility
|
- using of ContainerFactory in ViewConfig
|
||||||
### Fixed
|
|
||||||
- wrong function for pageview on thankyou page
|
|
||||||
|
|
||||||
## [1.2.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.2...1.2.1) - 2023-02-22
|
## [1.2.1](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.2...1.2.1) - 2023-02-22
|
||||||
### Fixed
|
### Fixed
|
||||||
- price formatting in view_cart
|
- price formatting view_cart
|
||||||
|
|
||||||
## [1.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.1...1.2) - 2023-02-01
|
## [1.2](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.1...1.2) - 2023-02-01
|
||||||
### Added
|
### Added
|
||||||
@ -66,6 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Changed
|
### Changed
|
||||||
- switched price formatting
|
- switched price formatting
|
||||||
|
|
||||||
## [1.0](https://git.d3data.de/D3Public/GoogleAnalytics4/compare/1.0...1.0) - 2023-01-20
|
|
||||||
|
## [1.0](https://git.d3data.de/D3Public/GoogleAnalytics4/releases/tag/1.0) - 2023-01-20
|
||||||
### Added
|
### Added
|
||||||
- publication of app features
|
- publication of app features
|
@ -1,19 +1,19 @@
|
|||||||
# Technische Doku
|
## Technische Doku
|
||||||
## GA4 Events / Customizing
|
### GA4 Events / Customizing
|
||||||
FĂĽr alle implementierten GA4 Events existieren Templates unter `source/modules/d3/googleanalytics4/Application/views/ga4/`, dabei entspricht der Dateiname dem Eventnamen in GA4.
|
FĂĽr alle implementierten GA4 Events existieren Templates unter `source/modules/d3/googleanalytics4/Application/views/ga4/`, dabei entspricht der Dateiname dem Eventnamen in GA4.
|
||||||
Die Einbindung dieser Event-Templates erfolgt über TPL-Blöcke unter `source/modules/d3/googleanalytics4/Application/views/blocks/`.
|
Die Einbindung dieser Event-Templates erfolgt über TPL-Blöcke unter `source/modules/d3/googleanalytics4/Application/views/blocks/`.
|
||||||
*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/
|
||||||
|
|
||||||
## 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
|
||||||
- Blockname: search_results
|
- Blockname: search_results
|
||||||
- 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: d3Ga4_view_item_list (muss hinzugefĂĽgt werden)
|
||||||
- Datei: page/list/list.tpl
|
- Datei: widget/product/list.tpl
|
||||||
- GA4 Event: view_item_list
|
- GA4 Event: view_item_list
|
||||||
- Detailseite
|
- Detailseite
|
||||||
- Blockname: details_productmain_title
|
- Blockname: details_productmain_title
|
||||||
@ -32,7 +32,7 @@ Für den geregelten Ablauf sind folgende Blöcke nötig:
|
|||||||
- Datei: page/checkout/thankyou.tpl
|
- Datei: page/checkout/thankyou.tpl
|
||||||
- GA4 Event: purchase
|
- 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.
|
||||||
|
|
||||||
Bei jedem Seitenaufruf wird die Datenschicht mit einigen wenigen Infos erstellt, die man zum reinen Erfassen der Seitenaufrufe benötigt:
|
Bei jedem Seitenaufruf wird die Datenschicht mit einigen wenigen Infos erstellt, die man zum reinen Erfassen der Seitenaufrufe benötigt:
|
||||||
@ -44,25 +44,8 @@ Bei jedem Seitenaufruf wird die Datenschicht mit einigen wenigen Infos erstellt,
|
|||||||
|
|
||||||
Alle fĂĽr Ecommerce Tracking relevanten Daten werden mit speziellen Ecommerce Events in die Datenschicht eingefĂĽgt.
|
Alle fĂĽr Ecommerce Tracking relevanten Daten werden mit speziellen Ecommerce Events in die Datenschicht eingefĂĽgt.
|
||||||
|
|
||||||
## Cookie-Handling
|
### Cookie-Handling
|
||||||
Sie nutzen einen eigenen, als Modul im Shop installierten, Cookie-manager?
|
Sie nutzen einen eigenen, als Modul im Shop installierten, Cookie-manager?
|
||||||
Dann tragen Sie in den Folgeeinstellungen unter "Cookie Manager Einstellungen",
|
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. Und aktivieren Sie diese Weiche,
|
||||||
Aktivieren Sie anschlieĂźend diese Weiche. Setzen Sie den Haken bei "Eigenen Cookie Manager nutzen?".
|
indem Sie den Haken bei "Eigenen Cookie Manager nutzen?" setzen.
|
||||||
|
|
||||||
### UnterstĂĽtzung fĂĽr
|
|
||||||
- [aggrosoft - oxid-cookie-compliance](https://github.com/aggrosoft/oxid-cookie-compliance)
|
|
||||||
- https://github.com/aggrosoft/oxid-cookie-compliance
|
|
||||||
- die entsprechend gewählte Kategorie in den Moduleinstellungen des 'Google Analytics 4' unter
|
|
||||||
```Einstell. > Cookie Manager Einstellungen > Cookie-ID``` eintragen
|
|
||||||
- Default-Werte sind entweder ```ANALYTICS``` oder ```MARKETING```. Bitte auf die GroĂźschreibung achten.
|
|
||||||
|
|
||||||
- [Netensio - Cookie Consent Manager](https://www.netensio.de/oxid-eshop-module/cookie-consent-manager-fuer-oxid-eshop.html)
|
|
||||||
- Modul entsprechend konfigurieren
|
|
||||||
- CookieID des angelegten Cookies in den Moduleinstellungen des 'Google Analytics 4' unter
|
|
||||||
```Einstell. > Cookie Manager Einstellungen > Cookie-ID``` eintragen
|
|
||||||
|
|
||||||
- [OXID Cookie Management powered by usercentrics](https://docs.oxid-esales.com/modules/usercentrics/de/latest/einfuehrung.html)
|
|
||||||
- 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
|
|
||||||
```Einstell. > Cookie Manager Einstellungen > Cookie-ID``` eintragen
|
|
@ -13,160 +13,54 @@
|
|||||||
namespace D3\GoogleAnalytics4\Modules\Core;
|
namespace D3\GoogleAnalytics4\Modules\Core;
|
||||||
|
|
||||||
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
||||||
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
|
||||||
{
|
{
|
||||||
|
|
||||||
// Google Tag Manager Container ID
|
// Google Tag Manager Container ID
|
||||||
private $sContainerId = null;
|
private $sContainerId = null;
|
||||||
private $sCookieManagerType = null;
|
|
||||||
|
|
||||||
public function getGtmContainerId()
|
public function getGtmContainerId()
|
||||||
{
|
{
|
||||||
if ($this->sContainerId === null)
|
if ($this->sContainerId === null)
|
||||||
{
|
{
|
||||||
$this->sContainerId = $this->getConfig()->getConfigParam('d3_gtm_sContainerID');
|
$this->sContainerId = ContainerFactory::getInstance()
|
||||||
|
->getContainer()
|
||||||
|
->get(ModuleSettingBridgeInterface::class)
|
||||||
|
->get('d3_gtm_sContainerID', 'd3googleanalytics4');
|
||||||
}
|
}
|
||||||
return $this->sContainerId;
|
return $this->sContainerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @param $sCookieID
|
||||||
*/
|
|
||||||
public function getModuleSettingExplicitManagerSelectValue()
|
|
||||||
{
|
|
||||||
return Registry::getConfig()->getConfigParam('d3_gtm_settings_HAS_STD_MANAGER');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return false|mixed
|
|
||||||
*/
|
|
||||||
public function getExplicitManager()
|
|
||||||
{
|
|
||||||
$sManagerName = $this->getModuleSettingExplicitManagerSelectValue();
|
|
||||||
return $sManagerName === "NONE" ? false : $sManagerName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getCookieManagerType()
|
|
||||||
{
|
|
||||||
if ($this->sCookieManagerType === null)
|
|
||||||
{
|
|
||||||
$this->sCookieManagerType = false;
|
|
||||||
|
|
||||||
$allowedManagerTypes = [
|
|
||||||
'net_cookie_manager',
|
|
||||||
'agcookiecompliance',
|
|
||||||
'oxps_usercentrics'
|
|
||||||
];
|
|
||||||
|
|
||||||
foreach ($allowedManagerTypes as $type) {
|
|
||||||
if ($this->isModuleActive($type)) {
|
|
||||||
$this->sCookieManagerType = $type;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->sCookieManagerType === false and $this->getExplicitManager()){
|
|
||||||
return "externalService";
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->sCookieManagerType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function shallUseOwnCookieManager()
|
public function D3blAcceptedCookie($sCookieID)
|
||||||
{
|
{
|
||||||
return (bool) Registry::getConfig()->getConfigParam('d3_gtm_settings_hasOwnCookieManager');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function D3blShowGtmScript()
|
|
||||||
{
|
|
||||||
/** @var Config $oConfig */
|
|
||||||
$oConfig = Registry::getConfig();
|
|
||||||
|
|
||||||
// No Cookie Manager in use
|
|
||||||
if (false === $this->shallUseOwnCookieManager()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sCookieID = $oConfig->getConfigParam('d3_gtm_settings_cookieName');
|
|
||||||
|
|
||||||
// Netensio Cookie Manager
|
|
||||||
if ($this->getCookieManagerType() == "net_cookie_manager") {
|
|
||||||
$oSession = Registry::getSession();
|
$oSession = Registry::getSession();
|
||||||
$aCookies = $oSession->getVariable("aCookieSel");
|
$aCookies = $oSession->getVariable("aCookieSel");
|
||||||
|
|
||||||
return (!is_null($aCookies) && is_array($aCookies) && array_key_exists($sCookieID, $aCookies) && $aCookies[$sCookieID] == "1");
|
if (!is_null($aCookies) && is_array($aCookies) && array_key_exists($sCookieID, $aCookies) && $aCookies[$sCookieID] == "1") {
|
||||||
}
|
|
||||||
|
|
||||||
// Aggrosoft Cookie Consent
|
|
||||||
if ($this->getCookieManagerType() == "agcookiecompliance") {
|
|
||||||
if (method_exists($this, "isCookieCategoryEnabled")) {
|
|
||||||
return $this->isCookieCategoryEnabled($sCookieID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// UserCentrics or consentmanager
|
|
||||||
if ($this->getCookieManagerType() === "oxps_usercentrics" or $this->getCookieManagerType() === 'externalService') {
|
|
||||||
// Always needs the script-tags delivered to the DOM.
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get additional attributes for script tags.
|
|
||||||
* This is especially important for UserCentrics.
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getGtmScriptAttributes()
|
|
||||||
{
|
|
||||||
$oConfig = Registry::getConfig();
|
|
||||||
|
|
||||||
if (false === $this->shallUseOwnCookieManager()){
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->getCookieManagerType() === "oxps_usercentrics" or $this->getExplicitManager() === 'USERCENTRICS') {
|
|
||||||
$sCookieId = $oConfig->getConfigParam('d3_gtm_settings_cookieName');
|
|
||||||
|
|
||||||
if ($sCookieId) {
|
|
||||||
return 'data-usercentrics="' . $sCookieId . '" type="text/plain" async=""';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->getCookieManagerType() === "externalService" and $this->getExplicitManager() === 'CONSENTMANAGER') {
|
|
||||||
$sCookieId = $oConfig->getConfigParam('d3_gtm_settings_cookieName');
|
|
||||||
|
|
||||||
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"
|
|
||||||
';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
private $blGA4enabled = null;
|
private $blGA4enabled = null;
|
||||||
|
|
||||||
public function isGA4enabled()
|
public function isGA4enabled()
|
||||||
{
|
{
|
||||||
if ($this->blGA4enabled === null)
|
if ($this->blGA4enabled === null)
|
||||||
{
|
{
|
||||||
$this->sContainerId = $this->getConfig()->getConfigParam('d3_gtm_blEnableGA4');
|
$this->sContainerId = ContainerFactory::getInstance()
|
||||||
|
->getContainer()
|
||||||
|
->get(ModuleSettingBridgeInterface::class)
|
||||||
|
->get('d3_gtm_blEnableGA4', 'd3googleanalytics4');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->blGA4enabled;
|
return $this->blGA4enabled;
|
||||||
@ -181,7 +75,7 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
/** @var FrontendController $oShop */
|
/** @var FrontendController $oShop */
|
||||||
$oUser = $oConfig->getUser();
|
$oUser = $oConfig->getUser();
|
||||||
|
|
||||||
$cl = $this->getTopActiveClassName();
|
$cl = $this->getTopActionClassName();
|
||||||
$aPageTypes = [
|
$aPageTypes = [
|
||||||
"content" => "cms",
|
"content" => "cms",
|
||||||
"details" => "product",
|
"details" => "product",
|
||||||
@ -192,7 +86,6 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
"payment" => "checkout",
|
"payment" => "checkout",
|
||||||
"order" => "checkout",
|
"order" => "checkout",
|
||||||
"thankyou" => "checkout",
|
"thankyou" => "checkout",
|
||||||
"start" => "start",
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$dataLayer = [
|
$dataLayer = [
|
||||||
|
@ -23,17 +23,13 @@ Dieses Paket erfordert einen mit Composer installierten OXID eShop in einer in d
|
|||||||
Ă–ffnen Sie eine Kommandozeile und navigieren Sie zum Stammverzeichnis des Shops (Elternverzeichnis von source und vendor). FĂĽhren Sie den folgenden Befehl aus. Passen Sie die Pfadangaben an Ihre Installationsumgebung an.
|
Ă–ffnen Sie eine Kommandozeile und navigieren Sie zum Stammverzeichnis des Shops (Elternverzeichnis von source und vendor). FĂĽhren Sie den folgenden Befehl aus. Passen Sie die Pfadangaben an Ihre Installationsumgebung an.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
php composer require d3/google-analytics4:^1
|
php composer require d3/google-analytics4:^2
|
||||||
```
|
```
|
||||||
|
|
||||||
Sofern nötig, bestätigen Sie bitte, dass Sie `package-name` erlauben, Code auszuführen.
|
Sofern nötig, bestätigen Sie bitte, dass Sie `package-name` erlauben, Code auszuführen.
|
||||||
|
|
||||||
Aktivieren Sie das Modul im Shopadmin unter "Erweiterungen -> Module".
|
Aktivieren Sie das Modul im Shopadmin unter "Erweiterungen -> Module".
|
||||||
|
|
||||||
> ### Wichtig!
|
|
||||||
> Bitte stellen Sie sicher, dass die nötigen Blöcke im OXID-Shop zur Verfügung stehen.
|
|
||||||
> Lesen Sie mehr in der [technischen Doku](./Docs/README.md) unter "Blöcke"!
|
|
||||||
|
|
||||||
## Verwendung
|
## Verwendung
|
||||||
### Grundfunktionalität
|
### Grundfunktionalität
|
||||||
Nach erfolgreicher Installation finden Sie in Ihrem Shop-Admin unter "Erweiterungen > Module"
|
Nach erfolgreicher Installation finden Sie in Ihrem Shop-Admin unter "Erweiterungen > Module"
|
||||||
@ -81,6 +77,5 @@ Die vollständigen Copyright- und Lizenzinformationen entnehmen Sie bitte der [L
|
|||||||
Zu diesem Modul haben beigetragen:
|
Zu diesem Modul haben beigetragen:
|
||||||
|
|
||||||
- [Marat Bedoev](https://github.com/vanilla-thunder)
|
- [Marat Bedoev](https://github.com/vanilla-thunder)
|
||||||
- [Christoph Stäblein [gn2]](https://github.com/reyneke-vosz)
|
|
||||||
|
|
||||||
Vielen Dank.
|
Vielen Dank.
|
@ -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": {
|
||||||
|
63
metadata.php
63
metadata.php
@ -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>
|
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.9.0',
|
'version' => '2.2.2',
|
||||||
'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/',
|
||||||
@ -26,17 +26,30 @@ $aModule = [
|
|||||||
],
|
],
|
||||||
'templates' => [
|
'templates' => [
|
||||||
// GA4 events
|
// GA4 events
|
||||||
|
'ga4_add_payment_info.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_payment_info.tpl',
|
||||||
|
'add_shipping_info.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_shipping_info.tpl',
|
||||||
'ga4_add_to_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_to_cart.tpl',
|
'ga4_add_to_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/add_to_cart.tpl',
|
||||||
|
'ga4_begin_checkout.tpl' => 'd3/googleanalytics4/Application/views/ga4/begin_checkout.tpl',
|
||||||
|
'ga4_generate_lead.tpl' => 'd3/googleanalytics4/Application/views/ga4/generate_lead.tpl',
|
||||||
|
'ga4_login.tpl' => 'd3/googleanalytics4/Application/views/ga4/login.tpl',
|
||||||
|
'ga4_purchase.tpl' => 'd3/googleanalytics4/Application/views/ga4/purchase.tpl',
|
||||||
|
'ga4_remove_from_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/remove_from_cart.tpl',
|
||||||
'ga4_search.tpl' => 'd3/googleanalytics4/Application/views/ga4/search.tpl',
|
'ga4_search.tpl' => 'd3/googleanalytics4/Application/views/ga4/search.tpl',
|
||||||
|
'ga4_select_content.tpl' => 'd3/googleanalytics4/Application/views/ga4/select_content.tpl',
|
||||||
|
'ga4_select_item.tpl' => 'd3/googleanalytics4/Application/views/ga4/select_item.tpl',
|
||||||
|
'ga4_select_promotion.tpl' => 'd3/googleanalytics4/Application/views/ga4/select_promotion.tpl',
|
||||||
|
'ga4_sign_up.tpl' => 'd3/googleanalytics4/Application/views/ga4/sign_up.tpl',
|
||||||
|
'ga4_view_cart.tpl' => 'd3/googleanalytics4/Application/views/ga4/view_cart.tpl',
|
||||||
|
'ga4_view_item.tpl' => 'd3/googleanalytics4/Application/views/ga4/view_item.tpl',
|
||||||
'ga4_view_item_list.tpl' => 'd3/googleanalytics4/Application/views/ga4/view_item_list.tpl',
|
'ga4_view_item_list.tpl' => 'd3/googleanalytics4/Application/views/ga4/view_item_list.tpl',
|
||||||
|
'ga4_view_promotion.tpl' => 'd3/googleanalytics4/Application/views/ga4/view_promotion.tpl',
|
||||||
],
|
],
|
||||||
'blocks' => [
|
'blocks' => [
|
||||||
// tag manager js
|
// tag manager js
|
||||||
[
|
[
|
||||||
'template' => 'layout/base.tpl',
|
'template' => 'layout/base.tpl',
|
||||||
'block' => 'head_meta_robots',
|
'block' => 'head_meta_robots',
|
||||||
'file' => '/Application/views/blocks/_gtm_js.tpl',
|
'file' => '/Application/views/blocks/_gtm_js.tpl'
|
||||||
'position' => 150
|
|
||||||
],
|
],
|
||||||
// tag manager nojs
|
// tag manager nojs
|
||||||
[
|
[
|
||||||
@ -44,11 +57,17 @@ $aModule = [
|
|||||||
'block' => 'theme_svg_icons',
|
'block' => 'theme_svg_icons',
|
||||||
'file' => '/Application/views/blocks/_gtm_nojs.tpl'
|
'file' => '/Application/views/blocks/_gtm_nojs.tpl'
|
||||||
],
|
],
|
||||||
|
// widget_product_list
|
||||||
|
[
|
||||||
|
'template' => 'widget/product/list.tpl',
|
||||||
|
'block' => 'widget_product_list',
|
||||||
|
'file' => '/Application/views/blocks/widget_product_list.tpl'
|
||||||
|
],
|
||||||
// details
|
// details
|
||||||
[
|
[
|
||||||
'template' => 'page/details/inc/productmain.tpl',
|
'template' => 'page/details/inc/productmain.tpl',
|
||||||
'block' => 'details_productmain_title',
|
'block' => 'details_productmain_title',
|
||||||
'file' => '/Application/views/blocks/view_item.tpl',
|
'file' => '/Application/views/blocks/detail.tpl',
|
||||||
'position' => 150
|
'position' => 150
|
||||||
],
|
],
|
||||||
// checkout
|
// checkout
|
||||||
@ -57,6 +76,31 @@ $aModule = [
|
|||||||
'block' => 'checkout_basket_main',
|
'block' => 'checkout_basket_main',
|
||||||
'file' => '/Application/views/blocks/checkout_s1.tpl'
|
'file' => '/Application/views/blocks/checkout_s1.tpl'
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'template' => 'form/user_checkout_change.tpl',
|
||||||
|
'block' => 'user_checkout_change',
|
||||||
|
'file' => '/Application/views/blocks/checkout_s2.tpl'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'template' => 'form/user_checkout_register.tpl',
|
||||||
|
'block' => 'user_checkout_register',
|
||||||
|
'file' => '/Application/views/blocks/checkout_s2.tpl'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'template' => 'form/user_checkout_noregister.tpl',
|
||||||
|
'block' => 'user_checkout_noregister',
|
||||||
|
'file' => '/Application/views/blocks/checkout_s2.tpl'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'template' => 'page/checkout/payment.tpl',
|
||||||
|
'block' => 'checkout_payment_main',
|
||||||
|
'file' => '/Application/views/blocks/checkout_s3.tpl'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'template' => 'page/checkout/order.tpl',
|
||||||
|
'block' => 'checkout_order_main',
|
||||||
|
'file' => '/Application/views/blocks/checkout_s4.tpl'
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'template' => 'page/checkout/thankyou.tpl',
|
'template' => 'page/checkout/thankyou.tpl',
|
||||||
'block' => 'checkout_thankyou_main',
|
'block' => 'checkout_thankyou_main',
|
||||||
@ -65,8 +109,8 @@ $aModule = [
|
|||||||
// Lists
|
// Lists
|
||||||
// view_item_list
|
// view_item_list
|
||||||
[
|
[
|
||||||
'template' => 'page/list/list.tpl',
|
'template' => 'widget/product/list.tpl',
|
||||||
'block' => 'page_list_productlist',
|
'block' => 'd3Ga4_view_item_list',
|
||||||
'file' => '/Application/views/ga4/view_item_list.tpl',
|
'file' => '/Application/views/ga4/view_item_list.tpl',
|
||||||
'position' => 150
|
'position' => 150
|
||||||
],
|
],
|
||||||
@ -121,12 +165,5 @@ $aModule = [
|
|||||||
'value' => 'example',
|
'value' => 'example',
|
||||||
'position' => 999
|
'position' => 999
|
||||||
],
|
],
|
||||||
[
|
|
||||||
'group' => 'd3_gtm_settings_cookiemanager',
|
|
||||||
'name' => 'd3_gtm_settings_HAS_STD_MANAGER',
|
|
||||||
'type' => 'select',
|
|
||||||
'value' => 'none',
|
|
||||||
'constraints' => 'NONE|CONSENTMANAGER|USERCENTRICS',
|
|
||||||
],
|
|
||||||
]
|
]
|
||||||
];
|
];
|
Reference in New Issue
Block a user