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.
| Setting | Description | Default |
|---|---|---|
| Impressions Enabled | Master switch for impression tracking across all banners | Enabled |
| Clicks Enabled | Master switch for click tracking across all banners | Enabled |
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.
| Setting | Description | Default |
|---|---|---|
| Cleanup Mode | Strategy for managing old impression records | Disabled |
| Max Records | Maximum number of impression records to retain (used with “Delete Max Records Exceeded” mode) | 100,000 |
| Retention Months | Number of months of impression data to keep (used with “Retain Within Recent Months” mode) | 6 |
| Schedule | How often the cleanup cron job runs | Daily |
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:
| Setting | Description | Default |
|---|---|---|
| Cleanup Mode | Strategy for managing old click records | Disabled |
| Max Records | Maximum number of click records to retain | 100,000 |
| Retention Months | Number of months of click data to keep | 6 |
| Schedule | How often the cleanup cron job runs | Daily |
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.
| Setting | Description | Default |
|---|---|---|
| IPStack API Key | Your API key from ipstack.com | Empty |
Setting Up Geolocalization
- Create a free account at ipstack.com
- Copy your API key from the IPStack dashboard
- Paste it into the IPStack API Key field in Bannerize settings
- 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:
| Code | Country |
|---|---|
US | United States |
UK | United Kingdom |
CA | Canada |
DE | Germany |
FR | France |
IT | Italy |
ES | Spain |
JP | Japan |
AU | Australia |
BR | Brazil |
A complete list is available at ISO 3166-1 alpha-2 .
Layout
Configure default margins applied to banner containers.
| Setting | Description | Default |
|---|---|---|
| Margin Top | Space above each banner in pixels | 0 |
| Margin Right | Space to the right of each banner in pixels | 0 |
| Margin Bottom | Space below each banner in pixels | 10 |
| Margin Left | Space to the left of each banner in pixels | 0 |
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.
| Setting | Description | Default |
|---|---|---|
| Banner Single Template | PHP template file used to render each individual banner | Plugin default |
| Campaign Archive Template | PHP template file used for campaign taxonomy archive pages | Plugin default |
Using Custom Templates
To create a custom template:
- Create a PHP template file in your theme directory
- Enter the template file path in the settings
- 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:
- Click the Save button at the bottom of the settings page
- Changes take effect immediately
- 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).