PluginProbe
Independent Analytics – WordPress Analytics Plugin / 2.1.4
Independent Analytics – WordPress Analytics Plugin v2.1.4
2.15.5 2.15.4 2.15.3 2.15.2 2.15.1 2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 All 120 releases
independent-analytics / IAWP / Tables / Table_Geo.php
Table_Geo.php
30 lines 4.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IAWP_SCOPED\IAWP\Tables;
4
5 use IAWP_SCOPED\IAWP\Rows\Cities;
6 use IAWP_SCOPED\IAWP\Rows\Countries;
7 use IAWP_SCOPED\IAWP\Statistics\City_Statistics;
8 use IAWP_SCOPED\IAWP\Statistics\Country_Statistics;
9 use IAWP_SCOPED\IAWP\Tables\Columns\Column;
10 use IAWP_SCOPED\IAWP\Tables\Groups\Group;
11 use IAWP_SCOPED\IAWP\Tables\Groups\Groups;
12 class Table_Geo extends Table
13 {
14 protected function table_name() : string
15 {
16 return 'geo';
17 }
18 protected function groups() : Groups
19 {
20 $groups = [];
21 $groups[] = new Group('country', \__('Country', 'independent-analytics'), \__('Countries', 'independent-analytics'), Countries::class, Country_Statistics::class);
22 $groups[] = new Group('city', \__('City', 'independent-analytics'), \__('Cities', 'independent-analytics'), Cities::class, City_Statistics::class);
23 return new Groups($groups);
24 }
25 protected function local_columns() : array
26 {
27 return [new Column(['id' => 'continent', 'label' => \esc_html__('Continent', 'independent-analytics'), 'visible' => \false, 'type' => 'string']), new Column(['id' => 'country', 'label' => \esc_html__('Country', 'independent-analytics'), 'visible' => \true, 'type' => 'string']), new Column(['id' => 'subdivision', 'label' => \esc_html__('Subdivision', 'independent-analytics'), 'visible' => \true, 'type' => 'string', 'unavailable_for' => ['country']]), new Column(['id' => 'city', 'label' => \esc_html__('City', 'independent-analytics'), 'visible' => \true, 'type' => 'string', 'unavailable_for' => ['country']]), new Column(['id' => 'visitors', 'label' => \esc_html__('Visitors', 'independent-analytics'), 'visible' => \true, 'type' => 'int']), new Column(['id' => 'views', 'label' => \esc_html__('Views', 'independent-analytics'), 'visible' => \true, 'type' => 'int']), new Column(['id' => 'sessions', 'label' => \esc_html__('Sessions', 'independent-analytics'), 'visible' => \false, 'type' => 'int']), new Column(['id' => 'average_session_duration', 'label' => \esc_html__('Session Duration', 'independent-analytics'), 'visible' => \true, 'type' => 'int', 'filter_placeholder' => 'Seconds']), new Column(['id' => 'views_per_session', 'label' => \esc_html__('Views Per Session', 'independent-analytics'), 'visible' => \false, 'type' => 'int']), new Column(['id' => 'bounce_rate', 'label' => \esc_html__('Bounce Rate', 'independent-analytics'), 'visible' => \true, 'type' => 'int']), new Column(['id' => 'visitors_growth', 'label' => \esc_html__('Visitors Growth', 'independent-analytics'), 'visible' => \false, 'type' => 'int', 'exportable' => \false]), new Column(['id' => 'views_growth', 'label' => \esc_html__('Views Growth', 'independent-analytics'), 'visible' => \false, 'type' => 'int', 'exportable' => \false]), new Column(['id' => 'wc_orders', 'label' => \esc_html__('Orders', 'independent-analytics'), 'visible' => \false, 'type' => 'int', 'requires_woocommerce' => \true]), new Column(['id' => 'wc_gross_sales', 'label' => \esc_html__('Gross Sales', 'independent-analytics'), 'visible' => \false, 'type' => 'int', 'requires_woocommerce' => \true]), new Column(['id' => 'wc_refunds', 'label' => \esc_html__('Refunds', 'independent-analytics'), 'visible' => \false, 'type' => 'int', 'requires_woocommerce' => \true]), new Column(['id' => 'wc_refunded_amount', 'label' => \esc_html__('Refunded Amount', 'independent-analytics'), 'visible' => \false, 'type' => 'int', 'requires_woocommerce' => \true]), new Column(['id' => 'wc_net_sales', 'label' => \esc_html__('Net Sales', 'independent-analytics'), 'visible' => \false, 'type' => 'int', 'requires_woocommerce' => \true]), new Column(['id' => 'wc_conversion_rate', 'label' => \esc_html__('Conversion Rate', 'independent-analytics'), 'visible' => \false, 'type' => 'int', 'requires_woocommerce' => \true]), new Column(['id' => 'wc_earnings_per_visitor', 'label' => \esc_html__('Earnings Per Visitor', 'independent-analytics'), 'visible' => \false, 'type' => 'int', 'requires_woocommerce' => \true]), new Column(['id' => 'wc_average_order_volume', 'label' => \esc_html__('Average Order Volume', 'independent-analytics'), 'visible' => \false, 'type' => 'int', 'requires_woocommerce' => \true])];
28 }
29 }
30