paint-brush
This “location hack” helps you engage with your usersby@nicolasleroux
1,506 reads
1,506 reads

This “location hack” helps you engage with your users

by Nicolas Le RouxJune 22nd, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

You have two similar products in front of you. The only difference is where they were built. Which one do you pick?

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - This “location hack” helps you engage with your users
Nicolas Le Roux HackerNoon profile picture

You have two similar products in front of you. The only difference is where they were built. Which one do you pick?

The one from your country of course. If you have the choice, you are so happy to buy a product made in your country. It makes you feel so good.

What about digital goods? Recently, I saw many companies proudly displaying their location. Example, Agricool:

When I created Botletter, I also wanted to proudly display “Made with love in France”. The problem is, as a digital nomad constantly moving from one country to another, it didn’t really make sense to use France as the company’s location.

What if every user sees his home country displayed in the footer? 🤔

Then came up the idea to write a script to display the user’s location for the “Made with love in {{user_country}}” formula.

This could attract the visitors’ attention and increase the conversion rate. The goal is to encourage people to contact me and start a discussion about Botletter. This way, I will know better who are my visitors, how they discovered Botletter and what are their expectations about the product.

The downside is the risk to hurt people and make them feel like I’m fooling them… I discuss the results of the experiment later.

How to implement it with Ruby on Rails

Create such a “hack” in your app is really easy. I will use Rails as an example but I’m sure you can do it with other technologies.

First, we want to use the visitors’ IP address in order to locate them. Geocoder is a complete geocoding solution for Ruby. It will allow us to find the location using the IP address.

Install Geocoder like any other Ruby gem:

gem install geocoder

And run at the command prompt:

bundle install

Geocoder adds location and safe_location methods to the standard Rack::Request object so you can easily look up the location of any HTTP request by IP address.

We want to check the user’s location before rendering the view. Thus, we add a before action in the application controller, creating a variable with the user’s location based on his IP address. This way, the user’s location will be available in all our views.

before_action :loc_function










def loc_function# We check if geocoder finds the locationif request.locationresult = request.location@loc = result.country# If geocoder does not find it, we display 'France'else@loc = "France"endend

In the footer, we can now display the location formula with the user’s location:

<span>Made with ❤ in <%= @loc %></span>

Voilà!

Botletter’s footer using different locations with a CDN

Results of the experiment and thoughts

The results have been really good so far. However, this “trick” can also upset people.

In the end, really few people complained about the hack… I added some explanations in the Botletter’s FAQ in order to avoid hurting people. I explain gently why I did this:

As a digital nomad, I travel the world and it didn’t make sense for me to display a particular location in the footer. That’s why I decided to display the visitor’s location. It’s a great way to connect with interesting people like you! ;)

Usually, people take it very well and are amused by the trick. Then it’s the perfect time to ask them insights about how they discovered Botletter and what they think about the product.

This “location hack” created many conversations that would not have happened otherwise. Every day, someone contacts me through the Crisp chat to ask me if we are based in their country. I spoke to amazing entrepreneurs, marketers, software engineers from all over the world.

If I haven’t beta-test it with a normal footer and thus don’t know the impact on the conversion rate of the home page, the impact on the amount of information I get from my visitors is huge.

What do you think of this “location hack”? If you like it, don’t forget to clap ;)

UPDATE

Mathieu Le Roux gave a me a great feedback to make the formula less dishonest. I changed it for “Made with love for {{user_country}}”.

I’m the founder of Botletter, an online service allowing you to send newsletters and updates on Facebook Messenger. Check it out!