We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bbf64d4 + bf1803d commit 6c2f9d4Copy full SHA for 6c2f9d4
1 file changed
views/templates/hook/ga_tag.tpl
@@ -21,9 +21,11 @@
21
{literal}
22
<script type="text/javascript">
23
document.addEventListener('DOMContentLoaded', function() {
24
- var MBG = GoogleAnalyticEnhancedECommerce;
25
- MBG.setCurrency('{/literal}{$isoCode|escape:'htmlall':'UTF-8'}{literal}');
26
- {/literal}{$jsCode nofilter}{literal}
+ if (typeof GoogleAnalyticEnhancedECommerce !== 'undefined') {
+ var MBG = GoogleAnalyticEnhancedECommerce;
+ MBG.setCurrency('{/literal}{$isoCode|escape:'htmlall':'UTF-8'}{literal}');
27
+ {/literal}{$jsCode nofilter}{literal}
28
+ }
29
});
30
</script>
31
{/literal}
0 commit comments