Conversion tracking
Two events tell us what happened after we sent you a traveller: a landing when they arrive on your site, and a conversion when they book. Both carry the FlightGPT click id from the deeplink.
The click id
Every deeplink we open carries a click id, by default in the fgpt_click_id parameter (we can use another name if you need to):
https://www.youragency.in/booking?fare=ABC123&fgpt_click_id=4f9c2a7e1b3d8e60
Store it when the traveller lands — in their session or with the cart — so it is still available on your confirmation page. The click id is valid for landing events for 7 days and for conversions for 30 days.
You also get a fixed conversion id (for example c-fgpt-youragency) that identifies you in every event, and a secret partner key for server calls and your statement. Keep the key on your server; never put it in a web page.
Three ways to send events
| Method | How | When to use it |
|---|---|---|
| Server to server (recommended) | Your backend calls our endpoint with your partner key. | Always, if you can. Ad blockers and closed tabs cannot lose it. |
| Image pixel | An <img> tag on the page. | When you can only change page templates. |
| JavaScript library | Our small script reads and stores the click id for you. | When your confirmation page cannot see the click id. |
1. Landing (pre-conversion)
Send a landing event once the page the traveller arrives on has loaded. If your flow has several pages, send one per stage with the same click id.
POST https://flightgpt.in/partner/v1/landing
Authorization: Bearer <your partner key>
Content-Type: application/json
{
"conversion_id": "c-fgpt-youragency",
"click_id": "4f9c2a7e1b3d8e60",
"total_quote_value": "12599.00",
"quote_currency_code": "INR",
"status": "available",
"stage": "booking-page",
"has_upsell": false,
"has_ancillaries": false
}
| Field | Required | Meaning |
|---|---|---|
conversion_id | yes | Your fixed FlightGPT partner id. |
click_id | yes | From the deeplink. |
total_quote_value | when available | Total the traveller sees, all mandatory charges included, lowest payable price. Digits and one dot only. |
quote_currency_code | when a value is sent | ISO 4217, normally INR. |
status | yes | available — the deal is bookable · not_available — sold out or price gone · invalid — the link could not be read. |
stage | yes | search-page — the traveller can still change flight or room · booking-page — entering traveller details or extras · checkout-page — entering payment. |
has_upsell | no | true if the traveller moved to a higher fare or rate than the one we showed. |
has_ancillaries | no | true if the traveller added extras such as seats or insurance. |
The same event as an image pixel:
<img src="https://flightgpt.in/partner/v1/landing?conversion_id=c-fgpt-youragency&click_id=4f9c2a7e1b3d8e60&total_quote_value=12599.00"e_currency_code=INR&status=available&stage=booking-page" width="1" height="1" alt="" style="display:none">
2. Conversion
Send a conversion when a booking is created, and again whenever its status changes. The pair click_id + transaction_id identifies the booking, so repeating an event (a refreshed thank-you page, say) updates it instead of counting it twice.
POST https://flightgpt.in/partner/v1/conversion
Authorization: Bearer <your partner key>
Content-Type: application/json
{
"conversion_id": "c-fgpt-youragency",
"click_id": "4f9c2a7e1b3d8e60",
"transaction_id": "PNR8K2Q",
"total_booking_value": "12599.00",
"bv_currency_code": "INR",
"commission": "377.97",
"comm_currency_code": "INR",
"status": "confirmed"
}
| Field | Required | Meaning |
|---|---|---|
conversion_id | yes | Your fixed FlightGPT partner id. |
click_id | yes | From the deeplink. |
transaction_id | yes | Your booking reference (PNR or booking id). Must stay the same for the same booking. |
total_booking_value | yes, unless cancelled | Total the traveller paid. Digits and one dot only — no commas, no symbols. |
bv_currency_code | yes | ISO 4217, normally INR. |
commission | recommended | The commission you calculate for FlightGPT. Digits and one dot; no % sign. |
comm_currency_code | with commission | ISO 4217. |
status | yes | confirmed, pending or cancelled. |
We bill on your agreed terms and show the commission you reported next to it. If the two differ, both of us can see it in the statement.
The same event as an image pixel, for your confirmation page only:
<img src="https://flightgpt.in/partner/v1/conversion?conversion_id=c-fgpt-youragency&click_id=4f9c2a7e1b3d8e60&transaction_id=PNR8K2Q&total_booking_value=12599.00&bv_currency_code=INR&commission=377.97&comm_currency_code=INR&status=confirmed" width="1" height="1" alt="" style="display:none">
3. JavaScript library
Put this in the <head> of your landing and confirmation pages. It saves the click id on arrival, so the confirmation page does not need it in the URL.
<script>
!function(w,d){w.fgpt=w.fgpt||function(){(w.fgpt.q=w.fgpt.q||[]).push(arguments)};
var s=d.createElement("script");s.async=1;s.src="https://flightgpt.in/partner/v1/pixel.js";
d.head.appendChild(s)}(window,document);
fgpt("init", "c-fgpt-youragency");
</script>
Then, on the landing page:
fgpt("track", "landing", {
total_quote_value: "12599.00", quote_currency_code: "INR",
status: "available", stage: "booking-page"
});
And on the confirmation page:
fgpt("track", "conversion", {
transaction_id: "PNR8K2Q", total_booking_value: "12599.00", bv_currency_code: "INR",
commission: "377.97", comm_currency_code: "INR", status: "confirmed"
});
Responses
Server calls get JSON: 200 with {"ok": true} when recorded, or an error with a reason. Pixels always return a 1×1 image; the HTTP status tells you whether it was recorded, which you can see in your browser's network tab.
| Status | Meaning |
|---|---|
400 | A field is missing or badly formatted — the error says which. |
401 | The partner key does not belong to that conversion id. |
404 | We do not know that click id for your account. |
422 | The click is outside its window: 7 days for landings, 30 days for conversions. |
Your statement
GET https://flightgpt.in/partner/v1/report?from=2026-10-01&to=2026-10-31
Authorization: Bearer <your partner key>
Returns your clicks, valid visitors, landings and price accuracy, confirmed / pending / cancelled bookings, commission on both our and your figures, and the amount due, plus each conversion in conversion_list. Dates are in India time; the range can be up to a year.
Testing
- We set your account to testing: your deals appear only in our team's preview sessions, and no clicks are billed.
- Click one of your deals on FlightGPT, and check your landing event arrives (your statement shows it).
- Make a test booking and send the conversion with
status=cancelledwhen you cancel it. - Tell us the transaction id; we confirm both events matched, then go live.