Migration.php
2 years ago
Migration_10.php
2 years ago
Migration_11.php
2 years ago
Migration_12.php
2 years ago
Migration_13.php
2 years ago
Migration_14.php
2 years ago
Migration_15.php
2 years ago
Migration_16.php
2 years ago
Migration_17.php
2 years ago
Migration_18.php
2 years ago
Migration_19.php
2 years ago
Migration_1_0.php
2 years ago
Migration_1_6.php
2 years ago
Migration_1_8.php
2 years ago
Migration_1_9.php
2 years ago
Migration_2.php
2 years ago
Migration_20.php
2 years ago
Migration_21.php
2 years ago
Migration_22.php
2 years ago
Migration_23.php
2 years ago
Migration_24.php
2 years ago
Migration_25.php
2 years ago
Migration_26.php
2 years ago
Migration_27.php
2 years ago
Migration_28.php
2 years ago
Migration_29.php
2 years ago
Migration_3.php
2 years ago
Migration_30.php
2 years ago
Migration_31.php
2 years ago
Migration_32.php
2 years ago
Migration_33.php
2 years ago
Migration_34.php
2 years ago
Migration_35.php
1 year ago
Migration_36.php
1 year ago
Migration_4.php
2 years ago
Migration_5.php
2 years ago
Migration_6.php
2 years ago
Migration_7.php
2 years ago
Migration_8.php
2 years ago
Migration_9.php
2 years ago
Migration_Job.php
2 years ago
Migrations.php
1 year ago
Step_Migration.php
2 years ago
Migration_17.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP\Migrations; |
| 4 | |
| 5 | use IAWP\Report_Finder; |
| 6 | /** @internal */ |
| 7 | class Migration_17 extends \IAWP\Migrations\Migration |
| 8 | { |
| 9 | /** |
| 10 | * @inheritdoc |
| 11 | */ |
| 12 | protected $database_version = '17'; |
| 13 | /** |
| 14 | * @inheritDoc |
| 15 | */ |
| 16 | protected function migrate() : void |
| 17 | { |
| 18 | $this->add_initial_saved_reports(); |
| 19 | } |
| 20 | private function add_initial_saved_reports() : void |
| 21 | { |
| 22 | Report_Finder::create_report(['name' => \esc_html__('Blog Posts', 'independent-analytics'), 'type' => 'views', 'user_created_report' => 0, 'filters' => [['inclusion' => 'include', 'column' => 'type', 'operator' => 'is', 'operand' => 'post']]]); |
| 23 | Report_Finder::create_report(['name' => \esc_html__('Top Landing Pages', 'independent-analytics'), 'type' => 'views', 'user_created_report' => 0, 'sort_column' => 'entrances', 'sort_direction' => 'desc', 'columns' => ['title', 'visitors', 'views', 'average_view_duration', 'bounce_rate', 'entrances', 'url', 'type']]); |
| 24 | Report_Finder::create_report(['name' => \esc_html__('Fastest-Growing Pages', 'independent-analytics'), 'type' => 'views', 'user_created_report' => 0, 'sort_column' => 'visitors_growth', 'sort_direction' => 'desc', 'columns' => ['title', 'visitors', 'views', 'average_view_duration', 'bounce_rate', 'visitors_growth', 'url', 'type'], 'filters' => [['inclusion' => 'exclude', 'column' => 'visitors', 'operator' => 'lesser', 'operand' => '5']]]); |
| 25 | Report_Finder::create_report(['name' => \esc_html__('Today', 'independent-analytics'), 'type' => 'views', 'user_created_report' => 0, 'relative_range_id' => 'TODAY']); |
| 26 | Report_Finder::create_report(['name' => \esc_html__('Search Engine Traffic', 'independent-analytics'), 'type' => 'referrers', 'user_created_report' => 0, 'filters' => [['inclusion' => 'include', 'column' => 'referrer_type', 'operator' => 'is', 'operand' => 'Search']]]); |
| 27 | Report_Finder::create_report(['name' => \esc_html__('Social Media Traffic', 'independent-analytics'), 'type' => 'referrers', 'user_created_report' => 0, 'filters' => [['inclusion' => 'include', 'column' => 'referrer_type', 'operator' => 'is', 'operand' => 'Social']]]); |
| 28 | Report_Finder::create_report(['name' => \esc_html__('Fastest-Growing Referrers', 'independent-analytics'), 'type' => 'referrers', 'user_created_report' => 0, 'sort_column' => 'visitors_growth', 'sort_direction' => 'desc', 'columns' => ['referrer', 'referrer_type', 'visitors', 'views', 'average_session_duration', 'bounce_rate', 'visitors_growth'], 'filters' => [['inclusion' => 'exclude', 'column' => 'visitors', 'operator' => 'lesser', 'operand' => '5']]]); |
| 29 | Report_Finder::create_report(['name' => \esc_html__('Last 7 Days', 'independent-analytics'), 'type' => 'referrers', 'user_created_report' => 0, 'relative_range_id' => 'LAST_SEVEN']); |
| 30 | Report_Finder::create_report(['name' => \esc_html__('Cities', 'independent-analytics'), 'type' => 'geo', 'group_name' => 'city', 'user_created_report' => 0]); |
| 31 | Report_Finder::create_report(['name' => \esc_html__('European Countries', 'independent-analytics'), 'type' => 'geo', 'user_created_report' => 0, 'filters' => [['inclusion' => 'include', 'column' => 'continent', 'operator' => 'exact', 'operand' => 'Europe']]]); |
| 32 | Report_Finder::create_report(['name' => \esc_html__('Browsers', 'independent-analytics'), 'type' => 'devices', 'group_name' => 'browser', 'user_created_report' => 0]); |
| 33 | Report_Finder::create_report(['name' => \esc_html_x('OS', 'short for operating system', 'independent-analytics'), 'type' => 'devices', 'group_name' => 'os', 'user_created_report' => 0]); |
| 34 | } |
| 35 | } |
| 36 |