Analytics
Navigate to WooCommerce → GeoBlock → Analytics to view restriction event data.
All events are stored in the {prefix}geoblock_analytics custom database table. Results are cached using the WordPress object cache with a 5-minute TTL.
Summary Cards
| Card | Metric |
|---|---|
| Total Events | All restriction events in the selected period |
| Unique Countries | Distinct country codes that triggered restrictions |
| Top Rule | The rule that fired most frequently |
| Block Rate | Percentage of product views that resulted in a restriction |
Trend Chart
A line chart showing daily restriction event counts over the selected date range (7, 14, or 30 days). Helps identify traffic spikes from specific regions.
Top Countries Table
| Column | Description |
|---|---|
| Country | Country name and flag |
| Events | Total restriction events from this country |
| % of Total | Share of all restriction events |
| Last Seen | Timestamp of the most recent event |
Rule Performance Table
| Column | Description |
|---|---|
| Rule | Rule type and identifier (product ID, category name, etc.) |
| Mode | hide / block / redirect |
| Events | Number of times this rule triggered |
| Unique Countries | Countries that triggered this specific rule |
Analytics Event Structure
Each row in the analytics table captures:
| Column | Type | Description |
|---|---|---|
event_type | varchar | restriction, redirect, gateway_block |
action | varchar | hide, block, redirect |
rule_id | int | ID of the matched rule |
rule_type | varchar | product, variation, category, tag, attribute, global, payment |
country | char(2) | ISO 3166-1 alpha-2 country code |
customer_ip_hash | varchar | SHA-256 hash of customer IP (privacy-safe) |
product_id | int | WooCommerce product ID |
gateway_id | varchar | Payment gateway ID (for gateway events) |
mode | varchar | Active restriction mode at event time |