PlugPress

Saddle Analytics

Saddle Analytics WP-CLI Commands

Print every Saddle Analytics report, check your setup and change settings from the command line with wp saddle-analytics.

Every report on Saddle → Analytics is also a command. Use wp saddle-analytics to print your stats, check your setup and change settings without opening wp-admin.

The commands read the same data as the page, with no cache between them. If a command and the page agree, reporting is healthy.

Check your setup

wp saddle-analytics status

Shows whether the tables exist, how many rows each holds, when the daily cleanup runs next, the version, and whether the site counts with or without cookies.

wp saddle-analytics summary --range=7d

Prints visitors, visits, page views, bounce rate, duration and online now. Add --compare to see the window before and the change.

wp saddle-analytics report channel --range=30d

Replace channel with any of these eleven reports:

  • Sources: channel, referrer, campaign
  • Audience: country, browser, os, device
  • Pages: page, entry_page, exit_page, exit_link

Options:

  • --metric=visitors or --metric=pageviews: the number to sort by.
  • --filter=<report=value>: show only matching visitors. For example, wp saddle-analytics report referrer --filter=channel=1 lists the referrers of AI visitors.

wp saddle-analytics timeseries --range=today

Prints visitors for each hour of today, or each day of a longer range. Times are UTC. Add --compare for the window before.

Choose the dates

The summary, report, timeseries and crawlers commands take the same date options. The default is the last 30 days.

  • --range=today, 7d, 30d, 90d or all
  • --from=2026-10-01 --to=2026-10-31: exact dates, as YYYY-MM-DD. Pass both. Dates cannot be in the future.

Exact dates are the one thing the command line can do that the page cannot.

See who is online

wp saddle-analytics realtime

Prints visitors in the last 30 minutes, a count for each busy minute and the top countries. These are the numbers in the Dashboard box.

List AI bots

wp saddle-analytics crawlers --range=7d

Prints each bot, its purpose and its count, then a total for each purpose. Unlike the card, it also lists the ordinary bots marked Other. If nothing is recorded yet, it lists the bots being watched.

List visitors and open one

wp saddle-analytics journeys --limit=20

Lists visitors, newest first. Add --offset=20 for the next page.

wp saddle-analytics inspect <visitor_id>

Prints one visitor’s row and every page view still stored. The id is the 32-character code at the foot of the visitor panel.

Change a setting

wp saddle-analytics settings prints all five settings. To change one:

wp saddle-analytics settings --set=retention_days=180

The keys are listed in Saddle Analytics Settings.

Record a test visit

wp saddle-analytics hit --page=/test --referrer=https://chatgpt.com/

Runs one visit through the real tracking steps and prints the result. Use --page, not --path, because --path belongs to WP-CLI itself.

This writes a real row. The visit shows up in your reports.

Other options: --ua, --utm_source, --utm_medium, --utm_campaign, --country, --screen and --ip.

Clean up data

  • wp saddle-analytics prune: deletes page views and crawler counts older than your limit now, without waiting for the daily task. Add --dry-run to see the count first.
  • wp saddle-analytics reset --yes: empties every table and keeps the plugin and its settings. This cannot be undone.
  • wp saddle-analytics repair: recounts each visitor’s visits and page views from the stored rows. It only raises a total, never lowers one. Add --dry-run to preview.

For developers

  • wp saddle-analytics seed --visitors=500 --days=30: fills the tables with fake visitors. Use it on a test site only.
  • wp saddle-analytics identity --ip=203.0.113.5: prints the visitor id an IP address and browser get today. It never prints the daily secret.
  • wp saddle-analytics abilities --user=<admin>: lists what an AI agent can read. Add --run=<name> and --input=<json> to run one as an agent would.

Next steps

Use these commands to check a new install in How to Test Saddle Analytics, or to find a fault in Fix Saddle Analytics Problems.