Location recipe: add visitor location to your page

Dynamically add localized information to reassures visitors that they've come to the right place.

If you sell physical products or if your business involves meeting customers face-to-face, people need to know whether you operate at their location. Our customers have seen great success from localizing information on the homepage and landing pages. It quickly reassures visitors that they've come to the right place. It also focuses visitor attention and lowers bounce rate as people don't have to search your website for location-specific details.

FYI: This article is an addition to our main article about the use of Unless properties.

Who can use this?

  • businesses that ship products
  • businesses that offer in-person services
  • businesses that only operate in certain regions

How to set this up?

To give you a practical walkthrough, we'll use beGlammed as an example. It's a service where you can book appointments with hair stylists who will come right to your home. The stylists will travel to almost any location in California, yet, finding this information on the website is quite difficult. So, many visitors drop off thinking that the service is only available in major cities. With a dynamic location personalization, we can quickly add clarity and relevance.

Audience

It might be tempting to use the "everyone" audience for this recipe but we recommend to specify the audience to make sure dynamic location insertion doesn't cause any confusion. For example, if you only operate in the UK yet you get website traffic from Ireland, you don't want to end up with a website making promises like "shipping to Dublin".

dynamic-location-based-personalization-dynamic2 Circling back to our use case for beGlammed, we will create an audience for California.

Personalization

What information you localize, strongly depends on your business. Typical use cases involve information about shipping, availability, and support. For beGlammed, we'll focus on the homepage where we'll localize the headline. In total, we'll show you three ways to use dynamic location injection, each slightly more complex than the previous one. But first, let's take a look at the original page.

Original

Below, the original homepage. The value proposition reads “Top rated hairstylists come directly to you.”. That's a bit vague, so we'll personalize it (in three different ways). dynamic-location-based-personalization-dynamic1 Click image to enlarge.

1. Dynamic with a static fallback

To improve the messaging, we change the headline to "Need a hairstylist in {{geo.city}}? We'll come to your home." Our fallback "your city" makes sure that the phrase still applies if the location is unknown. dynamic-location-based-personalization-dynamic9 Click image to enlarge.

2. Dynamic with a dynamic fallback

If you're not happy with the static fallback, you can add a dynamic one. In the example below, we use {{geo.city}} as the dynamic variable and {{geo.regionName}} as a dynamic fallback. So, if the city is unknown the headline will read "Need a hairstylist in California? We'll come to your home.". FYI: Don't forget to click the radio button "Unless property" when creating your dynamic parameter - this indicates to Unless that the fallback is also dynamic. dynamic-location-based-personalization-dynamic4 Click image to enlarge.

3. Fully dynamic

The third option is to show a dynamic message only if the location is known. The original message serves as a fallback. To use this option, you need to write one additional line of custom Javascript.

Code

  if (Txt.get('geo.city')) {
  Txt.set('location', ' in ' + Txt.get('geo.city'));
  }

Design

Using Javascript we can change the headline to "Top rated hairstylists come directly to you in {{geo.city}}." If the location is unknown the headline remains unchanged. dynamic-location-based-personalization-dynamic5 Click image to enlarge.

Result

On the page, Unless now adds {{in geo.city}} to the headline IF the location is known. dynamic-location-based-personalization-dynamic6 Click image to enlarge.

Takeaway

Let visitors know quickly whether you’re a good match for them. Nothing is more frustrating than having to search for information about location and availability. Especially for paid channels this has proven to be very successful, as you can read in this case study about one of our customers.