1. Home
  2. Knowledge Base
  3. ThirstyAffiliates (Free Version)
  4. How to omit IP’s from Click tracking
  1. Home
  2. Knowledge Base
  3. ThirstyAffiliates Pro
  4. How to omit IP’s from Click tracking

How to omit IP’s from Click tracking

By default ThirstyAffiliates blocks bots accessing your affiliate links to give you more appropriate data in the report.

In order to block additional bot(s), you should add them to the “Blocked bots” list under ThirstyAffiliates->Settings->General section:

If bots have a useragent that can identify them as not genuine users you can add them to the “Blocked bots” list shown above.

If needed, ask your webhost to get the useragent from hits that can be found in the access logs.

HOW CAN I OMIT IP'S FROM CLICK TRACKING?

ThirstyAffiliates doesn't have an IP block list option currently, but with some custom code, you can stop clicks being tracked for a specific range of IPs.

It won't have any negative SEO effect, it'll simply not record clicks for the IP address that starts with any value (like 107.178 in the example below).

Insert the following code snippet using the Code Snippets plugin:

 add_filter('ta_filter_before_save_click', function ($skip) { $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; if ($ip && preg_match('/^107\.178\./', $ip)) { $skip = true; } return $skip; });

Make sure to replace 107 and 178 values with the starting values of the IP address you wish to omit.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support
en_USEnglish