JavaScript API
Call Hosted Package methods after the script loads and send custom analytics events.
JavaScript API
Call Hosted Package methods after the script loads and send custom analytics events. First, complete the installation.
JavaScript API
Use window.Tiquo.ready when you want to call the API after the script loads.
<script>
window.Tiquo.ready(function (tiquo) {
tiquo.track("booking_started", {
eventName: "Booking Started",
eventProperties: {
source: "homepage"
}
});
});
</script>Available methods:
Tiquo.ready(callback)Tiquo.track(eventType, options)Tiquo.identify(options)Tiquo.sendOTP(email)Tiquo.verifyOTP(email, code)Tiquo.getUser()Tiquo.updateProfile(updates)Tiquo.createEnquiry(input)Tiquo.uploadProfilePhoto(photo)Tiquo.logout()Tiquo.getOrders(options)Tiquo.getBookings(options)Tiquo.getMemberships()Tiquo.getGuestFlows()Tiquo.getWalletCardLinks(options)Tiquo.getUpcomingBookings(options)Tiquo.getPolicies()Tiquo.getPolicy(id)Tiquo.getFlowServices(bookingConfigId)Tiquo.getFlowService(bookingConfigId, serviceId)Tiquo.getIframeToken(customerFlowId, handoffVersion)Tiquo.embedCustomerFlow(flowUrl, container, options)Tiquo.embedServiceBooking(bookingConfigId, serviceId, container, options)Tiquo.embedMembership(planId, container, options)Tiquo.render()Tiquo.onAuthStateChange(callback)Tiquo.setConsent(mode)Tiquo.getConsent()
Hosted Package JavaScript API
Inspect every public method, grouped by authentication, customer data, catalogs, embeds, analytics, rendering, and consent.
window.Tiquo
Complete public method set
Every available JavaScript method
23 fieldsRun after load
Tiquo.ready(callback)
Track an event
Tiquo.track(eventType, options)
Identify a customer
Tiquo.identify(options)
Send a one-time code
Tiquo.sendOTP(email)
Verify a one-time code
Tiquo.verifyOTP(email, code)
Get the current customer
Tiquo.getUser()
Log out
Tiquo.logout()
Get orders
Tiquo.getOrders(options)
Get bookings
Tiquo.getBookings(options)
Get memberships
Tiquo.getMemberships()
Get upcoming bookings
Tiquo.getUpcomingBookings(options)
Get business policies
Tiquo.getPolicies()
Get one business policy
Tiquo.getPolicy(id)
Get flow services
Tiquo.getFlowServices(bookingConfigId)
Get one flow service
Tiquo.getFlowService(bookingConfigId, serviceId)
Get an iframe token
Tiquo.getIframeToken(customerFlowId, handoffVersion)
Embed a customer flow
Tiquo.embedCustomerFlow(flowUrl, container, options)
Embed a service booking
Tiquo.embedServiceBooking(bookingConfigId, serviceId, container, options)
Embed a membership
Tiquo.embedMembership(planId, container, options)
Render bound elements
Tiquo.render()
Watch authentication
Tiquo.onAuthStateChange(callback)
Set consent
Tiquo.setConsent(mode)
Get consent
Tiquo.getConsent()
Call methods inside Tiquo.ready when they depend on the Hosted Package being loaded.
The Hosted Package does not expose raw access or refresh token getters.