How to fix it #2: How to resolve issues with KClient JS

KClient JS is one of the Keitaro integrations methods which connects third-party websites with a JS code and dynamically changes the content without a visible redirect. This integration type is very popular while working with website builders (Tilda, Taplink, Shopify, etc.) where adding PHP is not allowed but there are modules for HTML/JS import.
We will describe the most common issues and their solutions while working with KClient JS.

1. Nothing happens while visiting the website with the code


First of all, go to your campaign in Keitaro, click the Log button above the streams and check if there is a record of your click.
If the log is empty that means there’s no any inquiries to Keitaro, JS is not executed.

Make sure you put the integration code correctly. The code should be inserted to <head> tag. Check if there are mistakes, if you added extra characters when copying, or if there are symbols not allowed for JS.

Also make sure that the website and the tracker have domains with SSL certificates installed (the work is carried out within the HTTPS protocol) and the JS script in the tracker was generated with the ssl domain (that means you use https domain in Keitaro as default).

2. The click is recorded in Keitaro log, but nothing happens when visiting the website


Read the traffic log and check if the click got to the necessary stream, and whether the action which the click performed coincides with the one you set in the stream. If the log says that there was a redirect, but in fact it wasn’t there or it worked incorrectly (the website loaded without styles or with a floating layout), then make sure that you work with HTTPS protocols in both cases (the website and the tracker).

3. Eternal redirect when you visit a website with KClient JS


Check the streams if there is a link to your website with integration. This website URL shouldn’t be added to a stream.
This causes an eternal redirect, since the visit to the website launches your campaign, in which the stream again contains a link to the website with the KClient JS code. It turns out to be a vicious circle.

4.MIXED CONTENT error in a browser console when visit a website with KClient JS


  1. Make sure that you work with HTTPS protocols in both cases (the website and the tracker). 
  2. If #1 does not help, check the browser console and find the resources that are used with http, and change their urls to https. 
  3. If you work with a domain through Cloudflare, make sure that Flexible/Full settings of SSL  are set in CloudFlare configuration.

5. CORS error in browser console, incorrect website loading


Open Maintenance > Status > Installation method. If the version is lower than 2.12 you need to upgrade your server’s configuration. 

Connect to your server via ssh and run the command: 

curl > run; bash run -rt upgrade

In case you checked all the steps above but couldn’t solve the issue, reach out to our support team, we will be happy to help out.