Black Friday: 79% off every plugin Shop the sale →

Product View Counter

What shoppers see#

Product view counter
Viewed 157 times in the last 30 days, counted once per visitor per day

Above the review section on a single product page, a line reads Viewed N times in the last 30 days with an eye icon. It is printed through WooCommerce’s woocommerce_before_single_product hook, so it appears on any theme that uses the standard single product template.

The line is hidden while a product has fewer than 5 counted views, so a quiet product never shows an unflattering “Viewed 1 time”.

What it counts#

The number is a real rolling 30-day count of product page views. Nothing is seeded, estimated or derived from sales figures.

RuleDetail
One view per visitor per product per dayA hashed fingerprint of the visitor’s IP address and browser is kept in a 24-hour transient. Repeat visits on the same day do not count again.
Crawlers are skippedKnown bots and tools (search-engine crawlers, link previews, curl, wget, Lighthouse, Pingdom, GTmetrix, headless browsers) and requests without a user agent are ignored.
Shop staff are skippedLogged-in users who can edit products (administrators and shop managers) are not counted.
Only real product page loadsAdmin screens, AJAX calls, REST requests and post previews are ignored.
Rolling windowViews are stored per day in product meta (_revnextwoopro_views_30d); days older than 30 are pruned automatically.

The fingerprint is a one-way hash (HMAC with your site’s salt), so the raw IP address and user agent are never stored.

Showing the counter elsewhere#

Use the shortcode to print the same line anywhere, for example in a product block or a page builder element:

[revnextwoopro_counter id="123"]

Replace 123 with the product ID. On a single product page the id can be left out and the current product is used. The shortcode respects the same rules: nothing is printed below 5 views, while the setting is off, or while the license is inactive.

How to disable it#

  1. Go to Review Dashboard > Pro Settings.
  2. Untick Product view counter.
  3. Click Save Changes.

With the setting off, Pro neither counts nor displays views. Developers can use the revnextwoopro_visitor_counter_enabled filter instead.

If you use a full-page cache, the counter still works: the count is updated on each uncached page load and the displayed number refreshes whenever the cached page is regenerated. Expect the number to lag behind by your cache lifetime.

Was this article helpful?