Read the Analytics Dashboard Listener Support donations
Listener Support donations for the shows in view, per bucket of the growth series and in total, one series per currency: what the Analytics screen draws as Donations bars on its growth chart and as the Donations card in its tier breakdown. It takes show_id, date_from, date_to, scope and the growth route’s optional interval, with the same permission, 403 and 400 as the other Analytics Dashboard routes; a tier_slug is ignored. The add-on reads core only through benecaster_get_listener_support_donations().
bucketsare the growth route’s for the same range andinterval, sopoints[i]sits on the growth series’buckets[i].countandpoints[].countinclude every donation, in any currency or none; each currency’scountonly its own. A donation with no amount or currency is inunpriced: count it, never add it as zero.- Use
decimalsto format, and*_minorfor exact sums. - Label them donations received, never revenue: refunds are not recorded for donations and there is no test-mode flag.
availableis the only “Listener Support is on” signal there is: whether any show read had a donation in the range.- The filter’s
$argsareshow_ids,date_from,date_to,tier_slug(alwaysnull) andinterval; a non-array return is ignored.
Code
const url = window.benecasterAnalyticsDashboard.apiUrl + 'analytics/donations?show_id=12&date_from=2026-10-01&date_to=2026-10-31';
const donations = await ( await fetch( url, { headers: { 'X-WP-Nonce': window.benecasterAdmin.nonce } } ) ).json();
if ( ! donations.available ) {
// No donation in these dates for any show read.
}
// donations.count → 5, donations.unpriced → 1 (counted, in no currency)
for ( const c of donations.currencies ) { // never add c.total across entries
// c → { currency: 'USD', decimals: 2, count: 2, total_minor: 750, total: 7.5, points: [ { count: 1, amount_minor: 500, amount: 5 }, … ] }
}
Hooks Used
Need this built rather than just documented? See our services →