$checks['level'] = @$property['level']; $checks['industryVertical'] = @$property['industryVertical']; $checks['dimensions'] = $reportingClass->getDimensionsByPropertyId(@$checks['matchingProfile']['accountId'], $betterAnalyticsOptions['property_id'], $dimensions); } $checks['licensed'] = DigitalPointBetterAnalytics_Helper_Api::check(true); if (@$_REQUEST['action'] == 'config') { if (!$hasTokens) { esc_html_e('You need to first link a Google Analytics account to auto-configure it.', 'better-analytics'); } elseif (empty($_REQUEST['vertical'])) { wp_enqueue_script('chosen_js', BETTER_ANALYTICS_PLUGIN_URL . 'assets/chosen/chosen.jquery.min.js', array(), BETTER_ANALYTICS_VERSION); wp_enqueue_style('chosen_css', BETTER_ANALYTICS_PLUGIN_URL . 'assets/chosen/chosen.min.css', array(), BETTER_ANALYTICS_VERSION); wp_enqueue_script('better-analytics_admin_js', BETTER_ANALYTICS_PLUGIN_URL . 'assets/digitalpoint/js/admin.js', array(), BETTER_ANALYTICS_VERSION); $verticals = $reportingClass->getIndustryVerticals(); if (!$checks['matchingProfile']) { if ($accounts = $reportingClass->getAccounts()) { $accounts = DigitalPointBetterAnalytics_Model_Reporting::parseAccounts($accounts, true); } if (!$accounts) { $hasAccounts = false; } } else { $accounts = null; } echo '<div class="wrap test-configure"> <h2>' . esc_html__('Auto-Configure', 'better-analytics') . '</h2>'; if ($hasAccounts) { echo '<div class="error"><p>' . esc_html__('Only use this option if you are sure you want to auto-configure everything.', 'better-analytics') . '</p></div>'; echo '<form action="' . esc_url(menu_page_url('better-analytics_test', false)) . '" method="POST" style="padding:15px">'; echo '<input type="hidden" name="action" value="config">'; if ($accounts) {