USSD — Africa

USSD location Tracking in Kenya and how Little does it.

You may have probably interacted with Little's Kenya USSD app to request a taxi, and you are wondering, "how did they get my location and how can I do the same for my USSD code application".

USSD location tracking in Kenya

Start by understanding what a USSD (unstructured supplementary service data) code like *144# is.

You may have probably interacted with Little Kenya USSD code application to request a taxi and wondered, "how did they know my location, and how can I do the same for my USSD code application". If you haven't and are in Kenya, try dialling*826#on your Safaricom phone number.

Before smartphones were a thing, location tracking was still a thing. To understand how Little Kenya can do so, you first have to understand how your phone works and the concept of triangulation.

Your phone is connected to 3 (hence the name triangulation) or more boosters at any given time. A booster is the red and white mast that you might have seen on hills. As you move around, your phone is actively calculating the best signal to ensure you have the best connection.


In Kenya, Safaricom has an accurate knowledge of the position of each booster. They can therefore draw an approximate location of where you are. E.g. around Kilimani. Then based on the calculations above, they can determine that you are x distance from each of their nearest booster. From this, they can get very accurate latitude and longitude location of your phone.

Unfortunately, this capability is unavailable to every USSD code application in Kenya. USSD code application developers have been bugging service providers to enable this for them. However, your service provider cannot do this unless you deal directly with Safaricom.

You will need to make a case with Safaricom to get location tracking on your USSD code. The likelihood of getting approved is extremely low – sub-zero.

Location tracking alternative – No code

By its nature, USSD is not smart. It is a simple transfer of text and numbers of a network, similar to SMS.


For most applications, getting accurate latitude and longitude is unnecessary unless you are a taxi-hailing or delivery app like Little. You probably need a near approximation of where your client is, e.g. the nearest market or town centre.


For this scenario, you can use Google Places API to query a location based on a keyword.

Using Google Places Maps on USSD

Like the Maps application on your phone, Google offers an API to query locations via text and get possible location coordinates.

The 3 APIs available are:

  • Find Place API: Per the singularity of the name, this API returns a single result of the best match based on your query. E.g. if you search for KICC Nairobi, you are likely to get the following result.

{
"_success_":true,
"_status_":"COMPLETED",
"_partial_":false,
"_code_":200,
"_error_":null,
"name":[
"Kenyatta International Convention Centre"
],
"location":[
{
"lat":-1.288693,
"lng":36.823103
}
]
}
  • Nearby search: Let's you search for places near a location.
  • Text search: An open search similar to searching on Google Maps or Google search.

The best API for our use case is the Find Place API. On your USSD, request a user to enter the name of a nearby landmark, query the Find Place API and confirm with them. If it's incorrect, ask them to try again with a different keyword.

Do it with HelloDuty without writing code or hiring a developer.

Brrng already offers you the ability to register your USSD application via click and config without the need to hire a developer.

We also help you extend that capability and integrate your USSD to many applications, including Google Places.

  1. Register for an account
  2. Create a new USSD flow.
  3. Add the Google Places APP.
  4. Publish.

It's that simple.

Last updated
June 12, 2024
Single Inbox
Pro-tip

Are you ready to get started? Sign up here for a demo of the HelloDuty CRM and customer engagement automation software now.

Pesalink - BlackSistema Bio - BlackTatu City - BlackStartimes - Black
Sunculture Logo

It works for our customer SunCulture. We help agents sell solar in rural Kenya. It takes a few hours, not months, to design and build new ideas.

Relationships that matter.

Plan, engage, and analyse with ease. Transform your customer relationship with an all-in-one platform.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Subscribe