LiteShoper Traffic (liteshoper-traffic) is privacy-friendly storefront analytics that runs on your server. Track pageviews and unique visitors, see countries and referrers, and view all-time counts next to each product and blog post — no Google Analytics account required.

On this page: Overview · Prerequisites · Install · Enable tracking · Settings · Cron · Dashboard · Products & posts · How tracking works · Country detection · URLs · Checklist · Troubleshooting

1. Overview

  • JS beacon + server-side hit recording on storefront pages
  • Dashboard KPIs, charts, countries, top pages, referrers, devices, browsers, OS
  • Filters by period, page type, country, and device
  • Total views column on Products and Posts admin tables
  • Per-product / per-post traffic detail pages
  • Exclude logged-in admins from full analytics
  • Configurable hit retention with cron rollup + purge
  • Data stays on your store (no third-party analytics vendor required)

Plugin page: liteshoper.com/plugins/liteshoper-traffic

2. Prerequisites

  • LiteShoper store with a working storefront theme
  • Active liteshoper-traffic marketplace license (subscription)
  • Ability to schedule an HTTP cron job (hourly recommended)
  • Optional: Cloudflare or another CDN that sends country headers for better geo stats

Unlike Shippo or WhatsApp, there is no external API signup. After install, enable tracking and schedule cron.

3. Install the plugin

  1. Subscribe / install from LiteShoper → LiteShoper Traffic
  2. Activate the plugin on your store
  3. Open admin menu Shop → Traffic

Slug: liteshoper-traffic (older installs may have been renamed from liteshop-traffic).

4. Enable tracking

  1. Go to Traffic → Settings
  2. Check Enable storefront traffic tracking
  3. Optional: check Exclude logged-in admin sessions so your own browsing does not inflate charts
  4. Set Hit retention (days) — default 90; range 7–730
  5. Click Save settings

Raw hits and daily rollups older than retention are deleted by cron. Entity view totals (product/post Total views) are kept.

5. Settings reference

Setting What it does
Enable tracking Turns storefront collection on/off
Exclude admins Skips full analytics hits + beacon for logged-in admins. Product/post “Total views” can still increase when admins browse.
Hit retention How long raw/daily data is kept before purge
Rotate collect secret Invalidates signed beacon payloads until pages reload
Rotate cron token Changes the cron URL; update your scheduler
Clear all traffic data Deletes hits, daily aggregates, and entity totals (irreversible)

6. Schedule cron (required for clean stats)

Cron rolls up daily aggregates and purges old hits. Schedule hourly (or with your other store crons):

GET https://YOUR-STORE.com/cron/traffic?token=YOUR_CRON_SECRET
  1. Copy the URL from Traffic → Settings → Cron
  2. Add it to your host panel, system cron, or uptime monitor
  3. Or click Run cron now once to verify

Cron is throttled (~55 seconds) to avoid accidental double runs.

7. Use the Traffic dashboard

  1. Open Shop → Traffic (Dashboard)
  2. Apply filters:
    • Period — last N days
    • Page type — home, shop, product, blog, post, cart, checkout, other
    • Country
    • Device — desktop / mobile / tablet
  3. Review KPIs (today + period), charts, country map/list, top pages, referrers, devices, browsers, OS, and recent hits

8. Product & post pageviews

  • Admin Products and Posts tables show a Total views column
  • Click the number to open Traffic Detail for that product or post
  • Path: traffic/entity?type=product&id=… or type=post

9. How tracking works

  1. On storefront page load, the plugin records a server-side view when possible
  2. A small beacon script (beacon.js) posts to /traffic/collect with a signed payload
  3. Bots / common crawlers are filtered where possible
  4. Rate limits protect the collect endpoint
  5. Cron builds traffic_daily rollups for faster dashboard queries

If a theme skips get_header(), a shutdown backup still attempts to record the hit.

10. Country detection

Country codes come from available request headers when your CDN/proxy provides them (for example Cloudflare). Without geo headers, some traffic may show as unknown (XX). For best maps, put the store behind Cloudflare or another CDN that injects country headers.

11. Admin pages

Page Path Purpose
Dashboard traffic KPIs, charts, countries, pages, referrers
Settings traffic/settings Enable, retention, cron, secrets, clear data
Entity detail traffic/entity Per-product or per-post report

12. URL reference

Path Purpose
POST /traffic/collect Signed storefront beacon
GET /cron/traffic?token=… Rollup + retention purge

13. Go-live checklist

  1. Plugin installed and activated
  2. Tracking enabled in Settings
  3. Exclude admins on (recommended for cleaner stats)
  4. Cron URL scheduled hourly
  5. Browse the storefront in a private/incognito window (not as admin)
  6. Refresh Traffic dashboard — pageviews increase
  7. Confirm Views column on Products / Posts

14. Troubleshooting

Issue Fix
Dashboard stays at zero Enable tracking; browse while logged out (if exclude admins is on); hard-refresh storefront; wait a minute and reload dashboard
Only admin traffic missing Expected when Exclude admins is enabled
Cron 403 Forbidden Token mismatch — copy the URL again or rotate cron token and update the scheduler
Old chart data bloated Lower retention days and run cron
Country mostly XX / unknown Use a CDN that sends country headers (e.g. Cloudflare)
Beacon / collect errors after rotate Reload storefront pages so new collect signatures are issued
Views column missing Confirm plugin is active; open Products/Posts list (not a custom admin screen)

References:
LiteShoper Traffic plugin · In-store guide: Shop → Traffic → Settings

← All docs

LiteShoper Help Answers from plugins, docs & FAQs

Hi! Ask me about LiteShoper plugins, licenses, or documentation.