Introducing the Agoda Widget: What is it, and why did we develop it?

Michael Abadi S.
Agoda Engineering & Design
4 min readJan 11, 2022

--

Agoda’s recent update to version 9.34 comes with a new Widget feature. Widget is one of the features introduced by Apple on its iOS 14 launch. With Widget, you can now view the latest travel offers available on the Agoda app. It shows you snippets of images and hotel prices for multiple destinations and allows you to directly access the app when you click on the preview shown in its Timeline.

At Agoda, our developers are committed to contributing ideas implementable on our product — one of them being Widget. It resulted from a collaboration between our Product owner and Property team developer. They saw Widget as a platform that could help increase the number of Agoda app visits and attract users to book their trips on the app.

We can now customize the widget function into three sizes: small, medium, and large. In its earlier version, the Agoda app only supported small and medium Widgets, but in line with the recent iOS 15 launch, Widget now has an extra-large option for iPad users. It also offers a dark-mode feature that can promote a better user experience.

Glimpse of how the Agoda widget looks on iPhone.

Product Goals

  1. Present the top destinations per country: Users will view the top domestic locations in their Widget based on the user’s GPS. The product team expects to attract local users to book their trips via the Agoda app by using stunning images and presenting the average hotel prices for these destinations.
  2. Determine the users’ behaviour: Our success metric is the number of app visits through Widget. We use data collected from the Widget to analyse and understand the users’ behaviour towards the app.

    Note: At Agoda, we usually use A/B Testing to measure success. Since user preferences trigger Widget, this method isn’t applicable because we can’t compare the old variant with the new features. We cannot compare the IBPD (Incremental Bookings Per Day) values, so we decided to track the number of users using our Widget as the success metric. This reverts us to our initial goal to analyse user behaviour on Widget and see if it can improve user engagement with the Agoda app.
  3. Guide users in understanding the iOS platform: Other travel apps hardly provide the Widget feature; this makes Agoda one of the pioneering users for Widget in the travel industry. With Widget, Agoda can help users better understand the iOS platform.

Technical Structure

Widget piques the iOS developers’ curiosity to look for the latest iOS development using SwiftUI and Combine framework. This could be an opportunity for teams who are planning to add a customised widget to their apps–with a similar structure to the Agoda Widget:get:

SwiftUI language

SwiftUI is a language used by Apple in constructing UIs (User Interface) on iOS. Since Widget uses SwiftUI, it is also the first SwiftUI-based app in the Agoda iOS version. This could be the first big step towards future SwiftUI app development in Agoda.

Extension system

Widget is part of the iOS Extension system, which means its life cycle is different from the primary iOS system. With Extensions, users can choose the apps they wish to add to the central iOS system. The primary system launches extensions and lets them run on adding extensions. The primary system stops the extension when its job is complete. Through shared resources, the primary system and the extension can communicate.

Timeline

The widget has a Timeline that runs the code and refreshes the data within a given time.

Deep-link

Another vital aspect of Widget is the deep link. The destinations shown in the Widget have deep connections to the Agoda app. When users click on a destination, the deep link directs them to the search page of the destination they clicked.

Conclusion

With Agoda’s Widget, our product and developer could explore an opportunity that benefits both parties. Our product team is committed to continuous development and supports anyone with a brilliant and creative idea to improve Agoda’s product. In the future, the Product team is expecting to work on projects following the trends in Apple iOS development.

Learn more about how we develop products and many more interesting things by visiting our team technology page

Fancy working at Agoda? We are hiring. Click the image to take a look at our open positions.

--

--