Skip to content

Instantly share code, notes, and snippets.

@darioielardi
Created November 11, 2025 21:34
Show Gist options
  • Select an option

  • Save darioielardi/6969ba64c88a952d2f86da0cb9f91b01 to your computer and use it in GitHub Desktop.

Select an option

Save darioielardi/6969ba64c88a952d2f86da0cb9f91b01 to your computer and use it in GitHub Desktop.
tracking-events.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/TrackingEvents",
"definitions": {
"TrackingEvents": {
"type": "object",
"additionalProperties": false,
"properties": {
"openLoginModal": {
"$ref": "#/definitions/TrackingParams%3Cstructure-tracking_auth.ts-919-955-tracking_auth.ts-903-956-tracking_auth.ts-839-956-tracking_auth.ts-800-1541-tracking_auth.ts-0-1542%3E",
"description": "User opens the login modal"
},
"startLogin": {
"$ref": "#/definitions/TrackingParams%3Cstructure-tracking_auth.ts-1072-1108-tracking_auth.ts-1056-1109-tracking_auth.ts-956-1109-tracking_auth.ts-800-1541-tracking_auth.ts-0-1542%3E",
"description": "User starts the login process through one of the available methods"
},
"completeLogin": {
"$ref": "#/definitions/TrackingParams%3Cstructure-tracking_auth.ts-1207-1309-tracking_auth.ts-1191-1310-tracking_auth.ts-1109-1310-tracking_auth.ts-800-1541-tracking_auth.ts-0-1542%3E",
"description": "User successfully completes the login process"
},
"userLogged": {
"type": "object",
"properties": {
"accountID": {
"type": "string"
}
},
"required": [
"accountID"
],
"additionalProperties": false,
"description": "User is logged in (only fired on page load if the user is already logged in). We're not using `TrackingParams` here because the `sectionFrom` param is not needed."
},
"tourStatusInteraction": {
"type": "object",
"additionalProperties": false,
"properties": {
"status": {
"$ref": "#/definitions/TourStatus"
},
"wishlisted": {
"type": "boolean"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"status",
"wishlisted"
]
},
"shareTravel": {
"type": "object",
"additionalProperties": false,
"properties": {
"shareTravelChannel": {
"$ref": "#/definitions/ShareTravelChannel"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"shareTravelChannel"
]
},
"eventSeeMap": {
"type": "object",
"properties": {
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom"
],
"additionalProperties": false
},
"eventSeeImage": {
"type": "object",
"additionalProperties": false,
"properties": {
"imagePosition": {
"type": "number"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"imagePosition",
"sectionFrom"
]
},
"trustpilotWidgetLoaded": {
"type": "object",
"additionalProperties": false,
"properties": {
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom"
]
},
"trustpilotWidgetInteraction": {
"type": "object",
"additionalProperties": false,
"properties": {
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom"
]
},
"interactionSearchFlight": {
"type": "object",
"additionalProperties": false,
"properties": {
"missingDaysToDeparture": {
"type": "number"
},
"status": {
"$ref": "#/definitions/TourStatus"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom"
]
},
"addFilterEvent": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "status"
},
"value": {
"$ref": "#/definitions/TourStatus"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"type",
"value"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"withUnbookable",
"discounted",
"isNoSharingRoomAvailable"
]
},
"value": {
"type": "boolean"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"type",
"value"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"price",
"travelType",
"duration",
"travelStyles",
"costCenters",
"ageRange",
"SERP"
]
},
"value": {
"type": "string"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"type",
"value"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "badges"
},
"id": {
"type": "string"
},
"value": {
"type": "string"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"id",
"sectionFrom",
"type",
"value"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "destination"
},
"value": {
"anyOf": [
{
"$ref": "#/definitions/BrandType%3Cstring%2C%22continentName%22%3E"
},
{
"$ref": "#/definitions/BrandType%3Cstring%2C%22countryName%22%3E"
}
]
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"type",
"value"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "period"
},
"value": {
"type": "string"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"type",
"value"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"custom-starting-date",
"custom-ending-date"
]
},
"value": {
"type": "string"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"type",
"value"
]
}
]
},
"removeFilterEvent": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "status"
},
"value": {
"$ref": "#/definitions/TourStatus"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"type",
"value"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"withUnbookable",
"discounted",
"isNoSharingRoomAvailable"
]
},
"value": {
"type": "boolean"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"type",
"value"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"price",
"travelType",
"duration",
"travelStyles",
"costCenters",
"ageRange",
"SERP"
]
},
"value": {
"type": "string"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"type",
"value"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "badges"
},
"id": {
"type": "string"
},
"value": {
"type": "string"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"id",
"sectionFrom",
"type",
"value"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "destination"
},
"value": {
"anyOf": [
{
"$ref": "#/definitions/BrandType%3Cstring%2C%22continentName%22%3E"
},
{
"$ref": "#/definitions/BrandType%3Cstring%2C%22countryName%22%3E"
}
]
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"type",
"value"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "period"
},
"value": {
"type": "string"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"type",
"value"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"custom-starting-date",
"custom-ending-date"
]
},
"value": {
"type": "string"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"type",
"value"
]
}
]
},
"openSearchFilters": {
"type": "object",
"properties": {
"section": {
"type": "string",
"enum": [
"custom",
"when",
"where"
]
}
},
"required": [
"section"
],
"additionalProperties": false
},
"showFilterResults": {
"type": "object",
"properties": {
"resultsAmount": {
"type": "number",
"description": "The number of results the user would get applying the filters"
},
"destinationQuantity": {
"type": "number",
"description": "The amount of destinations selected by the user"
},
"sectionFrom": {
"type": "string",
"enum": [
"custom",
"when",
"where"
]
}
},
"required": [
"resultsAmount",
"destinationQuantity",
"sectionFrom"
],
"additionalProperties": false
},
"completeFilteredSearch": {
"type": "object",
"properties": {
"price": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"sectionFrom": {
"type": "string",
"enum": [
"suggested-range",
"custom-range"
]
}
},
"required": [
"value",
"sectionFrom"
],
"additionalProperties": false
},
"destinationQuantity": {
"type": "number",
"description": "The amount of destinations selected by the user"
},
"continentQuantity": {
"type": "number",
"description": "The amount of continents selected by the user"
},
"sectionFrom": {
"type": "string",
"enum": [
"custom",
"when",
"where"
]
}
},
"required": [
"price",
"sectionFrom"
],
"additionalProperties": false
}
},
"required": [
"addFilterEvent",
"completeFilteredSearch",
"completeLogin",
"eventSeeImage",
"eventSeeMap",
"interactionSearchFlight",
"openLoginModal",
"openSearchFilters",
"removeFilterEvent",
"shareTravel",
"showFilterResults",
"startLogin",
"tourStatusInteraction",
"trustpilotWidgetInteraction",
"trustpilotWidgetLoaded",
"userLogged"
],
"description": "A map of type definitions for all the tracking events."
},
"TrackingParams<structure-tracking_auth.ts-919-955-tracking_auth.ts-903-956-tracking_auth.ts-839-956-tracking_auth.ts-800-1541-tracking_auth.ts-0-1542>": {
"type": "object",
"additionalProperties": false,
"properties": {
"source": {
"$ref": "#/definitions/AuthTrackingSource"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"sectionFrom",
"source"
],
"description": "A utility type to define tracking params objects, combining the generic tracking params with event-specific params."
},
"AuthTrackingSource": {
"type": "string",
"enum": [
"notifyMe",
"wishlist",
"groupInfo",
"loginSignup"
]
},
"SectionFrom": {
"type": "string",
"enum": [
"serp",
"home",
"main-filters",
"quick-filters",
"custom",
"when",
"where",
"menu",
"travel-card-map",
"thumbnails",
"carousel",
"travel-cover",
"travel-gallery",
"Departure Popup",
"tours-list",
"tours-calendar",
"travel-coordinators",
"tour-card",
"tour-cover",
"tour-gallery",
"tour-group-info",
"tour-coordinator",
"travel-flight-search",
"tour-flight-search",
"wishlist-modal-tour-wishlisted",
"wishlist-modal-tour-not-wishlisted",
"itinerary",
"collection",
"weroadx",
"travel-description",
"tour-description",
"header",
"footer",
"trip-package-info",
"travel-info-box",
"itinerary-sticky-footer",
"top-seller",
"latest-viewed",
"is-this-trip-for-me",
"trending-now",
"most-wished",
"first-timer",
"best-sellers",
"on-a-budget",
"new-itineraries",
"travel-type-filters",
"travel-short-description",
"travel-reviews",
"modal-available-dates"
]
},
"TrackingParams<structure-tracking_auth.ts-1072-1108-tracking_auth.ts-1056-1109-tracking_auth.ts-956-1109-tracking_auth.ts-800-1541-tracking_auth.ts-0-1542>": {
"type": "object",
"additionalProperties": false,
"properties": {
"method": {
"$ref": "#/definitions/AuthTrackingMethod"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"method",
"sectionFrom"
],
"description": "A utility type to define tracking params objects, combining the generic tracking params with event-specific params."
},
"AuthTrackingMethod": {
"type": "string",
"enum": [
"mail",
"google",
"apple"
]
},
"TrackingParams<structure-tracking_auth.ts-1207-1309-tracking_auth.ts-1191-1310-tracking_auth.ts-1109-1310-tracking_auth.ts-800-1541-tracking_auth.ts-0-1542>": {
"type": "object",
"additionalProperties": false,
"properties": {
"source": {
"$ref": "#/definitions/AuthTrackingSource"
},
"method": {
"$ref": "#/definitions/AuthTrackingMethod"
},
"userType": {
"$ref": "#/definitions/AuthTrackingUserType"
},
"sectionFrom": {
"$ref": "#/definitions/SectionFrom"
},
"travelId": {
"type": "string"
},
"tourId": {
"type": "string"
}
},
"required": [
"method",
"sectionFrom",
"source",
"userType"
],
"description": "A utility type to define tracking params objects, combining the generic tracking params with event-specific params."
},
"AuthTrackingUserType": {
"type": "string",
"enum": [
"newUser",
"existingUser"
]
},
"TourStatus": {
"type": "string",
"enum": [
"ALMOST_CONFIRMED",
"CONFIRMED",
"PLANNED",
"ALMOST_FULL",
"WAITING_LIST",
"SOLD_OUT"
]
},
"ShareTravelChannel": {
"type": [
"string",
"null"
],
"enum": [
"link",
"email",
"facebook",
"whatsapp",
"messenger",
null
]
},
"BrandType<string,\"continentName\">": {
"type": "string"
},
"BrandType<string,\"countryName\">": {
"type": "string"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment