Use this installation method if you are not using Google Tag Manager (GTM) or if you prefer to integrate Kelkoo Sales Tracking directly into your website's source code.
This guide explains how to manually install the two tags required for Kelkoo Sales Tracking:
-
Lead Tag – sets a first-party tracking cookie when a user visits your website.
-
Conversion Tag – reads the tracking cookie and sends completed order information to Kelkoo.
Important: Both the Lead Tag and the Conversion Tag must be installed. Without both tags, Kelkoo Sales Tracking cannot correctly attribute conversions.
Before You Begin
Before installing the tags, make sure you have:
-
Access to your website's source code.
-
Your Merchant ID and Country Code. To find them have a look at How To get your merchantId
Running several campaigns or in several countries? If you run several campaigns with Kelkoo, you only need to install Kelkoo Sales Tracking once, using any of the Merchant IDs available in the merchantInfo array below. Kelkoo matches each sale to the right campaign regardless of which Merchant ID you send, so nothing is missed by using just one.
If you operate more than one website (a different domain), install Kelkoo Sales Tracking separately on each one, using a Merchant ID that belongs to that website. acme.com and acme.fr are the same website for Kelkoo; acme.com and safe.com are two different websites.
Remove Previous Installations
If your website already includes an older version of Kelkoo Sales Tracking, remove it before installing the new tags below. See Remove Previous Installations of Kelkoo Sales Tracking for what to look for and why this matters.
Step 1 - Install the Lead tag
The Lead Tag sets the first-party tracking cookie used to attribute future conversions.
Add the following script to every page of your website, immediately before the closing </head> tag:
<script async="true" type="text/javascript" src="https://s.kk-resources.com/leadtag.js" ></script>
Once installed, the Lead Tag will automatically create the tracking cookie for eligible visitors.
Step 2 – Install the Conversion Tag
The Conversion Tag sends completed order information to Kelkoo.
Add the following script to your order confirmation (thank-you) page, immediately before the closing </body> tag:
NOTE: This snippet contains placeholder values that you need to update with real variables
<script type="text/javascript">
window._kkstrack = {
merchantInfo: [{ merchantId: 'MERCHANTID_VALUE' }],
orderValue: 'ORDER_VALUE',
orderId: 'ORDER_ID',
basket: [
{ productname: 'name of product 1', productid: '11111', quantity: '1', price: '4.2' },
{ productname: 'name of product 2', productid: '22222', quantity: '3', price: '8.6' }
],
// All the fields below are OPTIONAL. We strongly recommend filling in as many as
// you can (see "Field reference" below) — simply remove any line you cannot fill.
coupon: 'COUPON_CODE',
returningUser: 'RETURNING_USER',
currency: 'CURRENCY',
vatAmount: 'VAT_AMOUNT',
shippingCost: 'SHIPPING_COST',
affiliation: 'AFFILIATION',
discountAmount: 'DISCOUNT_AMOUNT',
paymentStatus: 'PAYMENT_STATUS',
customerLifetimeValue: 'CUSTOMER_LIFETIME_VALUE'
};
(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>
We recommend assigning
_kkstrackonwindowexplicitly (window._kkstrack = {...}, as above) rather than as a bare global variable, to avoid conflicts if this script runs inside another scope.
For the full basket format — required fields, how to make productid match your Kelkoo Group offer feed, and which alternative field names are also recognised — see Add Basket Information to Kelkoo Sales Tracking
Configure the Conversion Tag
Replace the placeholder values in the Conversion Tag with values from your website. Some values remain the same for every order, while others must be populated dynamically for each sale.
Good to know: Kelkoo Sales Tracking can automatically read most order fields from a standard Google Analytics 4 or Google Universal Analytics purchase event already in your Data Layer — see How Kelkoo Sales Tracking automatically reads your Google Analytics data layer for full details and the exact fields covered.
Field reference
The table below lists every field used in the Conversion Tag code above, using the same field/key names as the code. Mandatory fields must be populated for every completed order — Kelkoo Sales Tracking cannot record a sale without them. merchantId are fixed values you can hard-code, since they don't change between orders.
None of the optional fields are required for Kelkoo Sales Tracking to work — a sale will still be tracked without them. We strongly encourage you to populate as many as you can, since they directly improve how we optimise your campaigns. The descriptions below are deliberately brief — for why each optional field matters, see Why these optional fields matter.
|
name |
type |
mandatory |
description |
example |
|---|---|---|---|---|
|
merchantId |
String |
true |
Your Kelkoo Merchant ID, part of the |
100503562 |
|
orderId |
String |
true |
Unique order identifier. If you use an analytics platform such as Google Analytics and want to compare its data with Kelkoo's reporting, use the same order identifier in both. |
FAPC-MZL8-QFNY |
|
orderValue |
Double |
true |
Total order amount. We recommend including VAT and shipping costs (i.e. the gross total) — pass VAT and shipping separately via the optional |
37.72 |
|
basket |
Array |
true |
List of purchased products. See Add Basket Information to Kelkoo Sales Tracking for the full format, required fields, and how to match your offer feed's product identifier. |
|
|
coupon |
String |
false |
The coupon/promo code used for the order, if any. |
SUMMER10 |
|
returningUser |
Boolean |
false |
|
true |
|
currency |
String |
false |
The ISO 4217 currency code of the order. |
EUR |
|
vatAmount |
Double |
false |
The total VAT / tax amount of the order. |
20.50 |
|
shippingCost |
Double |
false |
The total shipping cost of the order. |
4.99 |
|
affiliation |
String |
false |
The store or affiliation associated with the order, if applicable. |
Acme Online Store |
|
discountAmount |
Double |
false |
The total discount amount applied to the order. |
7.50 |
|
paymentStatus |
String |
false |
The payment status of the order. |
paid |
|
customerLifetimeValue |
Double |
false |
The lifetime value of the customer who placed the order. |
1250.50 |
This step requires access to your website's order data. The implementation depends on your platform and programming language. If you're unsure how to retrieve these values, contact your developer or technical team.
Step 3 - Configure your Consent Management Platform (CMP)
Kelkoo Sales Tracking relies on two tags with different consent requirements — the Lead Tag must be gated behind user consent, while the Conversion Tag should not be blocked by a missing consent signal, or your sales will be under-reported.
See Configuring Consent Management (CMP) for full setup and verification instructions.
Step 4 - Verify Your Installation
After completing the installation, verify that both tags are working correctly. Follow the Test your Kelkoo Sales Tracking setup guide to confirm that:
-
the Lead Tag is loaded on all pages;
-
the Conversion Tag is triggered on the order confirmation page;
-
the tracking cookie is created correctly;
-
conversions are successfully recorded by Kelkoo — including any optional fields you've populated (place a test order with a promo code applied to confirm
couponandreturningUsercome through as expected).
Troubleshooting
If conversions are not being tracked correctly, check Troubleshooting Manual Installation .