-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
After enabling the "Send analytics events to Tweakwise" config setting we did not see data appear in our Tweakwise dashboard.
I've done some digging and found that the bindItemClickEventsConfig parameter is not set on init and the value is undefined.
| if (this.bindItemClickEventsConfig) { |
The default Tweakwise Magento template looks like this:
<script type="text/x-magento-init">
{
"*": {
"Tweakwise_Magento2Tweakwise/js/analytics": {
"value": "<?= $escaper->escapeHtmlAttr($value ?? ''); ?>",
"type": "<?= $escaper->escapeHtmlAttr($analyticsType ?? ''); ?>",
"bindItemClickEventsConfig": {
"productListSelector": "<?= $escaper->escapeHtmlAttr($jsFormConfig['tweakwiseNavigationForm']['productListSelector'] ?? ''); ?>",
"productSelector": "<?= $escaper->escapeHtmlAttr($jsFormConfig['tweakwiseNavigationForm']['productSelector'] ?? ''); ?>",
"analyticsEndpoint": "<?= $escaper->escapeHtmlAttr($jsFormConfig['tweakwiseNavigationForm']['analyticsEndpoint'] ?? ''); ?>",
"twRequestId": "<?= $escaper->escapeHtmlAttr($jsFormConfig['tweakwiseNavigationForm']['twRequestId'] ?? ''); ?>"
}
}
}
}
</script>
The Tweakwise Hyva template looks like this, where the bindItemClickEventsConfig is missing:
<div x-data="{
value: '<?= $escaper->escapeHtmlAttr($value); ?>',
type: '<?= $escaper->escapeHtmlAttr($analyticsType); ?>'
}" x-init="() => {
Tweakwise_Hyva_Analytics({
value: value,
type: type
}).init();
}">
</div>
Metadata
Metadata
Assignees
Labels
No labels