Additional Checkout Scripts - Not Saving

KDigital2022
Visitor
2 0 0

Hi - trying to setup Google Ads tracking for Shopify store, but the additional scripts that i've followed from Shopify (https://help.shopify.com/en/manual/promoting-marketing/analyze-marketing/tracking-adwords-conversion...) doesnt allow me to save the changes "Couldnt Update the Settings, try again" - any help please???

 

<!-- Hotjar Tracking Code -->
<script>
    (function(h,o,t,j,a,r){
        h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
        h._hjSettings={hjid:2316084,hjsv:6};
        a=o.getElementsByTagName('head')[0];
        r=o.createElement('script');r.async=1;
        r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
        a.appendChild(r);
    })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script>

<script type="text/javascript">
!function(e){if(!window.pintrk){window.pintrk=function()
{window.pintrk.queue.push(Array.prototype.slice.call(arguments))};var
n=window.pintrk;n.queue=[],n.version="3.0";var
t=document.createElement("script");t.async=!0,t.src=e;var
r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(t,r)}}
("https://s.pinimg.com/ct/core.js");

pintrk('load','2614075258196', { em: '{{ customer.email }}', });
pintrk('page');
</script>
<noscript>
<img height="1" width="1" style="display:none;" alt=""
src="https://ct.pinterest.com/v3/?tid=2614075258196&noscript=1" />
</noscript>

<script>
pintrk('track', 'checkout',{
value: {{ total_price }} / 100,
currency: '{{ currency }}',
order_quantity: 1,
order_id: {{ checkout.id }}
});
</script>
<noscript>
<img height="1" width="1" style="display:none;" alt=""
src="https://ct.pinterest.com/v3/?tid=2614075258196&event=checkout&noscript=1"/>
</noscript>
{% endif %}

<!-- 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-NNMLK96');</script>
<!-- End Google Tag Manager -->


<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NNMLK96"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

 

POST - PURCHASE SCRIPT

 

<!-- Global site tag (gtag.js) - Google Ads: 10835589274 --> 
  <script async src="https://www.googletagmanager.com/gtag/js?id=AW-10835589274"></script> 
  <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-10835589274'); </script>

{% if first_time_accessed %}
<!-- Event snippet for Purchase from conversion page --> <script> 
gtag('event', 'conversion', { 
'send_to': 'AW-10835589274/rmp7CK3x2cgDEJrx564o', 
'value': {{ checkout.total_price | divided_by: 100.0 }},
'currency': 'GBP', 
'transaction_id': '{{ order_number  }}' 
}); 
</script>
{% endif %}

 

 

 

Replies 0 (0)