KClient JS is the newest Keitaro Tracker integration script that allows integrating third-party websites with a JS code and dynamically changing the content without a redirect. Today this is the most popular integration method. We hope this article will help answer most of the questions and setting up the client will become easy and hassle-free.
Title
About the Kclient JS
KClient JS works the following way:
1 – the script takes the data of the incoming click and sends a request to our API.
2 – the tracker gives an answer. If a substitution is required, the contents of the stream are sent to the source site with the client and are rewritten with document.write. As a result, new content is displayed on the original website under the same domain, and redirect detectors see a 200 response.
The script itself has become especially popular with working with various website builders, where it is not possible to use our usual KClient PHP, but JS code injection is supported.
Bots Detection
When generating a script, you can enable the base 64 option, which will generate the script code in a unique encrypted form, avoiding the content with the keys like “tracker”, “api” and other similar values that would help bots to detect the tracker.
Where to Get the Script Code
The script code is taken inside the campaign’s settings, on the Integration tab:
Before copying the script make sure that the offer you use in the campaign is with SSL and its URL begins with HTTPS:
Your third-party website must also have an SSL certificate installed on the domain. This is one of the requirements for the script to work properly. The second condition is that the website builder should support the execution of JS code.
What Does the Basic Setup of a Campaign with a KClient Look Like?
The basis of the standard case includes a campaign with two streams, where the first stream will have filters for bots and the action Do nothing, which will leave the bot on the site where the script is put, and the second stream with the target action – usually a local landing page.
It looks like this:
In the Bot Protection stream add any set of filters to catch bots.
In Stream 2 add the target action. If a local landing page or offer is selected in the stream, then this landing page or offer will be uploaded to your site with integration without redirecting and changing the domain for the traffic that doesn’t get into the bot stream.
How to Add KClient JS to Different Website Builders and Platforms
Shopify
- Open your store and go to Themes > Actions > Edit code.
- Select the page you need in the menu on the left. In case you need the main page, select theme.liquid.
- Add the code from Keitaro Tracker to <head> tag.
- Save the changes. The campaign is integrated.
Taplink
- Create your page, and go to the Settings – General – Insert HTML code (Insert usual code, not base 64).
- Save the changes.
Tilda
- Create your website and open the list of the pages, click Settings
- Go to the Additional page and scroll down to the HTML code to add inside the HEAD field.
- Add the JS code.
- After adding the code publish the changes.
Note: this feature is available only for paid plans:
Flexbe
- Create your website and go to Settings in the upper menu.
- Click Code Injection and check Before closing </head> tag.
- Import your code here:
GitHub
- Create a repository with an index file. Index file should be your website.
- Open Index and insert JS code:
3. Save and deploy. Now, when somebody opens a page from your repository, JS code will be executed.
4. Following the examples above you can integrate KClient JS to any of the website builders which is more convenient for you.
5. In case you followed the manual, but the integration doesn’t work, read how you can solve the issues with KClient JS.
And for sure feel free to reach out to our support team, we will be happy to help out.