In a media buying team, especially in competitive niches like gambling, accurately tracking traffic and user behavior on landing pages is crucial.
Keitaro Enterprise provides powerful tracking tools, allowing webmasters and analysts to collect detailed data, adjust content based on user behaviour and increase conversions.
Keitaro Enterprise provides powerful tracking tools, allowing webmasters and analysts to collect detailed data, adjust content based on user behaviour and increase conversions.
How Keitaro helps with tracking
Keitaro provides basic metrics to track interactions on a landing page, such as LP Views, LP Clicks, and LP CTR. However, these metrics are only available if the landing page is hosted locally on Keitaro's server.
This is because the system processes and tracks user actions directly on the same server where the platform is installed.
This is because the system processes and tracks user actions directly on the same server where the platform is installed.
If your website is hosted on a separate server, domain or website builder, you need to use special Keitaro tracking scripts. These scripts are integrated into your website and allow you to track user activity, passing the data back to Keitaro for further analysis.

What Keitaro tracking scripts are and what they are for
Keitaro tracking scripts are special codes that are installed on your landing pages to track user actions such as clicks, views and other events. These scripts are customised for each user and campaign and must be taken directly from your Keitaro tracker.
Important: These scripts are unique and are generated in your Keitaro tracker. The examples below are illustrative. You need to use the scripts from your Keitaro account to work correctly.
Important: These scripts are unique and are generated in your Keitaro tracker. The examples below are illustrative. You need to use the scripts from your Keitaro account to work correctly.

Basic methods for integrating tracking scripts into Keitaro
When integrating a Keitaro campaign with your website, it is important to choose the appropriate method depending on the technical capabilities of the resource and your needs.
Below is the logic behind choosing an integration method:
Below is the logic behind choosing an integration method:
Step 1: Determine the need for a postback on a button
• Q: Do you need a postback on a button?
• Yes: You will need a method that supports sending a postback when the button is clicked.
• No: You can use methods that do not support postback on button.
• Q: Do you need a postback on a button?
• Yes: You will need a method that supports sending a postback when the button is clicked.
• No: You can use methods that do not support postback on button.
Step 2: Determine your resource type
Choose the option that fits your case:
There is a site on a separate hosting
There is a site on a builder (like Tilda, Craftum, etc.) other than WordPress
There's a localised landing page
There is a WebView mobile app on a separate hosting site
Choose the option that fits your case:
There is a site on a separate hosting
There is a site on a builder (like Tilda, Craftum, etc.) other than WordPress
There's a localised landing page
There is a WebView mobile app on a separate hosting site
Step 3: Select an integration method based on the resource's capabilities
1. Resource supports PHP, index page in PHP format
Recommended method: KClient PHP
• Description: Provides the most complete functionality for working with ads, including the ability to get sub_id, send postbacks and supports uploading to metrics.
• When to use: If your resource supports PHP and you can upload files to the server.
• Setup Instructions: KClient PHP Integration
• Description: Provides the most complete functionality for working with ads, including the ability to get sub_id, send postbacks and supports uploading to metrics.
• When to use: If your resource supports PHP and you can upload files to the server.
• Setup Instructions: KClient PHP Integration
2. The resource does not support PHP code and custom code blocks, only JS
Recommended method: KClient JS
• Description: Designed to work on the client side and allows you to track user clicks on the landing page. Often used when working with site builders where there is no possibility to install a PHP file.
• Features: It has limited functionality compared to KClient PHP, does not allow to receive sub_id and send postbacks.
• When to use: If your resource does not support PHP and there is no possibility to add custom code blocks, but JavaScript is supported.
• Configuration instructions: KClient JS Integration
• Features: It has limited functionality compared to KClient PHP, does not allow to receive sub_id and send postbacks.
• When to use: If your resource does not support PHP and there is no possibility to add custom code blocks, but JavaScript is supported.
• Configuration instructions: KClient JS Integration
3. The resource supports custom blocks with code and JS
Possible methods:
• Tracking script
- Description: Allows you to track clicks and other events on your landing page. Functionally close to KClient PHP, but suitable for resources that do not support PHP.
- Features: Additionally it can send postback from the button.
- When to use: If your resource supports adding custom code blocks and JavaScript, but does not support PHP.
- Configuration instructions: Script Tracking Integration
• Tracking script
- Description: Allows you to track clicks and other events on your landing page. Functionally close to KClient PHP, but suitable for resources that do not support PHP.
- Features: Additionally it can send postback from the button.
- When to use: If your resource supports adding custom code blocks and JavaScript, but does not support PHP.
- Configuration instructions: Script Tracking Integration
• JS Adapter
- Description: A versatile tool for integrating Keitaro with your lendings. Allows you to send information about various events on the page to the tracker.
- When to use: When you need flexible tracking of custom events and the resource supports JavaScript.
- Setup Instructions: JS Adapter
- Description: A versatile tool for integrating Keitaro with your lendings. Allows you to send information about various events on the page to the tracker.
- When to use: When you need flexible tracking of custom events and the resource supports JavaScript.
- Setup Instructions: JS Adapter
4. Integration with WordPress
If your site is built on WordPress, you can use a special plugin to integrate with Keitaro.
• Description: Simplifies tracking integration with sites on WordPress by providing a plugin for quick setup.
• When to use: If your site is on WordPress and you want to quickly set up tracking without directly editing code.
• Setup Instructions: WordPress Integration
If your site is built on WordPress, you can use a special plugin to integrate with Keitaro.
• Description: Simplifies tracking integration with sites on WordPress by providing a plugin for quick setup.
• When to use: If your site is on WordPress and you want to quickly set up tracking without directly editing code.
• Setup Instructions: WordPress Integration

