8
0

[Changed] capture implementation

reworked to a safer path-through to get the data
Dieser Commit ist enthalten in:
MaxBUhe 2023-12-18 11:59:12 +01:00
Ursprung 9ea5408e44
Commit e2564f613a
6 geänderte Dateien mit 12 neuen und 12 gelöschten Zeilen

Datei anzeigen

@ -1,7 +1,7 @@
[{$smarty.block.parent}]
[{block name="d3_ga4_purchase_block"}]
[{capture assign=d3_ga4_purchase}]
[{capture name="d3_ga4_purchase"}]
[{strip}]
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
[{assign var="gtmOrder" value=$oView->getOrder()}]
@ -52,5 +52,5 @@
})
[{/strip}]
[{/capture}]
[{oxscript add=$d3_ga4_purchase}]
[{oxscript add=$smarty.capture.d3_ga4_purchase}]
[{/block}]

Datei anzeigen

@ -6,7 +6,7 @@
[{assign var='gtmCartArticles' value=$oView->getBasketArticles()}]
[{block name="d3_ga4_view_cart_block"}]
[{capture assign=d3_ga4_view_cart}]
[{capture name="d3_ga4_view_cart"}]
[{strip}]
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
dataLayer.push({
@ -46,5 +46,5 @@
});
[{/strip}]
[{/capture}]
[{oxscript add=$d3_ga4_view_cart}]
[{oxscript add=$smarty.capture.d3_ga4_view_cart}]
[{/block}]

Datei anzeigen

@ -4,7 +4,7 @@
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]
[{block name="d3_ga4_view_item_block"}]
[{capture assign=d3_ga4_view_item}]
[{capture name="d3_ga4_view_item"}]
[{strip}]
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
@ -36,5 +36,5 @@
});
[{/strip}]
[{/capture}]
[{oxscript add=$d3_ga4_view_item}]
[{oxscript add=$smarty.capture.d3_ga4_view_item}]
[{/block}]

Datei anzeigen

@ -3,7 +3,7 @@
[{block name="d3_ga4_remove_from_cart_block"}]
[{if $hasBeenReloaded}]
[{assign var="d3BasketPrice" value=$oxcmp_basket->getPrice()}]
[{capture assign=d3_ga4_remove_from_cart}]
[{capture name="d3_ga4_remove_from_cart"}]
[{strip}]
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
dataLayer.push({
@ -43,6 +43,6 @@
});
[{/strip}]
[{/capture}]
[{oxscript add=$d3_ga4_remove_from_cart}]
[{oxscript add=$smarty.capture.d3_ga4_remove_from_cart}]
[{/if}]
[{/block}]

Datei anzeigen

@ -6,7 +6,7 @@
[{block name="d3_ga4_view_item_list_block"}]
[{if $gtmProducts|@count}]
[{capture assign=d3_ga4_view_item_list}]
[{capture name="d3_ga4_view_item_list"}]
[{strip}]
dataLayer.push({ecommerce: null});
dataLayer.push({
@ -41,6 +41,6 @@
});
[{/strip}]
[{/capture}]
[{oxscript add=$d3_ga4_view_item_list}]
[{oxscript add=$smarty.capture.d3_ga4_view_item_list}]
[{/if}]
[{/block}]

Datei anzeigen

@ -4,7 +4,7 @@
[{block name="d3_ga4_view_search_result_block"}]
[{if $gtmProducts|@count}]
[{capture assign=d3_ga4_view_search_result}]
[{capture name="d3_ga4_view_search_result"}]
[{strip}]
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
dataLayer.push({
@ -39,6 +39,6 @@
});
[{/strip}]
[{/capture}]
[{oxscript add=$d3_ga4_view_search_result}]
[{oxscript add=$smarty.capture.d3_ga4_view_search_result}]
[{/if}]
[{/block}]