[Changed] twigger-behaviour view_item
This commit is contained in:
parent
a18bcd35c4
commit
048581f6f8
@ -5,8 +5,10 @@
|
||||
[{block name="d3_ga4_view_item_block"}]
|
||||
[{capture name="d3_ga4_view_item"}]
|
||||
[{strip}]
|
||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||
|
||||
(function checkGTM() {
|
||||
if (window.google_tag_manager && window.google_tag_manager.dataLayer && window.google_tag_manager.dataLayer.gtmDom === true) {
|
||||
dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */
|
||||
dataLayer.push({
|
||||
'event': 'view_item',
|
||||
'eventLabel':'Product View',
|
||||
@ -35,6 +37,10 @@
|
||||
'debug_mode': 'true'
|
||||
[{/if}]
|
||||
});
|
||||
} else {
|
||||
setTimeout(checkGTM, 100);
|
||||
}
|
||||
})();
|
||||
[{/strip}]
|
||||
[{/capture}]
|
||||
[{oxscript add=$smarty.capture.d3_ga4_view_item}]
|
||||
|
Loading…
x
Reference in New Issue
Block a user