How to get tracking scripts in Keitaro
1. Create or open an existing campaign in your Keitaro Tracker.
2. Click the Tracking or Tracking tab.
3. Select the required integration method according to your needs and the technical capabilities of the resource.
4. Copy the generated script or download the necessary files (e.g. kclient.php) that already contain your individual parameters (domain, token, etc.).
5. Follow the instructions on how to install the script on your website.
2. Click the Tracking or Tracking tab.
3. Select the required integration method according to your needs and the technical capabilities of the resource.
4. Copy the generated script or download the necessary files (e.g. kclient.php) that already contain your individual parameters (domain, token, etc.).
5. Follow the instructions on how to install the script on your website.
Important: Only use scripts that have been generated in your Keitaro account for a specific campaign. Copying examples from this article without replacing them with your individual data will result in incorrect tracking.


Examples of using tracking scripts in Keitaro
Example 1: Integration using KClient PHP
Situation: You have a website on a separate hosting that supports PHP and you want full tracking functionality.
Steps:
• Download the kclient.php file from your Keitaro tracker.
Instructions: Downloading kclient.php
• Place the kclient.php file in your landing page folder on your server.
Steps:
• Download the kclient.php file from your Keitaro tracker.
Instructions: Downloading kclient.php
• Place the kclient.php file in your landing page folder on your server.
Add the following code to the beginning of your index.php file:
php
php
Copy code
<?php
• Note: Replace ‘https://your-domain.com/’ with your individual campaign domain and ‘your-campaign-token’ with your unique campaign token.
• Test the tracking performance by sending test traffic to your landing page.
• Test the tracking performance by sending test traffic to your landing page.


Example 2: Integration using KClient JS on a website builder
Situation: Your site is built on a builder that does not support PHP, but allows you to add custom JavaScript codes.
Steps:
1. Go to the ‘Tracking’ tab in Keitaro Tracker and select KClient JS.
Instructions: Configuring KClient JS
Instructions: Configuring KClient JS
2. Copy the generated script, which will look something like this:
html
Copy code
html
Copy code
<script src="https://your-domain.com/kclient.js?token=your-campaign-token"></script>
3. Insert the script into the code of your landing page using the builder features to add custom scripts.
4. Test how tracking works by sending test traffic to your landing page.


