How to manually create deep links to search results for flight tickets and hotels from Trip.com.
Once you've connected tothe Trip.com program, you can start posting affiliate links to the brand site on your resources. However, Trip.com does not support a deep link creation form or Google Chrome extension, so you will only find ready-made links in the Tools tab.
But there is still a way to manually create links to search results for specific flights and hotels on trip.com and set the exact parameters that will be displayed once you click the link.
Creating such a link consists of three steps:
- Manually creating a link to flights or hotels search using a template;
- Encoding the link;
- Turning a link into an affiliate link with your ID.
This article will guide you through every step of the process.
Step 1: Create a link using a template
Templates for flight and hotel links are different, please select the template you need below and follow the instructions to fill in the parameters with the required values.
Links to airline tickets.
Link template:
https://{site}.trip.com/flights/welcome/?to=list&flighttype=one_way,round_or_multicity&dcity=departure_city_code&acity=arrival_city_code&startdate=departure_date&quantity=number_of_adults
In this template you can specify values for the following parameters:
- site (required) — site language, versions of site languages can be found via the link: https://www.trip.com/
- flighttype (required) — flight option:
- s — one-way flight
- r — round trip flight
- m — complex search
- dcity (required) — IATA of the city of departure
- acity (required) — IATA of the city of arrival
- startdate (optional) — departure date in the YYYY-MM-DD format
- returndate (optional) — return date in the YYYY-MM-DD format (you can omit it for flighttype=s)
- quantity (optional) — number of passengers
You can delete optional parameters, in case you don’t need them.
As a result, for example, the link for Paris-Madrid round trip flight 01.06.23-10.06.23 for one passenger will look like this:
https://uk.trip.com/flights/welcome?to=list&flighttype=rt&dcity=PAR&acity=MAD&startdate=2023-06-01&returndate=2023-06-10&quantity=1
Links to hotels
Link format: https://{site}.trip.com/hotels/w/list/?city=city_id&checkin=checkin_date&checkout=checkout_date
In this template you can specify values for the following parameters:
- site (required) — site language, versions of site languages can be found via the link: https://www.trip.com/
- city (required) — ID of the city from the database trip.com (the city codes can be found in the Cityid file list.xlsx)
- checkin (optional) — check-in date in the YYYY-MM-DD format
- checkout (optional) — check-out date in the YYYY-MM-DD format
Example of the final link: https://uk.trip.com/hotels/w/list/?city=2&checkin=2022-12-19&checkout=2022-12-21
More examples of links can be found in the Universal Link file 0421.xlsx.
Step 2: Encode the link
At this stage, you need to encode the created link. To do this you can use any online service convenient for you, for example: testigma.com, urlencoder.org, etc.
To encode a link, copy and paste it into the special field on the selected service and click Encode.
The link should be converted as follows:
Original link:
https://uk.trip.com/flights/welcome?to=list&flighttype=rt&dcity=PAR&acity=MAD&startdate=2023-06-01&returndate=2023-06-10&quantity=1
Encoded link:
https%3A%2F%2Fuk.trip.com%2Fflights%2Fwelcome%3Fto%3Dlist%26flighttype%3Drt%26dcity%3DPAR%26acity%3DMAD%26startdate%3D2023-06-01%26returndate%3D2023-06-10%26quantity%3D1
Step 3: Create an affiliate link
Once you have created a flight or hotel search link and encoded it, you need to transform it into a Travelpayouts affiliate link. Without doing this, clicks on links and any following purchases made will not be included in the statistics in your Travelpayouts dashboard and you will not be able to receive rewards.
To create an affiliate link, paste the encoded link from the previous step into the following form:
https://c121.travelpayouts.com/click?shmarker=YOUR_PARTNER_ID.YOUR_SUB_ID&promo_id=5218&source_type=customlink&type=click&trs=YOUR_PROJECT_ID&custom_url=ENCODED_LINK
You need to enter the following parameters in the template:
- shmarker:
- your partner ID (required) — this is your unique ID, which can be found in the upper right corner of your Travelpayouts dashboard.;
- SubID (optional) — this parameter allows you to track clicks and purchases made using specific tools or through specific traffic sources. If you want to see this information in your statistics, manually enter a value here, for example, tripmadrid. You can find more information in our SubID article;
- trs (required) — this is an ID of your Travelpayouts Project connected to the Trip.com program. You can find this ID in the Projects section of your dashboard:
After adding all the necessary parameters you will get an affiliate link of the following kind:
https://c121.travelpayouts.com/click?shmarker=442709&promo_id=5218&source_type=customlink&type=click&trs=235484&custom_urlhttps%3A%2F%2Fuk.trip.com%2Fflights%2Fwelcome%3Fto%3Dlist%26flighttype%3Drt%26dcity%3DPAR%26acity%3DMAD%26startdate%3D2023-06-01%26returndate%3D2023-06-10%26quantity%3D1
, where
- 442709 — is a partner ID
- SubID is not provided
- 235484 — is an ID of a Project
Copy and paste the final link on your website or another resource. When the user clicks it, they will be immediately directed to the search results for tickets or hotels according to the specified parameters. Such links will increase the chances of purchase because users won't have to waste time filling out the form. All purchases made through this link will be displayed in your statistics and you will receive rewards.