add deug_mode switch
This commit is contained in:
parent
7b1241ab97
commit
9e7b4653ea
@ -46,7 +46,9 @@
|
|||||||
}[{if !$smarty.foreach.gtmArticles.last}],[{/if}]
|
}[{if !$smarty.foreach.gtmArticles.last}],[{/if}]
|
||||||
[{/foreach}]
|
[{/foreach}]
|
||||||
]
|
]
|
||||||
}
|
}[{if $oViewConf->isDebugModeOn()}],
|
||||||
|
'debug_mode': 'true'
|
||||||
|
[{/if}]
|
||||||
})
|
})
|
||||||
[{/strip}]
|
[{/strip}]
|
||||||
[{/capture}]
|
[{/capture}]
|
||||||
|
@ -40,7 +40,9 @@
|
|||||||
}[{if !$smarty.foreach.gtmCartContents.last}],[{/if}]
|
}[{if !$smarty.foreach.gtmCartContents.last}],[{/if}]
|
||||||
[{/foreach}]
|
[{/foreach}]
|
||||||
]
|
]
|
||||||
}
|
}[{if $oViewConf->isDebugModeOn()}],
|
||||||
|
'debug_mode': 'true'
|
||||||
|
[{/if}]
|
||||||
});
|
});
|
||||||
[{/strip}]
|
[{/strip}]
|
||||||
[{/capture}]
|
[{/capture}]
|
||||||
|
@ -30,7 +30,9 @@
|
|||||||
'price': [{$d3PriceObject->getPrice()}]
|
'price': [{$d3PriceObject->getPrice()}]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}[{if $oViewConf->isDebugModeOn()}],
|
||||||
|
'debug_mode': 'true'
|
||||||
|
[{/if}]
|
||||||
});
|
});
|
||||||
[{/strip}]
|
[{/strip}]
|
||||||
[{/capture}]
|
[{/capture}]
|
||||||
|
@ -41,7 +41,9 @@
|
|||||||
'quantity': iArtQuantity
|
'quantity': iArtQuantity
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}[{if $oViewConf->isDebugModeOn()}],
|
||||||
|
'debug_mode': 'true'
|
||||||
|
[{/if}]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
[{/strip}]
|
[{/strip}]
|
||||||
|
@ -37,7 +37,9 @@
|
|||||||
}[{if !$smarty.foreach.gtmRemovedItems.last}],[{/if}]
|
}[{if !$smarty.foreach.gtmRemovedItems.last}],[{/if}]
|
||||||
[{/foreach}]
|
[{/foreach}]
|
||||||
]
|
]
|
||||||
}
|
}[{if $oViewConf->isDebugModeOn()}],
|
||||||
|
'debug_mode': 'true'
|
||||||
|
[{/if}]
|
||||||
});
|
});
|
||||||
[{/strip}]
|
[{/strip}]
|
||||||
[{/capture}]
|
[{/capture}]
|
||||||
|
@ -35,7 +35,9 @@
|
|||||||
}[{if !$smarty.foreach.gtmProducts.last}],[{/if}]
|
}[{if !$smarty.foreach.gtmProducts.last}],[{/if}]
|
||||||
[{/foreach}]
|
[{/foreach}]
|
||||||
]
|
]
|
||||||
}
|
}[{if $oViewConf->isDebugModeOn()}],
|
||||||
|
'debug_mode': 'true'
|
||||||
|
[{/if}]
|
||||||
});
|
});
|
||||||
[{/strip}]
|
[{/strip}]
|
||||||
[{/capture}]
|
[{/capture}]
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
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_search_result',
|
'event': 'view_search_result',
|
||||||
'eventLabel':'view_search_result',
|
'eventLabel':'view_search_result[{if $oViewConf->isDebugModeOn()}]_test[{/if}]',
|
||||||
'ecommerce': {
|
'ecommerce': {
|
||||||
'search_term': '[{$searchparamforhtml}]',
|
'search_term': '[{$searchparamforhtml}]',
|
||||||
'items': [
|
'items': [
|
||||||
@ -33,7 +33,9 @@
|
|||||||
}[{if !$smarty.foreach.gtmProducts.last}],[{/if}]
|
}[{if !$smarty.foreach.gtmProducts.last}],[{/if}]
|
||||||
[{/foreach}]
|
[{/foreach}]
|
||||||
]
|
]
|
||||||
}
|
}[{if $oViewConf->isDebugModeOn()}],
|
||||||
|
'debug_mode': 'true'
|
||||||
|
[{/if}]
|
||||||
});
|
});
|
||||||
[{/strip}]
|
[{/strip}]
|
||||||
[{/capture}]
|
[{/capture}]
|
||||||
|
@ -203,6 +203,11 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
return json_encode([$dataLayer], JSON_PRETTY_PRINT);
|
return json_encode([$dataLayer], JSON_PRETTY_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isDebugModeOn() :bool
|
||||||
|
{
|
||||||
|
return Registry::getConfig()->getConfigParam('d3_gtm_blEnableDebug');
|
||||||
|
}
|
||||||
|
|
||||||
public function isPromotionList($listId)
|
public function isPromotionList($listId)
|
||||||
{
|
{
|
||||||
$oConfig = Registry::getConfig();
|
$oConfig = Registry::getConfig();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user