Column.php
3 years ago
Table.php
3 years ago
Table_Campaigns.php
3 years ago
Table_Geo.php
3 years ago
Table_Pages.php
3 years ago
Table_Referrers.php
3 years ago
Table_Campaigns.php
16 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP_SCOPED\IAWP\Tables; |
| 4 | |
| 5 | class Table_Campaigns extends Table |
| 6 | { |
| 7 | protected function local_columns() : array |
| 8 | { |
| 9 | return [new Column(['id' => 'title', 'label' => \esc_html__('Landing Page', 'iawp'), 'visible' => \true, 'sort_direction' => 'asc']), new Column(['id' => 'utm_source', 'label' => \esc_html__('Source', 'iawp'), 'visible' => \true, 'sort_direction' => 'asc']), new Column(['id' => 'utm_medium', 'label' => \esc_html__('Medium', 'iawp'), 'visible' => \true, 'sort_direction' => 'asc']), new Column(['id' => 'utm_campaign', 'label' => \esc_html__('Campaign', 'iawp'), 'visible' => \true, 'sort_direction' => 'asc']), new Column(['id' => 'utm_term', 'label' => \esc_html__('Term', 'iawp'), 'visible' => \false, 'sort_direction' => 'asc']), new Column(['id' => 'utm_content', 'label' => \esc_html__('Content', 'iawp'), 'visible' => \false, 'sort_direction' => 'asc']), new Column(['id' => 'visitors', 'label' => \esc_html__('Visitors', 'iawp'), 'visible' => \true, 'sort_direction' => 'desc']), new Column(['id' => 'views', 'label' => \esc_html__('Views', 'iawp'), 'visible' => \true, 'sort_direction' => 'desc']), new Column(['id' => 'sessions', 'label' => \esc_html__('Sessions', 'iawp'), 'visible' => \true, 'sort_direction' => 'desc']), new Column(['id' => 'average_session_duration', 'label' => \esc_html__('Session Duration', 'iawp'), 'visible' => \true, 'sort_direction' => 'desc']), new Column(['id' => 'visitors_growth', 'label' => \esc_html__('Visitors Growth', 'iawp'), 'visible' => \false, 'sort_direction' => 'desc', 'exportable' => \false]), new Column(['id' => 'views_growth', 'label' => \esc_html__('Views Growth', 'iawp'), 'visible' => \false, 'sort_direction' => 'desc', 'exportable' => \false]), new Column(['id' => 'wc_orders', 'label' => \esc_html__('Orders', 'iawp'), 'visible' => \false, 'sort_direction' => 'desc', 'requires_woocommerce' => \true]), new Column(['id' => 'wc_gross_sales', 'label' => \esc_html__('Gross Sales', 'iawp'), 'visible' => \false, 'sort_direction' => 'desc', 'requires_woocommerce' => \true]), new Column(['id' => 'wc_refunds', 'label' => \esc_html__('Refunds', 'iawp'), 'visible' => \false, 'sort_direction' => 'desc', 'requires_woocommerce' => \true]), new Column(['id' => 'wc_refunded_amount', 'label' => \esc_html__('Refunded Amount', 'iawp'), 'visible' => \false, 'sort_direction' => 'desc', 'requires_woocommerce' => \true]), new Column(['id' => 'wc_net_sales', 'label' => \esc_html__('Net Sales', 'iawp'), 'visible' => \false, 'sort_direction' => 'desc', 'requires_woocommerce' => \true]), new Column(['id' => 'woocommerce_conversion_rate', 'label' => \esc_html__('Conversion Rate', 'iawp'), 'visible' => \false, 'sort_direction' => 'desc', 'requires_woocommerce' => \true]), new Column(['id' => 'woocommerce_earnings_per_visitor', 'label' => \esc_html__('Earnings Per Visitor', 'iawp'), 'visible' => \false, 'sort_direction' => 'desc', 'requires_woocommerce' => \true]), new Column(['id' => 'woocommerce_average_order_volume', 'label' => \esc_html__('Average Order Volume', 'iawp'), 'visible' => \false, 'sort_direction' => 'desc', 'requires_woocommerce' => \true])]; |
| 10 | } |
| 11 | protected function table_name() : string |
| 12 | { |
| 13 | return 'campaigns'; |
| 14 | } |
| 15 | } |
| 16 |