Travelpayouts Blog

Travelpayouts Money Script: How to turn all website links into affiliate links

Reading time:  3  min.

We released the Travelpayouts Money Script — a much-awaited tool that will help you to automatically turn all website links into affiliate links. Just add the Money Script to the site, and any links to advertisers websites, such as or GetYourGuide, that are available in our affiliate network, will become affiliate links and bring you income for every purchase.

How Travelpayouts Money Script works

In order to use the script, you need to be registered in Travelpayouts first (if you do not already have an account) and sign up for the affiliate programs with which you want to earn. 

Then you should add the script to your site. Below you will find a step-by-step guide on how to run a script. After you add the script, when a user clicks on a link on your website’s page, your Travelpayouts affiliate marker is automatically affixed to it. That is, the link becomes an affiliate and all clicks/reservations are taken into account — a commission is charged to you.

The script can handle both unlabeled links like,, and affiliate links, such as

Using the additional parameters, Include and Exclude, you can add rules and exceptions, such as which links the script will convert and ignore.

Who can use Travelpayouts Money Script?

Travelpayouts Money Script is a tool for the website owners. If you can change the code of your website, you can use the script. It’s useful in many cases, for example:

  • You have been blogging about travel for a long time, and you’ve tried different services and have recommended them to readers. You have good traffic, but you never thought about monetizing by the CPA model. Instead of manually wrapping links to the old articles, install Travelpayouts Money Script. It takes no more than half an hour and all old links will become the affiliate link.
  • You have been creating a blog or website for a long time and even work on the CPA model, but have used only one to two affiliate programs. The other services were given direct links. 30+ advertisers are now available in Travelpayouts, and we regularly join new ones. You can monetize articles that you wrote back when these affiliate programs were not in the system.
  • Your site has a lot of UGC content. For example, you have a blog where travelers share their travel reviews. You can monetize any link in their content using Money Script.

How to run a script

  • Sign up for Travelpayouts (if you do not yet have an account).
  • In your Travelpayouts dashboard, find out your unique affiliate marker. It is located in the upper right corner.
Affiliate marker
  • Add the script on the site between the <head> and </head> tags. If you have any other scripts installed, it is better to put Money Script last.
<script async="" 
&exclude=yyy,zzz" type="text/javascript"></script>
  • Add your affiliate marker from Travelpayouts account for the “marker” parameter.
  • After a few days, you can check the statistics in your Travelpayouts dashboard. If users interacted with the affiliate tools, then you will see it in the statistics.

IMPORTANT: During the pages load, the script receives a list of advertisers you are subscribed to in Travelpayouts. We only process links to the programs with which you subscribed. The more programs you subscribe to in Travelpayouts, the more opportunities you have to earn.

How to check a script

You can check the script before installation by executing the command indicated below once in the browser console. After reloading the page, everything will return as it was.

var script = document.createElement('script');
script.onload = function() {
  alert("Script loaded and ready");
script.src = 


Optional parameters

  • Exclude — if you want to exclude some affiliate programs, add their IDs to the “exclude” parameter. Each ID should be separated by commas. You can find the affiliate program’s ID in the link to affiliate program in the dashboard. For example, link to the JetRadar affiliate program: The JetRadar affiliate program ID is 100. If you do not want to exclude programs, simply remove this parameter from the script code.
  • Include — if you want to include some affiliate programs, add their IDs to the “exclude” parameter. Each ID should be separated by commas.

If something doesn’t work…

If you encounter problems or errors, write to [email protected].

Key benefits of Travelpayouts Money Script

  1. Easy to install. You will need no more than 30 minutes. If you have problems, write to Travelpayouts support.
  2. Flexibility. You can exclude links/programs with which you do not want to turn by the script.
  3. The ability to monetize any content type. Even user-generated content.
  4. Links look natural for the users. There is no need to use shorter before posting affiliate links to make them look more attractive.