TapCub is live — analytics, insights and live chat, free on one platform
Glossary

What is geofencing? Marketing, accuracy, consent and a worked test

Geofencing triggers an action when a device enters a virtual boundary on a map. How accurate it really is, how big to draw the fence, what consent it needs and how to test whether it worked.

Lin Zhou Reviewed by Lucas Hayes Also called geofence Last updated Nov 19, 2026 Glossary

Quick answer

Geofencing draws a virtual boundary around a real place on a map and triggers an action when a device enters it, leaves it or stays inside. Geofencing marketing uses that trigger to message people near a store or event. It works at roughly 100 to 150 m precision and needs consent.

Formula: Fence area = π × radius²

What is geofencing?

Geofencing is drawing a virtual boundary around a real place on a map and triggering an action when a device enters it, leaves it, or stays inside for a set time. On Android, a geofence is a latitude, longitude and radius, which together define a circular area; the app can ask the operating system to report entering, exiting or dwelling. Geofencing marketing uses those triggers to send a message or show an ad to someone who is near a store, an event or a neighborhood.

Three things separate it from other location-based marketing. It is event-triggered (something happens at the boundary, not on a schedule). It is place-based (the fence is around somewhere you chose, which can include your own store, an event venue, or a competitor's lot). And it is device-based: the trigger needs a phone with location permission, usually through an app, which is why consent is a design question and not an afterthought.

Most guides stop at the definition and the examples. This page covers the two things they treat lightly: how precise the technology really is, and how to tell whether a fence caused anything. Both decide whether a geofencing campaign is worth running.

How does geofencing work and how precise is it?

The phone's operating system checks its position against registered fences and wakes the app when a boundary is crossed. Precision depends on what location source is available at that spot. Android's developer documentation gives the numbers:

ConditionTypical location accuracyWhat it means for the fence
Indoor location availableAs small as about 5 mSmall fences can work, but only where this is available
Wi-Fi availableAbout 20 to 50 mAssume about 50 m unless you know indoor location exists
Rural or driving, no Wi-FiSeveral hundred metres to several kilometresFences need a much larger radius

Three limits follow from the same documentation:

  • Alerts are late. The service does not check location continuously. Latency is usually under 2 minutes, around 2 to 3 minutes when background location limits apply, and up to 6 minutes if the device has been stationary for a long time. A "welcome in" message can arrive after the person has already walked past.
  • Count limits. Android allows up to 100 active geofences per app per device user, so a chain with 400 stores needs to register fences near the user's current area, not all at once.
  • Fences vanish. After a reboot, an app reinstall or cleared data, the app has to register its geofences again.

How big should the fence be?

Android recommends a minimum radius of about 100 to 150 metres, because location accuracy at Wi-Fi level is 20 to 50 m and smaller fences produce missed or false triggers. The area grows with the square of the radius, so a small change in radius changes who you reach a lot. Area = π × radius²:

RadiusAreaCompared with 50 mGood for
50 m7,854 m² (0.008 km²)1×Below the recommended minimum; expect misses
100 m31,416 m² (0.031 km²)4×A single store front in a dense area
150 m70,686 m² (0.071 km²)9×A store with a car park; the upper end of the recommended minimum
500 m785,398 m² (0.785 km²)100×A shopping district; reaches many people who are not going to your store

Two rules of thumb. Pick the smallest radius that still sits above the accuracy of your location source. And use a dwell trigger (the person stays inside for, say, 5 minutes) instead of a plain enter trigger if a road or busy walkway runs through the fence; Android's documentation recommends dwell to reduce alert spam from people who only pass by.

Precise location is personal data, and background location access is a sensitive permission. This is not legal advice, so check with a lawyer for your markets, but the working pattern is consistent:

  1. Ask for the permission with a clear reason. Android's documentation advises explaining to users why the app needs background location. A prompt that says "to send you offers near our stores" gets a more informed answer than a bare system dialog.
  2. Treat it as opt-in. Under the EU's GDPR, consent has to be freely given, specific, informed and unambiguous (Article 4(11)), and the controller must be able to demonstrate that it was given (Article 7). Silence or a default "yes" does not meet that bar. See opt-in for how this works in practice, and the GDPR compliance checklist for the wider list.
  3. Collect only what the campaign needs. If "entered the fence" is enough, do not store the full location trail. Zero-party data, such as a preference the customer volunteers, often does the same job with less risk.
  4. Make it easy to turn off. Users can revoke location permission in system settings; your messaging should still work, just without the fence.

Worked example: did the fence cause the visits?

Sample data: a retailer sets a 150 m fence around one store and sends a push notification to opted-in app users who enter it. The campaign costs $1,200 for the month. To test whether it works, it keeps 600 eligible users as a holdout who never get the message, and compares them with the 2,400 who do.

GroupUsersVisited the store within 7 daysVisit rate
Got the notification2,40028812.0%
Holdout (no message)600549.0%

How to recompute: rate = visits ÷ users (288 ÷ 2,400 = 12.0%; 54 ÷ 600 = 9.0%). The lift is 12.0% − 9.0% = 3.0 percentage points, or 3.0 ÷ 9.0 = 33% relative. Incremental visits are 2,400 × 3.0% = 72. A two-proportion z-test gives z ≈ 2.1 (p ≈ 0.04), so the difference is unlikely to be chance, though a 95% interval for the lift (about 0.4 to 5.6 points) is wide.

The tempting reading is "288 visits from the campaign". The accurate reading is "72 extra visits": the other 216 would have come anyway, and the holdout shows it. Cost per visit credited to the campaign is $1,200 ÷ 288 = $4.17; cost per extra visit is $1,200 ÷ 72 = $16.67, four times higher. Without a holdout, the first number is what most dashboards report.

What are the common mistakes?

  • Fences smaller than the location accuracy. A 30 m fence in a place with 50 m accuracy will miss people or fire for the neighbor. Use at least 100 m unless you have indoor location.
  • Counting every visit as an effect. People near your store were already likelier to visit. Use a holdout or a before-and-after comparison on matched stores.
  • Plain enter triggers on busy roads. Drivers who pass through get a message they cannot use. Use dwell.
  • Messaging too often. One notification per visit window is plenty; repeated pings get notifications switched off.
  • Forgetting that alerts are late. Do not write copy that depends on the person being outside the door right now.
  • Treating consent as a banner. Permission has to be asked for at the moment it makes sense, with a reason, and be easy to withdraw.

For app-side tactics around messaging and permissions, see mobile marketing strategy.

Measuring a geofencing campaign in TapCub

TapCub does not do geofencing. It does not track device location, draw fences or send push messages. What it measures is what happens after someone arrives in your app or on your site, which is where the incremental question gets answered.

  1. Tag the link. Put UTM parameters on the link or deep link in the notification, for example a campaign name for the fence. In Web analytics › Sources, visitors from that campaign show up by channel, source and UTM, separate from other traffic.
  2. Define the outcome. Set a goal in Web analytics › Goals, such as a "reserve in store" page or event, so the conversion rate for that campaign has a denominator. For app flows, App analytics reports cover sessions, versions and retention.
  3. Compare against a holdout. Build a segment of the holdout users in All-platform analytics › Users › Segments & tags and compare their goal rate with the campaign group in your behavior analysis. This requires that users are identified; see user ID.
  4. Look at where visitors are. Web analytics › Audience shows country, province and city from the visitor's IP address. That is a coarse region, not GPS, and it is sometimes empty; it can confirm that a local campaign brought local visitors but cannot tell you who walked into the store.
  5. Control how much location is kept. In Configuration › Privacy center, region rules set geo precision to city, country or none, and the IP address itself is not stored in events.

See also: Location-Based Marketing: Consent First, Then Measure Visits and Lift.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Lin Zhou

Product Experience Specialist

Writes about product experience, practical workflows, and growth, turning complex processes into clear steps for everyday decisions.

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What is geofencing in marketing?

It is sending a message or showing an ad when a phone enters a virtual boundary drawn around a place, such as a store or event. The trigger is the boundary crossing, and it normally needs an app with location permission.

How accurate is geofencing?

Android documents location accuracy of about 20 to 50 m with Wi-Fi, as small as 5 m with indoor location, and hundreds of metres or more in rural areas. It recommends a minimum fence radius of 100 to 150 m, and alerts can arrive a few minutes late.

What radius should a geofence be?

Use at least 100 to 150 m unless indoor location is available. Area grows with the square of the radius, so 500 m covers 100 times the area of 50 m and reaches many people who are not going to your store. Use a dwell trigger on busy roads.

Does geofencing need consent?

Precise location is personal data and background location is a sensitive permission, so ask clearly and treat it as opt-in. Under GDPR, consent must be freely given, specific, informed and unambiguous. This is not legal advice; check the rules for your markets.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics