Solving Italian address input with Google Places

Solving Italian address input with Google Places

Postcodes in Italy

JUST EAT’s UK website uses postcodes to determine whether or not a takeaway restaurant delivers to an address. This is the case for a lot of our international websites and it often proves to be an effective way of accurately specifying a location. When JUST EAT started operating in Italy we observed that postcodes are not a popular with our customers as a way of defining delivery address. One possible reason for this is that postcodes in Italy are not as accurate as we are used to in the UK, even in built up areas.
This was issue as our systems use postcodes. There were already projects in place to move from postcodes to latitude and longitude which would allow us to define our own custom delivery areas. This would remove our dependency on postcodes but from a customer’s point of view would not help them define their location anymore easily. We needed a user interface that would allow the customer to enter their delivery address in a way that suited them.

What did we try?

We produced three experiments that were A/B tested in parallel. The experiments were made available to a limited percentage of customers over the course of a month to ensure the results were statistically significant. The three experiments are described below.

Postcodes Anywhere

Postcodes Anywhere is now known as PCAPredict. They provide an address lookup service called Capture+. This service autocompletes the user’s input and forces them to make a selection from the address options given. A trial version was implemented using PCAPredict’s prototyping tool. This allowed us to insert an instance of the Capture+ interface that would capture the address and pass the appropriate data to our server upon search. This was the easiest of the three experiments to implement.

Google Places

Google Places is a google service for retrieving location data for residential areas, business areas and tourist attractions. An autocomplete service is provided as with PCAPredict with a slight difference. Google Places suggests locations at different levels of accuracy instead of forcing residential address level accuracy. The autocomplete widget provided by google allows you to attach to an existing html input element and react to selection events. When experimenting with Google Places, we needed to specify two options; ‘componentRestrictions’ and ‘types’.

//Configuration options for the Google Places widget
var options = {
    types: ['address'],
    componentRestrictions: {
        country: 'IT’

The ComponentRestrictions allow us to filter by country using a two-character, ISO 3166-1 Alpha-2 compatible country code so this was set to ‘IT’. The ‘address’ type instructs the Places service to return only geocoding results with a precise address. Google data is always improving, however does not always suggest street level accuracy. This was an issue we needed to rectify in order to use the widget with our existing system. This will be discussed in a later section. Once the widget was configured, in much the same way as the PCAPredict Capture+ tool, the data needed to be processed and passed to our servers.

Google Geocoder

Google Geocoder allows a string description of an address to be submitted to the service with the closest matching location data sent back to the client. This service is not designed for autocomplete suggestions but during initial investigations, the suggestions were consistent with behaviour expected from google map searches compared to the suggestions given from Google Places. We also found that the quality of the data seemed to be more mature than that of Google Places but during the course of development this doesn’t seem to be as apparent anymore. This was the reason we decided that it was useful to test a solution based on Google Geocoder in addition to Google Places. We constructed a widget that was similar to the Google Places widget but serving suggestions from the Google Geocoder.

What was the outcome of our A/B testing?

The experiments were being carried out against the existing home page search. This search was made up of four input boxes that allowed the user to specify the street, street number, city and postcode. This was used as a control that the experiments could be compared against. The experiments were run for approximately four weeks with 10% of Italian users being sent to them. The metric we were using to determine success was conversion which is defined as the percentage of visitors to the website that complete an order with JUST EAT.

Poscodes Anywhere

The PCAPredict Capture+ experiment didn’t see an increase in conversion during A/B testing.

Google Geocoder

The Google Geocoder showed small improvement although the interface was awkward and not designed for this purpose. The overall increase in conversion was minor.

Google Places

Showed an substantial increase in conversion. This was a stand out winner from our testing but there were still areas we thought we could improve. The suggestions could not be filtered to the ones that provided the accuracy we required. This would mean users would have to keep trying options until one met the criteria for a successful search.

How did we resolve the issues?

Based on the A/B testing results, we made the decision to develop the Google Places experiment further. The accuracy of suggestions was still an issue and after testing it had been revealed that this issue was mostly focused on getting from street to street number accuracy. The solution we decided upon was that we would ask the user for the street number explicitly when this situation occurred. This would take the form of an additional input that would be revealed to the user that prompted them for this information. To achieve this, we took the interface that had been built for the Google Geocoder and replaced the Google Geocoder service with the Google Places autocomplete service. As we had complete control of the logic within the widget, it was trivial to detect the missing data events and react to them by displaying the additional input.
The second issue encountered with Google Places was that sometimes addresses could not be found that users were requesting. This was not an issue we encountered with the Google Geocoder service. For this reason we built a fall back into the Google Places custom widget that would Geocode the given address if the street number was provided but the address was not found.

//Supplies suggestions based on an address string
new google.maps.places.AutocompleteService();
//Returns location data based on an address string
new google.maps.Geocoder();

What was the final outcome?

The final outcome of implementing the custom Google Places search on the the Italian homepage was a significant increase in conversion. This implementation is now being used for 100% of users in Italy.
What next?
There are still many ways we can improve on this feature. Google Places allows us to alter the type of suggestions made to the user. It also returns more data than we currently make use of and allows us to upload our own data that can be returned with selected suggestions. Google Places also integrates seamlessly with Google Maps which opens up more possibilities for specifying location and returning location based results. For these reasons, JUST EAT will be continuing to experiment with Google Places during the second quarter of 2016 with an aim to roll this feature out internationally.
Stay tuned for more updates.