fooman / googleanalyticsplus

Magento Extension to add extra features to the default GoogleAnalytics module.
http://store.fooman.co.nz/extensions/magento-extension-googleanalyticsplus.html
100 stars 53 forks source link

Check if the dataLayer variable exists before trying to use it #80

Closed hostep closed 9 years ago

hostep commented 9 years ago

When you enable Google Tag Manager and forget to enter the container snippet, the checkout stops working all together, because the dataLayer variable isn't being defined and all other Magento javascript functionality stops working.

fooman commented 9 years ago

Thanks - makes sense. Might even be better to warn when saving the configuration with the missing snippet in the first place.