[working-state] rebuilding meta structure
This commit is contained in:
parent
71b743ddcc
commit
0f15df8364
@ -1,7 +1,8 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{strip}]
|
||||
<script>
|
||||
[{block name="d3_ga4_purchase_block"}]
|
||||
[{capture assign=d3_ga4_purchase}]
|
||||
[{strip}]
|
||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||
[{assign var="gtmOrder" value=$oView->getOrder()}]
|
||||
[{assign var="gtmBasket" value=$oView->getBasket()}]
|
||||
@ -47,5 +48,7 @@
|
||||
]
|
||||
}
|
||||
})
|
||||
</script>
|
||||
[{/strip}]
|
||||
[{/strip}]
|
||||
[{/capture}]
|
||||
[{oxscript add=$d3_ga4_purchase}]
|
||||
[{/block}]
|
@ -5,7 +5,9 @@
|
||||
[{assign var="d3BasketPrice" value=$oxcmp_basket->getPrice()}]
|
||||
[{assign var='gtmCartArticles' value=$oView->getBasketArticles()}]
|
||||
|
||||
[{strip}][{capture assign=d3_ga4_view_cart}]
|
||||
[{block name="d3_ga4_view_cart_block"}]
|
||||
[{capture assign=d3_ga4_view_cart}]
|
||||
[{strip}]
|
||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||
dataLayer.push({
|
||||
'event': 'view_cart',
|
||||
@ -40,5 +42,7 @@
|
||||
]
|
||||
}
|
||||
});
|
||||
[{/capture}][{/strip}]
|
||||
[{oxscript add=$d3_ga4_view_cart}]
|
||||
[{/strip}]
|
||||
[{/capture}]
|
||||
[{oxscript add=$d3_ga4_view_cart}]
|
||||
[{/block}]
|
@ -3,7 +3,9 @@
|
||||
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
|
||||
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
||||
|
||||
<script>
|
||||
[{block name="d3_ga4_view_item_block"}]
|
||||
[{capture assign=d3_ga4_view_item}]
|
||||
[{strip}]
|
||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||
|
||||
dataLayer.push({
|
||||
@ -30,4 +32,7 @@
|
||||
]
|
||||
}
|
||||
});
|
||||
</script>
|
||||
[{/strip}]
|
||||
[{/capture}]
|
||||
[{oxscript add=$d3_ga4_view_item}]
|
||||
[{/block}]
|
@ -6,8 +6,9 @@
|
||||
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
|
||||
[{assign var="gtmCategory" value=$gtmProduct->getCategory()}]
|
||||
|
||||
[{capture assign=d3_ga4_add_to_cart}]
|
||||
[{block name="d3_ga4_add_to_basket"}]
|
||||
[{block name="d3_ga4_add_to_cart_block"}]
|
||||
[{capture assign=d3_ga4_add_to_cart}]
|
||||
[{strip}]
|
||||
$("#toBasket").click(function(event) {
|
||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||
|
||||
@ -43,6 +44,7 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
[{/block}]
|
||||
[{/strip}]
|
||||
[{/capture}]
|
||||
[{oxscript add=$d3_ga4_add_to_cart}]
|
||||
[{oxscript add=$d3_ga4_add_to_cart}]
|
||||
[{/block}]
|
@ -1,10 +1,10 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{assign var="d3BasketPrice" value=$oxcmp_basket->getPrice()}]
|
||||
|
||||
[{if $hasBeenReloaded}]
|
||||
[{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}]
|
||||
[{capture assign=d3_ga4_view_cart}]
|
||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||
dataLayer.push({
|
||||
'isRemoveFromCart': true,
|
||||
@ -39,7 +39,8 @@
|
||||
]
|
||||
}
|
||||
});
|
||||
[{/capture}]
|
||||
[{/strip}]
|
||||
[{oxscript add=$d3_ga4_view_cart}]
|
||||
[{/if}]
|
||||
[{/capture}]
|
||||
[{oxscript add=$d3_ga4_remove_from_cart}]
|
||||
[{/if}]
|
||||
[{/block}]
|
@ -4,10 +4,10 @@
|
||||
|
||||
[{assign var="breadCrumb" value=''}]
|
||||
|
||||
[{if $gtmProducts|@count}]
|
||||
[{strip}]
|
||||
<script>
|
||||
/* ga4 */
|
||||
[{block name="d3_ga4_view_item_list_block"}]
|
||||
[{if $gtmProducts|@count}]
|
||||
[{capture assign=d3_ga4_view_item_list}]
|
||||
[{strip}]
|
||||
dataLayer.push({ecommerce: null});
|
||||
dataLayer.push({
|
||||
'event':'view_item_list',
|
||||
@ -37,6 +37,8 @@
|
||||
]
|
||||
}
|
||||
});
|
||||
</script>
|
||||
[{/strip}]
|
||||
[{/if}]
|
||||
[{/strip}]
|
||||
[{/capture}]
|
||||
[{oxscript add=$d3_ga4_view_item_list}]
|
||||
[{/if}]
|
||||
[{/block}]
|
@ -2,9 +2,10 @@
|
||||
|
||||
[{assign var="gtmProducts" value=$oView->getArticleList()}]
|
||||
|
||||
[{if $gtmProducts|@count}]
|
||||
[{block name="d3_ga4_add_to_cart_block"}]
|
||||
[{if $gtmProducts|@count}]
|
||||
[{capture assign=d3_ga4_add_to_cart}]
|
||||
[{strip}]
|
||||
<script>
|
||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||
dataLayer.push({
|
||||
'event': 'view_search_result',
|
||||
@ -34,6 +35,8 @@
|
||||
]
|
||||
}
|
||||
});
|
||||
</script>
|
||||
[{/strip}]
|
||||
[{/if}]
|
||||
[{/capture}]
|
||||
[{oxscript add=$d3_ga4_add_to_cart}]
|
||||
[{/if}]
|
||||
[{/block}]
|
Loading…
Reference in New Issue
Block a user