# Frequenly Asked Questions (FAQ)

# General Questions

# How to install Keitaro

Read our knowledge base page.

# Trial license limitations

The trial license has all the features of a Professional license but limited by:

  • two campaigns;
  • two streams in each campaign;
  • only one filter can be used in a single stream.

# I did the upgrade but Pro features are unavailable

Click on admin > Update the license in the upper right corner of the tracker.

# What are server requirements?

Read our requirements page.

# What do the errors in a log mean?

Read Troubleshooting.

# What will happen after the license expire?

The tracker will stop all the redirects and its work.

# Can I install several Keitaros with one license?

Only in case all the licenses will be used on a server with the same ip.

# How to change the license IP

You can change the license IP in your account on https://keitaro.io.

# Using Keitaro

# How to add domains

  1. Buy Pro license

  2. Add an A-record to your domain’s DNS:

@ A x.x.x.x where x.x.x.x is your server’s IP.

Read more at Domains page.

# Why doesn't the stream work, or why does the click go to a wrong stream?

  1. Go to the “Maintenance > Logs > Traffic” page.
  2. Enable traffic log.
  3. Make a click, or wait until a click gets into a wrong stream.
  4. Look at a traffic log. There you'll be able see how the sream filters have just functioned.

Also, have a look at the “Additional > Traffic Simulation” menu. You can emulate getting any user to a campaign there.

# How to find out the reasons for traffic loss

  • Compare the number of “raw” clicks (heats), not the unique ones. Keitaro uses its own algorithms for uniqueness.
  • Compare the stats in the same time zone with the affiliate network.
  • Check your domain’s SSL-certificate.
  • (ONLY for the trackers installed via the terminal). Go to Maintenance > Status and check the max children reached. If the value is more than 10, write to our support team, we will help you to set up PHP-FPM.
  • In case you use shared hosting or a server with ISPmanager – reinstall the tracker using our current solution for servers How to Install Keitaro.
  • Check your scripts work in AdBlock.
  • A lot of bot can stuck in the redirects such as meta-redirect or double meta-redirect. Keitaro could not mark them as bots, but some bots can’t go through these types of redirects. To check this, make a redirect to another campaign and see the difference.
  • Check all the streams, make sure all destinations work.
  • Check Maintenance > Logs > System Log for errors.
  • If you use CloudFlare, switch Firewall to “essentially off”. Disable the compression.
  • Validate your domains with host-tracker.com, http://urlvoid.com and http://virustotal.com.
  • In case Keitaro is integrated with Script or Iframe, the traffic loss could happen because bots or browsers with high level security settings are visiting the page.
  • Check your log-file access.log from nginx with server requests. Check if there are 500 or 502 errors, e.g.: 84.154.60.91 - - [16/Nov/2017:03:36:01 +0200] "GET /cmp HTTP/1.1" 502 1243 "http://test.com. 502 means your server doesn’t cope with the traffic, 500 means the errors in tracker’s work (see Maintenance > Logs).

# Why there’s no conversions or a postback doesn’t work?

Read Postbacks page.

# What is an admin panel address?

http://your_domain/admin

# How to reset Keitaro password

Read How to Reset a Password for Keitaro.

# The license period haven’t extended after I bought the license

  • Check your license key and the one saved in /var/license/key.lic file;
  • Delete /var/license/hash.lic file.

# How can a license key be changed?

Write a new key in /var/license/key.lic and delete the /var/license/hash.lic file.

# Why counter numbers at LiveInternet (Metrics) website and Keitaro are different?

If the website is the source of traffic:

  • Check if the domain is present in antivirus databases through virustotal.com;
  • Check if there are problems in Keitaro functionality, check the logs /var/log/errors.log и keitaro_errors.log;

If the website is the traffic receiver:

  • Compare hits, uniques are counted differently in different systems. If the server statistics, for example, WebStat is installed, check their indices.
  • Keitaro can skip the bots if those do not load the counters;
  • Counters may be blocked by browser plugins.

# Why does FB and Keitaro stats differ?

Possible reasons:

  • Your ads are visited by spy services like AdMobiSpy;
  • You compare the stats in different time zones or for different periods.
  • Facebook doesn’t calculate repeated clicks, check unique clicks.
  • Disable Prefetch settings (Maintenance > Settings).
  • You are using an old klick_client.php library or WP plugin.

# Why is the domain with Keitaro marked as "Malicious site"?

Some services give the website “Malicious site” status for redirection to another domain.

To avoid it:

  • Create a file main.html with any content in the domain directory;
  • Open the page “Maintenance > Settings > Misc > Domain Action”;
  • Choose action “Redirect to URL” and write URL of the created file.

# How can I replace or hide a referrer?

Read How to Hide Referrer page.

# How can I correct keywords encoding?

Add the parameter charset=utf-8 to the links to your campaigns.

# How to restrict access to the admin panel?

Apache.

Create an /admin/.htaccess file with the following contents:

<Files index.php>
order Deny,Allow
Deny from all
Allow from 1.2.3.4
</Files>

Nginx.

Add this to host section /etc/nginx/nginx.conf:

