Skip to Content
✨ v1.13.0 Released - See the release notes
DocumentationAnalyticsReports & Data Management

Reports & Data Management

Bannerize allows you to export your analytics data and provides configurable data retention policies to manage database growth over time.

Exporting Data

You can export analytics data from the Bannerize > Analytics section. Two export formats are available:

CSV Export

CSV (Comma-Separated Values) files can be opened in any spreadsheet application such as Microsoft Excel, Google Sheets, or LibreOffice Calc.

How to export:

  1. Navigate to Bannerize > Analytics
  2. Apply any desired filters (date range, campaign, banner)
  3. Click the Export CSV button
  4. The file will download to your computer

CSV file contents:

ColumnDescription
Banner IDThe post ID of the banner
Banner TitleThe name of the banner
CampaignThe campaign(s) the banner belongs to
ImpressionsTotal impression count
ClicksTotal click count
CTRClick-through rate percentage
DateThe date or date range of the data

CSV exports respect your current filter settings. If you have filtered by a specific date range or campaign, only that subset of data will be exported.

Always export your data before applying aggressive retention policies. Once records are deleted by the auto-cleanup process, they cannot be recovered.

Data Retention

Over time, analytics tables can grow large, especially on high-traffic sites. Bannerize provides automatic data retention policies to keep your database performant.

Retention Settings

Navigate to Bannerize > Settings to configure data retention. Impressions and clicks have separate, independent retention settings:

SettingDescription
Cleanup ModeHow old data is managed (see modes below)
Max RecordsMaximum number of records to keep in the table
Retention MonthsNumber of recent months of data to retain
ScheduleHow often the cleanup job runs

Cleanup Modes

ModeDescription
DisabledNo automatic cleanup. All data is retained indefinitely
Delete Max Records ExceededWhen the table exceeds the Max Records limit, the oldest records are deleted to bring the count back to the limit
Retain Within Recent MonthsRecords older than the specified number of months are deleted

Examples

Keep only the last 100,000 records:

  • Cleanup Mode: Delete Max Records Exceeded
  • Max Records: 100000

When the impressions table exceeds 100,000 rows, the oldest records are automatically deleted.

Keep only the last 6 months of data:

  • Cleanup Mode: Retain Within Recent Months
  • Retention Months: 6

Records older than 6 months are automatically deleted during the scheduled cleanup.

Disable cleanup entirely:

  • Cleanup Mode: Disabled

All analytics data is kept forever. This is fine for low-traffic sites, but monitor your database size.

The cleanup process is irreversible. Deleted records cannot be recovered. Export your data before enabling aggressive retention policies, especially if you need historical data for reporting.

Cleanup Schedule

The automatic cleanup runs as a WordPress cron job. The schedule determines how frequently the cleanup checks and enforces your retention policy:

  • Hourly — For high-traffic sites where tables grow quickly
  • Twice Daily — A balanced option for most sites
  • Daily — Sufficient for low to moderate traffic sites

WordPress cron is triggered by site visits. On very low-traffic sites, the cleanup may not run exactly on schedule. If precise scheduling is important, consider setting up a system cron job to trigger wp-cron.php at regular intervals.

Database Tables

Bannerize creates two custom database tables for analytics:

TablePurpose
{prefix}_bannerize_impressionsStores all impression events
{prefix}_bannerize_clicksStores all click events

Where {prefix} is your WordPress database table prefix (typically wp_).

Table Structure

Each table contains:

ColumnTypeDescription
idbigintAuto-incrementing primary key
banner_idbigintThe post ID of the banner
referrertextThe URL of the page where the event occurred
ipvarcharThe visitor’s IP address
user_agenttextThe visitor’s browser user agent string
created_atdatetimeTimestamp of the event

Monitoring Database Size

To check the size of your analytics tables, you can run the following SQL query from a database management tool like phpMyAdmin:

SELECT table_name, table_rows AS row_count, ROUND(data_length / 1024 / 1024, 2) AS data_size_mb, ROUND(index_length / 1024 / 1024, 2) AS index_size_mb FROM information_schema.tables WHERE table_schema = 'your_database_name' AND table_name LIKE '%bannerize%';
Table SizeRecommendation
Under 100,000 rowsNo action needed
100,000 - 500,000 rowsConsider enabling retention policies
Over 500,000 rowsEnable retention policies or increase server resources
Over 1,000,000 rowsStrongly recommended to enable retention and export historical data
Last updated on