What is geolocation used for?
Geolocation allows you to display localized content based on a visitor’s actual location. If you can determine the device’s location, you can run campaigns based on distance from a specific location.
Typical uses:
Notifications about new store openings in the area
Invitations to local events
Displaying region-specific offers
Personalized info boxes or campaigns based on the visitor’s location.
To use this feature, the Geolocation plugin must be enabled.
How geolocation works
Mailocator requests location access from the visitor’s browser.
The browser determines whether the device supports geolocation.
The user must grant permission to share their location.
Geolocation is typically available on:
mobile phones
tablets
some laptops
It is usually unavailable on desktops
Practical behavior
If the visitor grants consent:
Mailocator processes and stores the obtained location
It also stores information about the accuracy of the location
This data can then be used in campaign filters (e.g., radius in km)
Based on this data, a campaign can be automatically launched if the user is located within a defined area.
If the device does not support geolocation:
The user is marked as unlocatable,
Mailocator will attempt to retrieve the location again during the next visit (session).
If the user has geolocation disabled
Location detection cannot be forced if the user has disabled location sharing or permanently rejected the browser prompt. In this case, it is not possible to display this prompt again.
- However, in such a case, you can notify the user, for example, via the Mailocator info box, where you ask them to enable location sharing in their browser settings.
Can location be determined based on an IP address?
Theoretically yes, but in practice not with sufficient accuracy.
IP geolocation is often inaccurate because:
IP addresses can be shared among multiple users
they may be registered with a provider in a different part of the country
they often do not correspond to the device’s actual location
That is why Mailocator uses the browser’s geolocation services directly, which are significantly more accurate.
How to test geolocation
Enable the Geolocation plugin.
Visit your website.
Browse the pages.
In Mailocator Monitoring, you will then see:
a visit record
the geolocation status
the evaluation result
Default geolocation rules
The geolocation plugin has preset rules that can be customized.
Default settings:
- The obtained location is stored for 60 days,
- The prompt to obtain the location appears no earlier than on the second page visited,
- The location must be accurate to within 10 km,
- If location sharing is turned off, a special campaign prompting the user to enable geolocation can be displayed.
Adjusting Settings
All geolocation rules can be modified as needed.
For details on configuration, see the description of the Geolocation plugin in the Mailocator settings.