Untitled
<script> window.dataLayer = window.dataLayer || []; dataLayer.push({ ecommerce: null }); {% if first_time_accessed %} dataLayer.push({ event: "purchase", ecommerce: { transaction_id: "{{ order.order_number }}", value: {{ total_price | times: 0.01 }}, tax: {{ tax_price | times: 0.01 }}, shipping: {{ shipping_price | times: 0.01 }}, currency: "{{ order.currency }}", items: [ {% for line_item in line_items %}{ item_id: "{{ line_item.product_id }}", item_name: "{{ line_item.title | remove: "'" | remove: '"' }}", currency: "{{ order.currency }}", price: {{ line_item.final_price | times: 0.01 }}, quantity: {{ line_item.quantity }} },{% endfor %} ] } }); {% endif %} </script> <!-- 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-MB3Q39C');</script> <!-- End Google Tag Manager --> <!-- Paytm ad conversion script --> <script type="text/javascript">(function(){var a=document.createElement("iframe");a.setAttribute("src","https://paytm43.gotrackier.com/pixel?adid=644a62cf399bce5e69256a02&txn_id={{ order_number }}&sale_amount={{ total_price | money_without_currency }}¤cy=INR&sub4=");a.style.width="1";a.style.height="1";document.body.appendChild(a)})(); </script>
Leave a Comment