Shopify integration

Home Page > Support > Merchants support > Shopify integration

Information for those merchants who use Shopify.

Important! Before making any changes, please remember to back up any files you want to modify.

Implement lead tag

  1. Navigate to Shopify Sales Channel Themes > Click Action > Edit Code.
  2. In the file tree, under the Layout folder, click theme.liquid.
  3. Scroll down to the page until you find the following tag: </head>.

Paste the following code just before the closing </head> tag.

<script async="true" type="text/javascript" src="https://s.kk-resources.com/leadtag.js" ></script>

Implement conversion tag

  • Log in to your Shopify account.
  • Navigate to and click on ‘Settings’.
  • Select ‘Checkout’ from the sub-menu.
  • Scroll down to ‘Order processing’ and locate the ‘Additional scripts’ box.
  • Get your country code and merchant ID from Kelkoo’s Merchant Extranet under ‘sales tracking’.
  • In order to allow Shopify to output the necessary data, edit the following lines of code:
<script type="text/javascript">     
    _kkstrack = {       
      merchantInfo : [{ country:'ADD YOUR COUNTRY CODE HERE', merchantId:'ADD YOUR MERCHANT ID HERE' }],       
      orderValue: '{{ order.total_price | money_without_currency | replace: ',', '.' }}',       
      orderId: '{{ order_number }}',       
      basket: [               
              {% for line_item in line_items %}                 
                {                   
                 productname: '{{ line_item.title }}',                  
                 productid: '{{ line_item.product_id }}',                  
                 quantity: '{{ line_item.quantity }}',                  
                 price: '{{ line_item.line_price | money_without_currency | replace: ',', '.' }}'                 
                },               
              {% endfor %}               
              ]     
     };     
     (function() {       
       var s = document.createElement('script');       
       s.type = 'text/javascript';       
       s.async = true;       
       s.src = 'https://s.kk-resources.com/ks.js';       
       var x = document.getElementsByTagName('script')[0];       
       x.parentNode.insertBefore(s, x);     
     })(); 
</script> 
  • Scroll to the bottom of the page and select ‘Save’.
  • Verify success by submitting an order from your site. Check your statistics within the Kelkoo Merchant Extranet the following day to ensure the sale was recorded.

Important! Check regularly that sales are being registered. This is extra important to do after you have implemented updates or changes to your site.
If you encounter problems, please use our contact form to send us an email. If the test order was not properly registered in your Statistics page, please attach to your email the source code of the order confirmation page as it appeared (“View”> “View Source”). Kelkoo Sales Tracking code should normally be included.

Select your location