Pro Tips

How (and When) to Build a Geo-Fence

Minute read
How (and When) to Build a Geo-Fence

If you’ve ever been annoyed by a website that stopped you from watching a video because you’re in the ‘wrong’ country ... you’re probably familiar with geo-fencing. This tactic gets a bad rap. Chances are, you encounter geo-fencing far more often than you realize. Done well, you’ll never notice it. In fact, geo-fencing can be an effective way to enhance and personalize the experience of your website visitors.

In its simplest form, geo-fencing lets you serve different content to visitors in different locations. This can allow you to turn a regionally-specific campaign into one that’s meaningful to supporters in all locations—making it more engaging and more sharable by more people. It can also benefit your list building strategy by isolating GDPR forms to those living inside the European Union.

Creating a geo-fence is surprisingly easy (and inexpensive). You can build one using basic back-end or front-end code in 3 simple steps.

1. Detect the location of your visitor

Using simple IP-to-location technology, identify the location your visitor is reaching you from. offers this service with a generous free tier, which is ideal for small scale non-profits.

Unlock more digital strategy secrets.

Free  eBook

2. Define your boundary

Cross reference your supporter’s location with your desired content region. For example, if you are geo-fencing for GDPR, match your supporter’s country against the list of EU countries. This tells you if your supporter is inside or outside your geo fence.

3. Conditionally serve content

Depending on whether your supporter is inside or outside your fence, serve the appropriate content. This could be regionally-specific messaging, rich media, or in the case of GDPR—specific form elements and respective form validation code.

That’s it!

Get a free weekly digital strategy tip:

Name Email
privacy policy.

We respect your data. View the privacy policy.

Unsubscribe any time. We respect your data. View the privacy policy.

Karen Nilsen

Hi there! I’m Karen. I’m on a mission to reach my former self. Had I known 10 years ago what I know today, I could have achieved more good, made fewer mistakes, and had more weekends. Every time we share what works, we win faster. Let’s create digital experiences that move people — that grow our base and fuel our movements. Are you with me? Please share this with someone you know who wants to up their digital game!

Like this tip? Share it!