Skip to main content
Cookbook Marketing Burst Statistics

Get a Weekly Traffic Report from Burst Statistics with AI

Last week against the week before, day by day, with top pages, sources, countries, searches and three next steps.

Difficulty Beginner
Time ~5 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 report is read only.

The prompt
My WordPress site uses Burst Statistics. Write me a report on last week's traffic. 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. In Burst's answers, avg_time_on_page is in milliseconds (divide by 1000 for seconds) and bounce_rate is a percent. Burst counts a visit as a bounce when the visitor saw one page and left within 5 seconds.
3. This week is the 7 full days before today: date_start is midnight in my time zone 7 days before today (with that date's UTC offset) and date_end is today's start minus 1. The week before runs from midnight 14 days before today to this week's date_start minus 1. Run burst/today-summary for each week: today is the visitors, pageviews the page views and avg_time_on_page the average time. If both weeks have no visitors, tell me Burst has no data for these dates yet and stop.
4. Run burst/data with type insights, this exact metrics list: ["visitors", "pageviews", "bounce_rate"], interval day and this week's dates. Each point is one day, its timestamp the day's start. Name the best and the worst day. If one day has more than twice the average of the daily visitors points, run burst/data with type datatable for that day alone (its start to its end), datatable_id statistics_referrers and then statistics_pages, limit 5 each, and say where the extra visitors came from.
5. For this week, run burst/data with type datatable and datatable_id statistics_pages (limit 10), statistics_referrers (limit 10), sources_countries (limit 5) and search-terms (limit 10). Run statistics_pages and statistics_referrers for the week before too, with limit 20. Mark pages and sources that are new in this week's top 10, or whose visitors went up or down by more than half. Visits with no referrer (bookmarks, typed addresses, most apps and emails) are not in statistics_referrers, and the / page usually includes visits to search results pages.
6. Write the report in under 300 words, plain enough to forward to a client: a headline with visitors and page views this week against the week before (as a percent, or as plain numbers when they are under 20), the week day by day in one or two sentences, top pages, top sources, top countries, what visitors searched for, and three things worth doing next, each tied to a number above.
Already connected?

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

Run the “Get a Weekly Traffic Report from Burst Statistics with AI” recipe from the WPVibe cookbook on my connected site.

A weekly look at your traffic is how you notice a page taking off, a source drying up or a week that went wrong. Putting that report together by hand takes a while, so it rarely happens, and a client asking how the site is doing gets a screenshot.

The AI reads the last seven full days from Burst Statistics and the seven before: visitors, page views, the week day by day, top pages, sources, countries and what visitors searched for. If one day spiked, it looks at that day alone to say where the visitors came from. You get a short report you can forward, ending with three things worth doing, each tied to a number. It only reads.

Paste the prompt on Monday morning. The report counts full days in your site’s time zone and leaves today out. Burst Statistics free covers pages, referring sites, countries and site searches; campaign and UTM reports are in Burst Pro. For a quick look at today, use this recipe.

Outcome

A report of under 300 words on last week's traffic, ready to forward, with nothing changed on your site.