
Visit Notifications emails the site administrator when someone visits a page you have chosen: a “read receipt” for web pages. Use it to know when a client opens a proposal, quote or preview page, or how often a key page is seen, without setting up analytics. This manual covers version 3.2.0.
What it does
You choose which pages to track. For each one you choose how you hear about visits:
- On Visit: one email for every visit, sent straight away.
- Hourly: one summary email per hour listing every visit in that hour.
- Daily: one summary email per day listing every visit in that day.
It works on posts, pages and custom post types, and on category, tag and custom taxonomy archive pages. Pages you have not turned on are never reported.
Before you start
- WordPress 6.5 or later (tested up to 7.1) and PHP 7.4 or later.
- The site must be able to send email. If its emails go missing, set up an SMTP plugin such as WP Mail SMTP first.
- An administrator login (to change the global settings) or an editor login (to turn tracking on for pages).
Install
Install Visit Notifications
-
Go to Plugins → Add Plugin
In the WordPress admin.
-
Search for Visit Notifications
It is published by Watch The Dot. Click Install Now.
-
Click Activate
-
Check the global settings
Go to Settings → Visit Notifications (see below), then turn tracking on for the pages you want.
Who receives the emails
Emails go to the Administration Email Address in Settings → General. There is no separate recipient setting yet. To send them somewhere else, change that address or forward the emails from that mailbox.
Global settings
Settings → Visit Notifications. These apply to the whole site. Click Save Settings after changing anything.
| Setting | Default | What it does |
|---|---|---|
| Enable Notifications | On | The master switch. When off, no visits are recorded and no emails are sent, including summaries. Visits already waiting for a summary are kept and sent once it is turned back on. |
| Logged In Users | On | Whether visits by logged-in users (including you) are reported. Each page can override this. Turn it off so your own visits while editing do not trigger emails. |
| Disable Crawlers | On | Ignores visits whose browser identifier contains “bot” (Googlebot, Bingbot and so on). Not every crawler says “bot”, so a few may get through. |
| Look up visitor location | Off | Adds an approximate location (city, country) and timezone to the emails. This sends the anonymised IP address to ipapi.co, a third-party service. See Privacy. |
| IP Grace Period | Off | Stops repeat visits by the same visitor being reported again within a set time. When ticked, the next two settings appear. |
| Grace Period For | Site Wide | Site Wide: once a visitor is reported, none of their visits to any tracked page are reported until the grace period ends. Local to Post: the grace period is per page, so a visitor is reported once for each page. |
| Duration of grace period | 300 | Length of the grace period in seconds: 300 is 5 minutes, 3600 is an hour, 86400 is a day. |
Turn notifications on for a page
Posts, pages and custom post types
Track a post or page
-
Edit the post or page
-
Find the Visit Notifications box
In the block editor, open the Settings sidebar (the panel icon at the top right); the box is at the bottom of the Post or Page tab. In the classic editor it is in the right-hand column.
-
Tick Enable Notifications
-
Choose a Schedule
On Visit, Hourly or Daily.
-
Choose Logged In Users
Respect Global follows the site-wide setting (shown in brackets). Enabled or Disabled applies to this page only.
-
Click Save (or Update / Publish)
The settings are saved with the page.
Categories, tags and custom taxonomies
Track a category or tag archive
-
Go to the taxonomy screen
For example Posts → Categories or Posts → Tags.
-
Edit the term, or add a new one
The same three Visit Notifications fields appear on both forms.
-
Set the fields and click Update
Several pages at once
Use the bulk actions
-
Open a list screen
Pages → All Pages, Posts → All Posts, any custom post type list, or a category or tag list.
-
Tick the items
-
Choose a bulk action
Enable Visit Notifications (On Visit), Enable Visit Notifications (Hourly) or Disable Visit Notifications.
-
Click Apply
A notice confirms how many items were changed. Items you are not allowed to edit are skipped.
There is no bulk action for Daily; set Daily on each page. Post and page lists also have a Visit Notifications column showing Disabled or Enabled (On Visit / Hourly / Daily).
When a visit is reported
A visit is reported only when all of these are true:
- Enable Notifications is on in the global settings.
- It is a front-end visit to a single post, page or custom post, or to a category, tag or custom taxonomy archive. The blog posts listing, search results, author and date archives are never reported. A static front page is a normal page and can be tracked.
- Notifications are enabled for that page.
- If Disable Crawlers is on, the browser identifier does not contain “bot”.
- If the visitor is logged in, logged-in users are allowed (the page’s own choice, or the global setting when the page says Respect Global).
- If IP Grace Period is on, the same visitor has not already been reported within the grace period.
The emails
On Visit
Subject: [Site name] New Visitor on Page title. It links to the page and lists:
- Access Time, in the site’s timezone and date format (Settings → General).
- User Agent: the visitor’s browser and device.
- Referer: the page they came from, or “unknown” (typed in, or from an app or email).
- IP Address (anonymised): the last part is replaced with zeros, so it identifies the network, not the person.
- Location and Timezone: only when “Look up visitor location” is on and the lookup worked.
Hourly and Daily summaries
Subject: [Site name] Visitor Report for Page title. It says how many visits there were in the past hour or day, then lists the same details for each visit. One email is sent per page; a page with no visits gets no email.
When summaries are sent
Summaries are sent by WP-Cron, WordPress’s built-in scheduler. The hourly and daily runs count from when the plugin was first activated, not from the top of the hour or midnight. WP-Cron only runs when the site gets visits, so on a quiet site a summary can arrive late. If the host runs a real cron job for wp-cron.php, timing is reliable.
Privacy
For tracked pages only, the plugin records the time of the visit, the browser user agent, the referring page and the anonymised IP address. It sets no cookies.
- On Visit details are emailed and not stored.
- Hourly and Daily details are stored with the page until the summary is sent, then deleted.
- With the IP Grace Period on, a one-way hash of the anonymised IP address is kept for the length of the grace period.
- The plugin adds suggested wording to Settings → Privacy → Policy Guide for the site’s privacy policy.
Customising the emails
Copy the template into the active theme (ideally a child theme) and edit the copy. The theme copy is used instead of the plugin’s and survives plugin updates.
| Copy from | To | |
|---|---|---|
| On Visit | wp-content/plugins/visit-notifications/templates/emails/single.php |
wp-content/themes/your-theme/templates/visitnotifications/single.php |
| Hourly / Daily | wp-content/plugins/visit-notifications/templates/emails/delayed.php |
wp-content/themes/your-theme/templates/visitnotifications/delayed.php |
For developers
- Filter
visitnotifications_lookup_location: whether to look up the location for a visit. Default is the “Look up visitor location” setting. Arguments:$lookup(bool),$ip(anonymised IP),$object(WP_PostorWP_Term). - Filter
visitnotifications_menu_settings: change where the settings page sits in the admin menu. - Per-page settings (post meta and term meta):
vn_enable_notifications(1or0),vn_schedule(visit,hourly,daily),vn_logged_in(global,on,off). - Global settings: options named
visitnotifications_*. - Queued visits: meta
visitnotifications_visitors. Grace periods: option or metavisitnotifications_ip_grace_period_data. - Cron hook:
visitnotifications_send_emails, scheduled twice, with the argumenthourlyanddaily.
functions.php
// Never look up visitor locations, whatever the setting says.
add_filter( 'visitnotifications_lookup_location', '__return_false' );
// Turn on hourly notifications for a page in code.
update_post_meta( $post_id, 'vn_enable_notifications', '1' );
update_post_meta( $post_id, 'vn_schedule', 'hourly' );
Deactivating and deleting
- Deactivate: stops all tracking and removes the scheduled summary runs. Settings and per-page choices are kept.
- Delete (from the Plugins screen): also removes all settings, per-page choices, visits waiting for a summary and grace period data.
Troubleshooting
No emails at all
- Check Enable Notifications is on in Settings → Visit Notifications.
- Check the page shows Enabled in the Visit Notifications column.
- If you are testing while logged in, check logged-in users are allowed, or test in a private window.
- If the IP Grace Period is on, your test visit may be inside it. Wait, or turn it off while testing.
- Check the site sends email at all (try a password reset). If not, set up an SMTP plugin.
- Check the spam folder and the Administration Email Address in Settings → General.
Some visits are missing
Page caching (a caching plugin, the host’s cache, or Cloudflare caching whole pages) serves a stored copy of the page without running WordPress, so the plugin never sees the visit. Logged-out visitors are hit hardest. Exclude the tracked pages from every cache.
Summaries are late or missing
The site probably gets little traffic, or WP-Cron is turned off (DISABLE_WP_CRON in wp-config.php) with no real cron job replacing it. Ask the host to run wp-cron.php every 5 to 15 minutes.
Emails about bots
Make sure Disable Crawlers is on. Some crawlers do not call themselves bots; the User Agent line in the email shows what visited.
No location in the emails
Location lookup is off by default; turn on “Look up visitor location”. If it is on, ipapi.co may have been down, slow (the plugin waits one second) or over its free limit, or the visitor was on a private or local network.
“Bundled libraries are missing” and the plugin deactivates itself
That copy came from GitHub, or it is version 3.1.0, whose WordPress.org package had this fault. Update to 3.2.0 or later from WordPress.org.
Known limitations
- Emails always go to the Administration Email Address.
- Bulk actions offer On Visit and Hourly, not Daily.
- Crawler detection only recognises browser identifiers containing “bot”.
- Visits to cached pages are not seen.
- Summary timing depends on WP-Cron.
Help and support
- Plugin page: wordpress.org/plugins/visit-notifications
- Support forum: wordpress.org/support/plugin/visit-notifications
- Internal reference for the team: Plugin: Visit Notifications