Skip to main content
Cookbook Marketing Burst Statistics

Check Today’s Website Traffic with Burst Statistics and AI

Today's visitors so far against yesterday and last week, who is on your site now, and the pages and sources leading the day.

Difficulty Beginner
Time ~2 min

Prerequisites

A site connected to WPVibe as an administrator, running Burst Statistics 3.7.4 or newer (tested on the free 3.7.4) on WordPress 6.9 or newer, with Burst, Settings, Advanced, Enable Abilities API turned on (it is off by default). The check is read only.

The prompt
My WordPress site uses Burst Statistics. Tell me how today's traffic is going. Don't change anything.

1. Run discover_abilities with category burst-statistics. If no burst abilities are listed, stop and tell me to install or update Burst Statistics (free or Pro, 3.7.4 or newer, on WordPress 6.9 or newer) and turn on Burst, Settings, Advanced, Enable Abilities API, which is off by default. If burst/settings is not in the list, Burst is older than 3.7.4, whose abilities can return rows without the page or referrer: tell me to update Burst Statistics, then stop. If a burst ability answers that I am not allowed, tell me WPVibe must be connected as an administrator, then stop.
2. Burst takes dates as Unix timestamps and counts days in my site's time zone. Get my site's offset from UTC today with run_wp_cli option get gmt_offset (in hours; it already includes daylight saving time) and multiply it by 3600 to get OFFSET_SECONDS (-5 becomes -18000). Then run run_wp_cli db query "SELECT UNIX_TIMESTAMP() AS now, UNIX_TIMESTAMP() - MOD(UNIX_TIMESTAMP() + OFFSET_SECONDS, 86400) AS today_start" and use those two numbers (if clocks changed between midnight and now today, move today_start by 3600 by the same rule as below). For an earlier day, subtract 86400 from today_start for each day back; if a daylight saving change falls in between (run_wp_cli option get timezone_string names the time zone; empty means a fixed offset with no changes), subtract another 3600 if clocks went back an hour since that day, or add 3600 if they went forward. A day ends 1 second before the next one starts. Always send both date_start and date_end: without them burst/today-summary counts every visit ever recorded and burst/data can come back empty.
3. Run burst/live-visitors: visitors is how many people were on the site in the last few minutes.
4. Run burst/today-summary three times: today so far (today's start to now), yesterday up to the same time (yesterday's start to that start plus the seconds since today's start), and the same weekday last week up to the same time (that day's start, with that date's UTC offset, plus the seconds since today's start). Its today field is the number of visitors in the range you sent, and pageviews the page views. Ignore its live field, which is always 0.
5. Run burst/data with type datatable, datatable_id statistics_pages, date_start today's start, date_end now and limit 5. Then the same with datatable_id statistics_referrers.
6. Burst usually records visits to search results pages under /, so the / page includes site searches. Answer in four short lines: visitors right now; today so far against yesterday and last week at the same time (as a percent, or as plain numbers when they are under 20); the top page; the top source. Add one more line only if something stands out, such as one page or source bringing more visitors than all the others together.
Already connected?

Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:

Run the “Check Today’s Website Traffic with Burst Statistics and AI” recipe from the WPVibe cookbook on my connected site.

You open your analytics to see how the day is going, then click through several screens to learn whether today is normal, which page is busy and where people came from. On most days you skip it.

The AI reads Burst Statistics for you: who is on your site right now, today so far against yesterday and the same day last week at the same time, today’s top pages and the sites sending visitors. It answers in a few lines and only reads: Burst’s abilities can’t change anything.

Paste the prompt whenever you want the day’s numbers. Burst counts days in your site’s time zone, so the AI looks that up first. Visitors who come straight to your site, from a bookmark, an app or most emails, have no referrer, so the sources list shows only sites that linked to you. For a full week with trends, use this recipe.

Outcome

A short read of today's traffic in your chat, with nothing changed on your site.