webmatch / WbmTagManager

Shopware 5 Plugin for Google Tag Manager integration and dataLayer configuration
27 stars 19 forks source link

TypeError (Cannot read property 'find' of undefined) in onProductClicked #49

Closed ghost closed 2 years ago

ghost commented 3 years ago

Hi,

we're getting this problem a few times a day in our bug tracker via Sentry. It seems that under certain conditions, the impressions field under dataLayer.ecommerce is undefined for some users so the call to find() in jquery.product-click-tracking.js throws this error. I have not been able to reliably reproduce this, except when I manually delete it from the data layer, so I can't really say what the users are doing exactly to trigger it.

We're running SW 5.6.7.

wbm-mkopp commented 2 years ago

Hi @ranmaru22,

the new version 3.5.4 of the plugin will fix this error. We have just released it in the Shopware store.