Skip to Content
✨ v1.13.0 Released - See the release notes
DocumentationAdvancedSettings

Settings

All Bannerize settings are accessible from Bannerize > Settings in your WordPress admin. This page documents every setting section and option.

General

The General tab controls the core tracking behavior of the plugin.

SettingDescriptionDefault
Impressions EnabledMaster switch for impression tracking across all bannersEnabled
Clicks EnabledMaster switch for click tracking across all bannersEnabled

Disabling impressions or clicks at the global level overrides all per-banner settings. If global impressions are disabled, no banner will track impressions regardless of its individual toggle.

When you disable tracking and later re-enable it, there will be a gap in your analytics data for the period when tracking was off.

Impressions Retention

Control how impression records are stored and cleaned up over time.

SettingDescriptionDefault
Cleanup ModeStrategy for managing old impression recordsDisabled
Max RecordsMaximum number of impression records to retain (used with “Delete Max Records Exceeded” mode)100,000
Retention MonthsNumber of months of impression data to keep (used with “Retain Within Recent Months” mode)6
ScheduleHow often the cleanup cron job runsDaily

Cleanup Modes Explained

  • Disabled — No automatic cleanup. Impression data grows indefinitely. Suitable for low-traffic sites.
  • Delete Max Records Exceeded — When the total number of impression records exceeds Max Records, the oldest records are deleted to bring the count back to the limit. This mode keeps a fixed-size window of the most recent data.
  • Retain Within Recent Months — Records older than Retention Months are deleted. This mode keeps a rolling time window of data.

The cleanup schedule uses WordPress cron. If your site has very low traffic, WordPress cron may not fire exactly on time. Consider using a system-level cron job (wget -q -O - https://yoursite.com/wp-cron.php) for precise scheduling.

Clicks Retention

Control how click records are stored and cleaned up. The settings mirror the Impressions Retention section:

SettingDescriptionDefault
Cleanup ModeStrategy for managing old click recordsDisabled
Max RecordsMaximum number of click records to retain100,000
Retention MonthsNumber of months of click data to keep6
ScheduleHow often the cleanup cron job runsDaily

Impressions and clicks retention are configured independently. You might want to keep click data longer than impression data since click events are typically less voluminous and more valuable for analysis.

Geolocalization

Bannerize supports geographic targeting of banners using the IPStack geolocation service.

SettingDescriptionDefault
IPStack API KeyYour API key from ipstack.com Empty

Setting Up Geolocalization

  1. Create a free account at ipstack.com 
  2. Copy your API key from the IPStack dashboard
  3. Paste it into the IPStack API Key field in Bannerize settings
  4. Click Save

Once configured, you can use geo-targeting in:

  • Shortcode: [wp_bannerize_pro_geo countries="US,UK"]
  • Widget: Enter country codes in the Geo field
  • PHP: Not directly supported via function args — use the geo shortcode via do_shortcode()

The free IPStack plan has a limit of 100 API requests per month. For production sites with significant traffic, consider upgrading to a paid IPStack plan. Each unique visitor IP requires one API lookup (results are cached for the session).

Supported Country Codes

Use standard ISO 3166-1 alpha-2 country codes (two-letter codes). Examples:

CodeCountry
USUnited States
UKUnited Kingdom
CACanada
DEGermany
FRFrance
ITItaly
ESSpain
JPJapan
AUAustralia
BRBrazil

A complete list is available at ISO 3166-1 alpha-2 .

Layout

Configure default margins applied to banner containers.

SettingDescriptionDefault
Margin TopSpace above each banner in pixels0
Margin RightSpace to the right of each banner in pixels0
Margin BottomSpace below each banner in pixels10
Margin LeftSpace to the left of each banner in pixels0

These margins are applied as inline styles to each banner container element. They provide consistent spacing without requiring custom CSS.

<!-- Example rendered output with margins --> <div class="wp-bannerize-banner" style="margin: 0px 0px 10px 0px;"> ... </div>

To override these margins with CSS, you will need to use the !important declaration since inline styles have higher specificity. Alternatively, set all margins to 0 in the settings and handle spacing entirely through your theme’s CSS.

Theme

Customize the template files used to render banners and campaign archives.

SettingDescriptionDefault
Banner Single TemplatePHP template file used to render each individual bannerPlugin default
Campaign Archive TemplatePHP template file used for campaign taxonomy archive pagesPlugin default

Using Custom Templates

To create a custom template:

  1. Create a PHP template file in your theme directory
  2. Enter the template file path in the settings
  3. The template will receive the banner post object and meta data as variables

See Customize Output for detailed instructions on creating custom templates.

Custom templates defined in your theme will survive plugin updates but will be lost if you switch themes. For portable customizations, create a child theme or a custom plugin.

Saving Settings

After making changes to any settings:

  1. Click the Save button at the bottom of the settings page
  2. Changes take effect immediately
  3. No cache clearing or server restart is needed

Changing retention settings does not immediately delete old data. The cleanup will happen at the next scheduled cron execution based on the configured schedule (hourly, twice daily, or daily).

Last updated on