This is the prefered installation method if you don't have Google Tag Manager (GTM) installed and/or don't want to use the Installation via GTM.
You need to edit part of your code to succeed with this implementation.
Before setting up your Kelkoo Sales Tracking Tag
Get your merchantId and associated Country Code
See How To get your merchantId and associated Country Code
Clean any old version of Kelkoo Sales Tracking
-
In your code, remove any Kelkoo Sales tracking tag (search for leadtag.js and _kkstrack)
-
On your website backend, uninstall any Kelkoo Sales Tracking plugin you might have installed
Install Kelkoo Sales Tracking
You need to install two elements:
-
the Leadtag, in charge of writing the cookie when the user first visits your website
-
the Conversion tag, in charge of retrieving data from the cookie and registering the sale
BOTH ARE MANDATORY FOR KELKOO SALES TRACKING TO WORK
Install Lead tag
Place the following code at the end of the head section of every page on your website:
<script async="true" type="text/javascript" src="https://s.kk-resources.com/leadtag.js" ></script>
Tips : You can generally append the piece of code to an existing file already included on every page of your website (your header for example).
Install Conversion tag
Put the following code on your confirmation page, just before the end of the body section:
<script type="text/javascript">
_kkstrack = {
merchantInfo : [{ country:'COUNTRY_CODE', 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'
}
]
};
(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>
Customize Conversion tag code
You need to edit some elements of the Conversion Tag to pass the correct values.
Static values
Those values can be hardcoded as they are the same for all the sales registered.
-
MERCHANTID_VALUE: This is the unique ID representing your shop within the Kelkoo Group system.
-
Check How To get your merchantId and associated Country Code.
-
If you have multiple MerchantId see below.
-
-
COUNTRY_CODE is the 2-letter country code (lower case) for the country on which your products are listed on Kelkoo Group. Check Full list of Kelkoo Group country codes
Dynamic values
Those values must be passed dynamically to the tag by your website, as they are specific to each sales registered.
Please note that basic programming is needed for this part. How to do it depends on the programming language your website is coded in and the name of the variables your platform uses to store this information. Your technical team will know how to implement this.
-
ORDER_VALUE: any decimal number representing the total amount of the order
-
ORDER_ID: any string identifying the order unique identifier.
If you have multiple merchantIds and countries
If you have several Kelkoo Group campaigns running for the same website (multiple MerchantId), you can setup all campaigns within the same tag.
The merchantInfo variable just needs to have the following structure:
merchantInfo : [
{
country:'fr',
merchantId:'12941513'
},
{
country:'uk',
merchantId:'56789'
}
]
Configure your CMP (Consent Management Platform)
You need to setup your CMP so that our tags are fired correctly, respecting the user consent regarding cookies. This could have an impact on sales reported to Kelkoo Group.
Test your setup
Please check Test Installation