Title: DM Visitor Location Notification
Author: George-Paul Crețu
Published: <strong>21 de Abril de  2020</strong>
Last modified: 3 de Julio de  2020

---

Buscar plugins

![](https://ps.w.org/dm-visitor-location-notification/assets/banner-772x250.jpg?
rev=2288155)

Este plugin **no ha sido probado con ninguna las 3 últimas versiones principales
de WordPress**. Puede que ya no se mantenga o no tenga soporte, y puede que tenga
problemas de compatibilidad cuando se utiliza con versiones más recientes de WordPress.

![](https://ps.w.org/dm-visitor-location-notification/assets/icon-256x256.jpg?rev
=2288155)

# DM Visitor Location Notification

 Por [George-Paul Crețu](https://profiles.wordpress.org/necroob/)

[Descargar](https://downloads.wordpress.org/plugin/dm-visitor-location-notification.zip)

 * [Detalles](https://cl.wordpress.org/plugins/dm-visitor-location-notification/#description)
 * [Reseñas](https://cl.wordpress.org/plugins/dm-visitor-location-notification/#reviews)
 *  [Instalación](https://cl.wordpress.org/plugins/dm-visitor-location-notification/#installation)
 * [Desarrollo](https://cl.wordpress.org/plugins/dm-visitor-location-notification/#developers)

 [Soporte](https://wordpress.org/support/plugin/dm-visitor-location-notification/)

## Descripción

The plugin uses **ipstack.com** to get visitors details based on IP.
 _You will 
need an API key from ipstack.com in order for it to work._

After activation you can use the shortcode `[dm-vln-notification]` on the page where
you want to show the notifications.

Potential usage for:
 – podcast sites – video libraries – shops – publications

Using this shortcode on your site will allow other visitors to get a sense of the
engagement your pages get.

#### Shortcodes

Two shortcodes are available for use:
 – `[dm-vln-notification]` – this one will
check the visitor details, create/update the records and show the notification message.–`[
dm-vln-top-countries]` – this one will show the top 10 countries that visited the
page (only unique IPs will be counted).

The `[dm-vln-top-countries]` can’t provide correct data if `[dm-vln-notification]`
was not added to that page at one point.
 Since `[dm-vln-notification]` does the
whole operation regarding visitor data display, save and update.

#### Settings

Dashboard page provides you with a number of options:
 – Adding API Key – Choose
the position of the notification – Style the color scheme for the notification –
Add Custom notification message for single and multiple users – Adjust the Notification
display time – Adjust the Frequency of the Ajax call – Set the seconds for with 
to check the DB (based on NOW – seconds we decide what users are new/online) – Pause
the API Request – Select a date and delete DB records previous to that

#### Custom notification message

Custom notification messages can be adjusted using dynamic variables.
 For Single
visitor you have: – `%dm_vln_country%` – displays the country with the flag – `%
dm_vln_city%` – displays the city (it is not 100% accurate).

For Multiple visitors you have:
 – `%dm_vln_visitor_number%` – shows the number 
of visitors – `%dm_vln_countries%` – displays list of country codes – `%dm_vln_flags%`–
displays list of flags instead of country codes – `%dm_vln_country_flags%` – displays
list of country codes associated with the flag.

You should only use one of the `%dm_vln_countries%`, `%dm_vln_flags%`, `%dm_vln_country_flags%`
or it will show you duplicate data.

In all custom message you can use HTML tags.

## Capturas de pantalla

 * [[
 * Example of top visits for a page and multiple visitors from different countries
   notification
 * [[
 * Example of top visits for a page and multiple visitors from same country notification
 * [[
 * Example of top visits for a page and single visitor notification
 * [[
 * Settings page with API notification
 * [[
 * Add in the ipstack.com API Key
 * [[
 * Style the notification with these 3 options
 * [[
 * Customize the notification message by using the dynamic variables

## Instalación

 1. Upload `dm-visitor-location-notification` folder to the `/wp-content/plugins/` 
    directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Start using the shortcodes to display the notification and record data.

## FAQ

### How does the plugin work?

On activation the plugin creates a DB table called **dm_visitor_location** with 
the columns: IP, Time, Continent, Country, Country_Code, City, Post_ID, id.
 The
IP is grabbed with a PHP function at the plugin level and passed to the API request
to IPStack, returning the Continent, Country, Country_Code and City.

For that to happen you will need to use `[dm-vln-notification]` on the page you 
want to show the notification.

The function behind the shortcode will get the IP, check if the IP exists in the
DB for the current Post_ID. If the IP doesn’t exists associated with the current
Post_ID it will save/create it. If the record already exits it will only update 
the timestamp.

The record exists if the IP and the Post_ID match.

This check is done in order to save API requests, only updating the timestamp on
the IPs that were already sent via the API request.

_Example: if the same IP returned to the same Post\_ID that it was visited before,
we only update the timestamp, we don’t create a new record._
 _If that IP visits
a different Post\_ID, we’ll create a new record with the new Post\_ID._

Based on these records we display the notification that someone is on the page with
that Post_ID.

### Can I use just the notifications without displaying the top countries?

Yes. You can only use the shortcode for notifications `[dm-vln-notification]` on
the page you want.

### How are the IPs stored?

The IPs are stored in the DB hashed under MD5.

### What happens with data when deactivating/uninstalling the plugin?

On deactivation nothing happens with the DB records, but once you delete the plugin
via WP Dashboard the plugin DB table will be removed.

### How are flag images created?

The flag images are `.svg` files.

### Can I style the notification?

Yes. You can use the existing settings to adjust the color scheme, or add CSS rules.
All notification elements have classes that you can use.
 Also the font family is
grabbed from the site, so no font family is added via the plugin.

### Do I get a notification for myself accessing the page?

No. You will not get a notification for yourself accessing the page. If your IP 
matches with the IP retrieved from DB, you will not be displayed to yourself as 
a visitor.

### Can I see a live demo?

Sure! Check it out [here](https://apps.devmaverick.com/dm-vln/)

## Reseñas

No hay reseñas para este plugin.

## Colaboradores & Desarrolladores

“DM Visitor Location Notification” es software de código abierto. Las siguientes
personas han contribuido a este plugin.

Colaboradores

 *   [ George-Paul Crețu ](https://profiles.wordpress.org/necroob/)

[Traduce “DM Visitor Location Notification” a tu idioma.](https://translate.wordpress.org/projects/wp-plugins/dm-visitor-location-notification)

### ¿Interesado en el desarrollo?

[Revisa el código](https://plugins.trac.wordpress.org/browser/dm-visitor-location-notification/),
echa un vistazo al [repositorio SVN](https://plugins.svn.wordpress.org/dm-visitor-location-notification/),
o suscríbete al [registro de desarrollo](https://plugins.trac.wordpress.org/log/dm-visitor-location-notification/)
por [RSS](https://plugins.trac.wordpress.org/log/dm-visitor-location-notification/?limit=100&mode=stop_on_copy&format=rss).

## Historial de cambios

Nothing to display here.

## Meta

 *  Versión **1.0.0**
 *  Última actualización **hace 6 años**
 *  Instalaciones activas **Menos de 10**
 *  Versión de WordPress ** 5.0 o superior **
 *  Probado hasta **5.4.19**
 *  Versión de PHP ** 7.2 o superior **
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/dm-visitor-location-notification/)
 * Etiquetas
 * [country](https://cl.wordpress.org/plugins/tags/country/)[GeoIP](https://cl.wordpress.org/plugins/tags/geoip/)
   [geolocation](https://cl.wordpress.org/plugins/tags/geolocation/)[notification](https://cl.wordpress.org/plugins/tags/notification/)
   [visits](https://cl.wordpress.org/plugins/tags/visits/)
 *  [Vista Avanzada](https://cl.wordpress.org/plugins/dm-visitor-location-notification/advanced/)

## Calificaciones

Aún no se han enviado valoraciones.

[Your review](https://wordpress.org/support/plugin/dm-visitor-location-notification/reviews/#new-post)

[Ver todas las reseñas](https://wordpress.org/support/plugin/dm-visitor-location-notification/reviews/)

## Colaboradores

 *   [ George-Paul Crețu ](https://profiles.wordpress.org/necroob/)

## Soporte

¿Tienes algo que decir? ¿Necesitas ayuda?

 [Ver el foro de soporte](https://wordpress.org/support/plugin/dm-visitor-location-notification/)

## Donar

¿Te gustaría apoyar el avance de este plugin?

 [ Donar para este plugin ](http://devmaverick.com/donate)