Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello, my site currently has a few Google tags installed. I'm trying to add one more tag from another Google Ads account but Tag Assistant is not able to detect.
The Google&YouTube app is currently connected to another Google tag so I'm only able to add via editing the theme.liquid code.
I'm trying to add the tag for AW-11039631640 and I added the code that is bolded and underlined.
<!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-WFWTWP8Q');</script> <!-- End Google Tag Manager --> {% comment %} <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-Y4N9H559KT"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-Y4N9H559KT'); </script>{% endcomment %} <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-Y4N9H559KT"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-Y4N9H559KT'); gtag('config', 'AW-709214926'); gtag('config', 'AW-16714936365'); gtag('config', 'AW-11039631640'); {'allow_enhanced_conversions':true}); </script> <!-- Event snippet for Thank You Page conversion page, TMT tag --> <script> gtag('event', 'conversion', { 'send_to': 'AW-16714936365/IGHECIvk8t0ZEK3gpqI-', 'value': 1.0, 'currency': 'SGD', 'transaction_id': '' }); </script> <!-- Event snippet for - Purchase conversion page, Tag --> <script> gtag('event', 'conversion', { 'send_to': 'AW-11039631640/QpLICOitt_AZEJjSjZAp', 'value': 1.0, 'currency': 'SGD', 'transaction_id': '' }); </script>
Hi Bryanquek,
As your are looking to add multiple Google tags on your website, the best practice would be to use Google Tag Manager GTM. Using GTM you can install more than one google tag using the tag template.
feel free to ask if you have any questions.
Thanks
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024