Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi all,
We have 2 site using the simple GTM snippet, but one site renders normally the other site shows nothing for the snippet at all.
- site with render snippet
- site with no render snippet
We'd love to know the following:
1. How we can debug for render?
2. What would be the possible reason that might doesn't work?
3. We have multiple render snippet in checkout.liquid, if one of the snippet has error, would it affect other snippet to render?
We are new to Shopify and this community, please let me know if lack any information, and much appreciated for any help.🙂
Layout/checkout.liquid
<!DOCTYPE html>
<html lang="{{ locale }}" dir="{{ direction }}" class="{{ checkout_html_classes }}">
<head>
{% render 'elevar-head' %}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
...
{% render 'other-part' %}
...
Snippets/elevar-head.liquid
<!--
...some comment here
-->
<!-- Google Tag Manager -->
<script>
window.dataLayer = window.dataLayer || [];
</script>
<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-xxxxxx");
</script>
<!-- End Google Tag Manager -->
<script id="elevar-gtm-suite-config" type="application/json">{"gtm_id": "GTM-xxxxxx", "event_config": {"cart_reconcile": true, "cart_view": true, "checkout_complete": true, "checkout_step": true, "collection_view": true, "product_add_to_cart": true, "product_add_to_cart_ajax": true, "product_remove_from_cart": true, "product_select": true, "product_view": true, "search_results_view": true, "user": true, "save_order_notes": true}, "gtm_suite_script": "https://shopify-gtm-suite.getelevar.com/shops/xxxxxxxxxxxxxxxxxxxxxxxxxx/2.38.0/gtm-suite.js", "consent_enabled": false}</script>
Solved! Go to the solution
This is an accepted solution.
Please make sure that you have your checkout.liquid file enabled by the Shopify. Occasionally during theme copy the file might show up in your library, but it does not allow actually render anything if not being enabled.
Hi @GloriaL , if you are not on Shopify Plus, you don't have a direct access to checkout.liquid.
Go to settings > checkout and look for additional scripts, this is the place where you should add piece of code. 🙂
Hi @MarinaPetrovic ,
Thank you for the fast response.😊
Yes, we are using the Shopify Plus, the checkout.liquid works properly only except the extra render snippet we added in the header.
Do you have any information regarding that?
This is an accepted solution.
Please make sure that you have your checkout.liquid file enabled by the Shopify. Occasionally during theme copy the file might show up in your library, but it does not allow actually render anything if not being enabled.
Hi ALLU,
Thank you so much for the answer. Yes, that’s exactly what happens.
We have reached out to the Elevar support, with their help to check, it turns out that our client copied the theme from the other site, so we did see a checkout.liquid but the functionality was not enabled.
After helping our client to enable the checkout functionality, everything works fine.🙂
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025