Skip to content
Sad Subscription Analytics
Menu

What SadAnalytics stores

SadAnalytics keeps everything it knows about your billing in your own WordPress database: eleven tables of its own, plus a handful of options and per-user preferences. The Freemius code bundled with SadAnalytics keeps a few options of its own, and if you opted in to Freemius, it also holds the site details listed on What leaves your site.

The eleven database tables

SadAnalytics creates eleven tables of its own on activation, each named with your site's table prefix plus sadanalytics_ (wp_sadanalytics_ on a default WordPress install). Outside these tables, SadAnalytics writes only its own options, short-lived cache entries and per-user preferences (below), plus the background jobs it queues with WordPress cron and Action Scheduler.

TableWhat it holds
wp_sadanalytics_providersOne row per connected source (Stripe today, plus any connector once SadAnalytics Pro is out): its connection status, when it last synced, and its access credentials, stored encrypted.
wp_sadanalytics_customersOne row per customer: email, name, the WordPress user SadAnalytics matched them to, the referral source you assigned, their currency, and when they first appeared.
wp_sadanalytics_subscriptionsOne row per subscription, whether it came straight from the provider, was detected from a pattern of charges, or was entered by hand (a SadAnalytics Pro feature, coming soon): plan, status, amount, currency, billing interval, and its trial, period and cancellation dates.
wp_sadanalytics_subscription_eventsA history of status, plan and amount changes for each subscription, with when each one happened.
wp_sadanalytics_paymentsOne row per charge: amount, currency, status, whether it belongs to a subscription, and any refund.
wp_sadanalytics_invoicesOne row per invoice: amount due and paid, status, invoice date, and how many payment attempts it took.
wp_sadanalytics_sync_jobsThe state of each background sync: which step it is on, its progress, and any errors. Old finished jobs are cleared automatically.
wp_sadanalytics_metricsThe pre-calculated numbers your reports read (MRR, subscriber counts and more, by period and currency), so nothing is computed live while you wait.
wp_sadanalytics_cohortsPre-calculated retention: how many subscribers from each month's cohort are still active, month by month.
wp_sadanalytics_pattern_ignoresA permanent record of every payment you told SadAnalytics to treat as one-time rather than a detected subscription, so it does not come back on the next sync.
wp_sadanalytics_errorsA scrubbed log of errors raised inside SadAnalytics itself, shown on the Diagnostics tab.

Settings and other options

Besides its tables, SadAnalytics stores a handful of WordPress options. The largest is sadanalytics_settings, one array holding most of what you configure: your detected currency, the exchange-rate API key (encrypted), trial roles, target MRR, debug mode, and the weekly digest schedule.

  • sadanalytics_referral_sources, your list of referral-source options, kept separate from sadanalytics_settings so it can grow on its own.
  • sadanalytics_exempt_accounts, the list of email addresses SadAnalytics purges from every sync.
  • sadanalytics_access, who is allowed to see or manage SadAnalytics. It is used by SadAnalytics Pro (coming soon); a saved list only applies while SadAnalytics Pro is active.
  • sadanalytics_exchange_rates, the cached exchange rates fetched from freecurrencyapi.com, refreshed when you save a new key and after a sync once they are a day old.
  • A handful of small flags and dates, such as when SadAnalytics was first activated and whether each onboarding step has been completed.

The Freemius code bundled with SadAnalytics stores its own options, named with an fs_ prefix (such as fs_accounts). They record whether you opted in or skipped, and they are not part of SadAnalytics' own data.

Per-user preferences

A few preferences are stored per WordPress user rather than site-wide, so they never affect anyone else who is logged in.

  • sadanalytics_user_date_range, the report date range you last chose.
  • sadanalytics_user_dismissed_notices, which notices you have dismissed.
  • sadanalytics_onboarding_skipped, whether you skipped the setup wizard; it is cleared again the next time the plugin is activated.