location /admin/index.php {
    allow 1.2.3.4;
    deny all;
}

# How to add empty space to your server

  1. Go to Maintenance > Settings > System and set up the Stats store term.

  2. Clean up the Redis dumps in Termonal. It will delete draft data:

rm -r /var/lib/redis/*

  1. If you upgraded from Keitaro v.7 you can delete old tables in Terminal:
export DB_NAME='keitaro'
export DB_USER='root'
mysql -u $DB_USER  -e 'show tables' $DB_NAME | grep -e 'keitaro_archive\|keitaro_index' | xargs -I "@@" mysql -u $DB_USER -e "TRUNCATE table \`@@\`" $DB_NAME
  1. You can delete stats to the exact date, but if there are many clicks in a database it may take a long time:
export DB_NAME='keitaro'
export DB_USER='root'
mysql -u $DB_USER  -e 'DELETE FROM keitaro_clicks WHERE datetime < "2018-01-01" ' $DB_NAME
  1. These commands can optimize the clicks in the stats and free some space. Important! These inquiries will block the database during the implementation and require additional free space on a disk.
export DB_NAME='keitaro'
export DB_USER='root'
mysql -u $DB_USER -e 'optimize table keitaro_clicks' $DB_NAME
mysql -u $DB_USER -e 'optimize table keitaro_conversions' $DB_NAME
mysql -u $DB_USER -e 'optimize table keitaro_visitors' $DB_NAME
mysql -u $DB_USER -e 'optimize table keitaro_ref_ips' $DB_NAME
mysql -u $DB_USER -e 'optimize table keitaro_ref_referrers' $DB_NAME
mysql -u $DB_USER -e 'optimize table keitaro_ref_user_agents' $DB_NAME
  1. You can clean all the current stats completely with the following commands:
export DB_NAME='keitaro'
export DB_USER='root'
mysql -u $DB_USER -e 'truncate keitaro_ip_sessions' $DB_NAME
mysql -u $DB_USER -e 'truncate keitaro_clicks' $DB_NAME
mysql -u $DB_USER -e 'truncate keitaro_visitors' $DB_NAME
  1. With the following code you can delete the stats and add empty space to your server:

cd /var/www/keitaro && sudo -u keitaro php bin/cli.php system:delete_all_stats

Deletes the stats and adds the free space on a disk.

After the command is run you'll get a warning:

[WARNING] Important! The following will happen:
           - old versions tables removal,
           - clicks stats to the exact date removal (if specified in parameters),
           - optimization of the clicks in the stats,
           - cleaning all the current stats completely (if specified in parameters).

           These inquiries will block the database
           during the implementation and require additional free space on a disk.

Next, confirm the command yes/no.

The stats will be deleted.

# How to free inodes usage?

If your tracker started to work incorrectly, and you are seeing messages about low disk space (while df -h showing you that you have enough disk space) - in such case it may be, that inodes usega on your server is close to it's capacity. Inodes - is a file descriptors in Linux, which are stores the attributes and disk block locations of the object's data. File-system object attributes may include metadata (times of last change, access, modification), as well as owner and permission data. When number of innodes is close to 0 - that means your OS is insufficient of file descriptors (inodes) In such case, you need to delete those files. For searching inodes you need to use following command

df -i

We will recieve output of structure of your file system with a list of inodes number per directry. Now you need to follow the directory with the biggest number of inodes in your system - you need to go in directory with biggest inodes number and look for the folder with the biggest inodes number. Finaly you will find folder with a biggest inode count number. After that - you will need to delete this folder with following command:

rm -rf deletedfolder/ 

Where deletedfolder/ - name of folder with the biggest inode number which you are need to delete. WARNING Please verify folder which you will going to delete - your target is to delete folder with most of files descriptors (or biggest inode number) BUT not a system files of your OS of server. If you are not sure what are you doing - it is better to refer to our technical support which will help you gladly to free inodes usage on your server. In other case, you are risking to make your server unworkable and our technical support will not provide help for non-working servers.

# How to see the admin visiting hiostory

The access log is saved in /var/log/nginx/admin.access.log. You can check the log with the terminal the following way:

less /var/log/nginx/admin.access.log

Or request the last logins:

tail -n 100 /var/log/nginx/admin.access.log

# VPS works slowly

This could happen because of the lack of CPU resources for your virtual server. Run the command:

vmstat 1 5

As a result you’ll see the following table:

procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
111  0      0 3438984  20280 603200    0    0    11    20   38   85 10  2 32  0 56
139  0      0 3435676  20280 603220    0    0     0     0  936  318 15  3  0  0 82
126  0      0 3434312  20280 603212    0    0     0     0  903  198 14  4  0  0 82
92  0      0 3450964  20280 603868    0    0     0     0  885  198 13  3  0  0 83
145  1      0 3452128  20280 604412    0    0   448     0  993  254 14  2  0  0 84

Pay attention to the last column st. If the value is more than 0 – your VPS has unsufficient resources. Contact your server provider in this case.

Last Updated: 5/14/2020, 3:56:19 PM