Example 3: Using JS Adapter for event tracking
Situation: You want to track specific events on your landing page, such as clicks on certain elements or form fills.
Steps:
Insert the JS Adapter into the code of your landing page:
html
Copy code
<script src=‘https://ваш-домен.com/js-adapter.js?token=ваш-токен-кампании’></script>
Steps:
Insert the JS Adapter into the code of your landing page:
html
Copy code
<script src=‘https://ваш-домен.com/js-adapter.js?token=ваш-токен-кампании’></script>
1. Instructions: Configuring the JS Adapter
2. Customise event tracking by adding the appropriate JavaScript codes. For example, to track a button click:
html
Copy code
html
Copy code
<button id="action-button">Действие</button>
<script>
document.getElementById('action-button').addEventListener('click', function() {
keitaro.trackEvent('action_button_click');
});
</script>
<script>
document.getElementById('action-button').addEventListener('click', function() {
keitaro.trackEvent('action_button_click');
});
</script>
3. Verify the tracking works by performing the appropriate actions on the landing page.

Possibility to use custom scripts
It is important to realise that in addition to the official Keitaro tracking scripts, you can independently develop and integrate your own custom scripts into your website. These custom scripts allow you to implement unique features and functions that are specific to your project.
• Please note: Developing and integrating custom scripts requires proper programming skills and an understanding of your site.
• Keitaro does not provide support for custom scripts, as they depend more on the code of your website than on the functionality of the tracker.
• Recommended: Test custom scripts in a safe environment and make sure they work properly before implementing them on a live site.
• Keitaro does not provide support for custom scripts, as they depend more on the code of your website than on the functionality of the tracker.
• Recommended: Test custom scripts in a safe environment and make sure they work properly before implementing them on a live site.
Example of a scenario using a custom script:
• Challenge: You want to implement specific tracking of user behaviour that is not covered by Keitaro's standard capabilities.
• Solution: Write custom JavaScript code that collects the necessary data and sends it to your server or analytics platform.
• Please note: This approach goes beyond Keitaro's standard functionality and requires independent development and support.
• Challenge: You want to implement specific tracking of user behaviour that is not covered by Keitaro's standard capabilities.
• Solution: Write custom JavaScript code that collects the necessary data and sends it to your server or analytics platform.
• Please note: This approach goes beyond Keitaro's standard functionality and requires independent development and support.


8. Benefits of Keitaro Enterprise
Keitaro Enterprise provides advanced features for traffic arbitrage professionals:
• Unlimited number of domains and users: Manage multiple projects and teams without limits.
• Personal Manager: Get personalised support and assistance in setting up complex tracking scenarios.
• Audit Log: Track the history of system changes for transparency and security.
• Advanced Integrations: Connect to more accounts across Google Ads, Facebook, TikTok and more.
• Branding: Personalise the tracker interface by replacing the standard logo with your company logo.
Keitaro Enterprise provides advanced features for traffic arbitrage professionals:
• Unlimited number of domains and users: Manage multiple projects and teams without limits.
• Personal Manager: Get personalised support and assistance in setting up complex tracking scenarios.
• Audit Log: Track the history of system changes for transparency and security.
• Advanced Integrations: Connect to more accounts across Google Ads, Facebook, TikTok and more.
• Branding: Personalise the tracker interface by replacing the standard logo with your company logo.
Read more about Keitaro Enterprise benefits: Keitaro Enterprise Features
Conclusion
Accurate and reliable data on user behaviour on your landing pages is the key to successful advertising campaigns. By using Keitaro's tracking scripts and integrating them into your landing pages, taking into account the technical capabilities of your resource, you get a powerful tool for conversion analysis and optimisation.
Accurate and reliable data on user behaviour on your landing pages is the key to successful advertising campaigns. By using Keitaro's tracking scripts and integrating them into your landing pages, taking into account the technical capabilities of your resource, you get a powerful tool for conversion analysis and optimisation.
Remember:
• All tracking scripts are customised and must be taken directly from your Keitaro account.
• If you require specific functionality, you can develop and implement custom scripts yourself, but their operation and support lies on your side.
• Follow the official documentation and guidelines to ensure the system works correctly and maximise the effectiveness of your campaigns.
• All tracking scripts are customised and must be taken directly from your Keitaro account.
• If you require specific functionality, you can develop and implement custom scripts yourself, but their operation and support lies on your side.
• Follow the official documentation and guidelines to ensure the system works correctly and maximise the effectiveness of your campaigns.
By the way, you can get a -20% discount on Keitaro Tracker by using our promo code ‘TraffCloud’.
