<div class="ql-code-block" data-language="plain"><em><script type=»text/javascript»> // cart window.cnv_cart_total = {{ cart.grand_total.value }}; window.cnv_cart_items = []; {{#eachIndex cart.items}} window.cnv_cart_items.push({product_id: {{ item.product_id }}, qnt: {{ item.quantity }}, product_name: «{{ item.name }}», price: {{ item.price.value }} }); {{/eachIndex}}</em> <em>// view product window.cnv_view_product = {{#if product}}{ product_id: «{{ product.id }}», product_name: «{{ product.title }}», price: «{{ product.price.without_tax.value }}» }{{else}}null{{/if}};</em> <em>ConveadSettings = {visitor_info: {}, app_key: «8f427b003be874bd4f83cd7d798f9665»};<em>// visitor info {{#if customer}} ConveadSettings.visitor_uid = «{{ customer.id }}»; {{#if customer.name}} var aName = «{{ customer.name }}».match(/([^ ]*) (.*)/); if (aName && aName[1]) ConveadSettings.visitor_info.first_name = aName[1]; if (aName && aName[2]) ConveadSettings.visitor_info.last_name = aName[2]; {{/if}} {{#if customer.email}}ConveadSettings.visitor_info.email = «{{ customer.email }}»;{{/if}} {{#if customer.phone}}ConveadSettings.visitor_info.phone = «{{ customer.phone }}»;{{/if}} {{/if}}<em>window.cnv_init = function() {(function(d){var ts = (+new Date()/86400000|0)*86400;var s = d.createElement(‘script’);s.type = ‘text/javascript’;s.async = true;s.charset = ‘utf-8’;s.src = ‘<a href="https://tracker.convead.io/widgets/%E2%80%99+ts+%E2%80%99/widget-8f427b003be874bd4f83cd7d798f9665.js%E2%80%99;var">https://tracker.convead.io/widgets/’+ts+’/widget-8f427b003be874bd4f83cd7d798f9665.js’;var</a> x = d.getElementsByTagName(‘script’)[0];x.parentNode.insertBefore(s, x);})(document);};<em>(function(w,d,c){w[c]=w[c]||function(){(w[c].q=w[c].q||[]).push(arguments)}; var s = d.createElement(‘script’);s.type = ‘text/javascript’;s.async = true;s.charset = ‘utf-8’;s.src = ‘<a href="https://tracker.convead.io/integration/bigcommerce/static.js%E2%80%99;var">https://tracker.convead.io/integration/bigcommerce/static.js’;var</a> x = d.getElementsByTagName(‘script’)[0];x.parentNode.insertBefore(s, x);})(window,document,’convead’);</script></em> </em></em></em></div>