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
Using this shortcode on your site will allow other visitors to get a sense of the engagement your pages get.
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).
[dm-vln-top-countries] can’t provide correct data if
[dm-vln-notification] was not added to that page at one point.
[dm-vln-notification] does the whole operation regarding visitor data display, save and update.
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_country_flags% or it will show you duplicate data.
In all custom message you can use HTML tags.
dm-visitor-location-notificationfolder to the
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- Start using the shortcodes to display the notification and record data.
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
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
Ez dago berrikuspenik plugin honentzat.
Laguntzaileak eta Garatzaileak
“DM Visitor Location Notification” software librea da. Ondoko pertsonek egin dizkiote ekarpenak plugin honi.Laguntzaileak
Itzul zaitez DM Visitor Location Notification zure hizkuntzara.
Garapena interesatzen zaizu?
Araka ezazu kodea; begira ezazu SVN biltegia, edo harpidetu garapen erregistrora RSS-(r)en bidez.
Nothing to display here.