Automatic replacement of links on the website (Money Script)

If your website already has links to travel resources such as, Kiwitaxi, GetYourGuide and others, you can quickly replace them with Travelpayouts affiliate links. This will make money on users who follow the links and buy travel services.


Sign up for Travelpayouts affiliate network. Connect to the programs in the affiliate dashboard, whose links you want to replace. Follow the instructions below.

Please note! You’ll need minimal knowledge of HTML or the assistance of a developer.

Script placement

All the work on replacing links is done by a special script:

<script async="" 
&exclude=yyy,zzz" type="text/javascript"></script>

Set the following parameters in the script:

  • marker — your affiliate ID
  • exclude — ID of the programs, the links to which the script should not change on the website (optional). This option allows you to exclude programs that you work with directly. The program ID can be obtained from the link to it in your user dashboard. For example, https://www., where 84 is the program ID

Place the script in the website code before the closing tag — </head>.

If you use WordPress (or another constructor, where the <head> … </head> section is configured separately from the content), then the script can be placed once in the header.php file:


In all other cases, you can use Google Tag Manager and add a script through it.

Note: if you don't need the script anymore — just delete the code from head tag.

Functional check

If the script is placed correctly, then clickthrough on links to advertisers' websites will be redirected to your Travelpayouts affiliate links. However, the links in the article itself will not change. The script can handle regular links (for example, and affiliate links (

Follow the links and in a few minutes open the statistics in the affiliate dashboard — the values in the table will change with each click through.

If you used a link shortener or other tool to hide links to third-party websites, the script will not be able to process them. The behavior of such links will remain unchanged.