November 13, 2017

Magic script for content substitution

Recently, we talked about the way you can use AdsBridge to track organic traffic (read here). Many of you have also asked about a solution for substituting different content, depending on the parameters of a click that came to the landing page. Is it possible, you ask? Of course, you just need to add a special script.

There are several parameters in this script that will help you filter out traffic: operating system, country, IP, token in the link and referer (redirect link). The archive with the code and required basis are available here .


Setting steps:

1) Unzip the archive into the folder with your landing page.

2) Open the example.php file.

3) Set filter conditions in the lines 4-11.

  •     os_white
  •     country_white
  •     ip_black
  •     tokens_black
  •     referer


The logic is simple – for the os_white parameter, you need to specify the operating systems that are allowed for a landing page. For country_white – you set countries.

In case of ip_black and tokens_black parameters, the logic is different. Here you need to substitute the IP addresses and token values of the traffic that you don’t want to send to your LP, and instead, redirect it to the “white” page.

If you set referrer=1, all traffic with an empty referer link will go to the “white” LP. In case of the purchased traffic, the referer link is often not empty. This can be a domain of a traffic source or a publisher. An empty referer is a sign of the moderator’s visit.

4) Insert the code of your LP and “white” LP into the corresponding blocks (LP1 and LP2).

5) Rename the example.php to index.php.


Let’s review an example:

According to the conditions set here, the traffic with Windows and Linux operating systems, from the US and the UK, with IP addresses not equal to 26.0.001,, and token values not equal to {token}, {token1} will be sent to LP1. This means that if one of the conditions is not met, the LP2 will be displayed.

Take the script and use it for your campaigns. Got questions? Leave them in the comments below or write an email to our customer support.


Wish you high conversions!

The AdsBridge Team

Leave a commentYour email address won’t be published. All field marked with an * are required.

1 comment