genuine cleaning off of unnecessary files (prevent confusion)
This commit is contained in:
parent
2f6fd8a31c
commit
5fe656988c
@ -1,66 +0,0 @@
|
|||||||
[{$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}]
|
|
||||||
*}]
|
|
@ -1,5 +0,0 @@
|
|||||||
[{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}]
|
|
@ -1,18 +0,0 @@
|
|||||||
[{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}]
|
|
@ -1,9 +0,0 @@
|
|||||||
<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}]
|
|
@ -1,9 +0,0 @@
|
|||||||
<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}]
|
|
@ -1,25 +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->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,37 +0,0 @@
|
|||||||
[{$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}]
|
|
@ -1,36 +0,0 @@
|
|||||||
[{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}]
|
|
68
metadata.php
68
metadata.php
@ -26,23 +26,11 @@ $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',
|
// article-details // view_item
|
||||||
'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.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
|
||||||
@ -57,55 +45,26 @@ $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
|
|
||||||
[
|
|
||||||
'template' => 'page/details/inc/productmain.tpl',
|
|
||||||
'block' => 'details_productmain_title',
|
|
||||||
'file' => '/Application/views/blocks/detail.tpl',
|
|
||||||
'position' => 150
|
|
||||||
],
|
|
||||||
// checkout
|
// checkout
|
||||||
|
// view_cart
|
||||||
[
|
[
|
||||||
'template' => 'page/checkout/basket.tpl',
|
'template' => 'page/checkout/basket.tpl',
|
||||||
'block' => 'checkout_basket_main',
|
'block' => 'checkout_basket_main',
|
||||||
'file' => '/Application/views/blocks/checkout_s1.tpl'
|
'file' => '/Application/views/blocks/checkout_s1.tpl'
|
||||||
],
|
],
|
||||||
[
|
// purchase
|
||||||
'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',
|
||||||
'file' => '/Application/views/blocks/checkout_s5.tpl'
|
'file' => '/Application/views/blocks/checkout_s5.tpl'
|
||||||
],
|
],
|
||||||
|
// add_to_cart
|
||||||
|
[
|
||||||
|
'template' => 'page/details/inc/productmain.tpl',
|
||||||
|
'block' => 'details_productmain_tobasket',
|
||||||
|
'file' => '/Application/views/ga4/add_to_cart.tpl',
|
||||||
|
'position' => 150
|
||||||
|
],
|
||||||
// Lists
|
// Lists
|
||||||
// view_item_list
|
// view_item_list
|
||||||
[
|
[
|
||||||
@ -120,13 +79,6 @@ $aModule = [
|
|||||||
'block' => 'search_results',
|
'block' => 'search_results',
|
||||||
'file' => '/Application/views/ga4/search.tpl',
|
'file' => '/Application/views/ga4/search.tpl',
|
||||||
'position' => 150
|
'position' => 150
|
||||||
],
|
|
||||||
// add_to_cart
|
|
||||||
[
|
|
||||||
'template' => 'page/details/inc/productmain.tpl',
|
|
||||||
'block' => 'details_productmain_tobasket',
|
|
||||||
'file' => '/Application/views/ga4/add_to_cart.tpl',
|
|
||||||
'position' => 150
|
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'settings' => [
|
'settings' => [
|
||||||
|
Loading…
Reference in New Issue
Block a user