'', 'country' => 'all', ] ); $analytics = wp_parse_args( get_option( 'rank_math_google_analytic_options' ), [ 'adsense_id' => '', 'account_id' => '', 'property_id' => '', 'view_id' => '', 'measurement_id' => '', 'stream_name' => '', 'country' => 'all', 'install_code' => false, 'anonymize_ip' => false, 'local_ga_js' => false, 'exclude_loggedin' => false, ] ); $is_profile_connected = Console::is_console_connected(); $is_adsense_connected = ! empty( $analytics['adsense_id'] ); $is_analytics_connected = Analytics::is_analytics_connected(); $is_index_status_enabled = Url_Inspection::is_enabled() || ! $is_profile_connected; $all_services = get_option( 'rank_math_analytics_all_services', [ 'isVerified' => '', 'inSearchConsole' => '', 'hasSitemap' => '', 'hasAnalytics' => '', 'hasAnalyticsProperty' => '', 'homeUrl' => '', 'sites' => '', 'accounts' => [], 'adsenseAccounts' => [], ] ); $is_pro_active = defined( 'RANK_MATH_PRO_FILE' ); $is_ga4 = ! Str::starts_with( 'UA-', $analytics['property_id'] ); ?> [ 'link' => wp_nonce_url( admin_url( 'admin.php?reconnect=google' ), 'rank_math_reconnect_google' ), 'class' => 'rank-math-reconnect-google', 'text' => esc_html__( 'Reconnect', 'rank-math' ), ], 'disconnect' => [ 'link' => '#', 'class' => 'rank-math-disconnect-google', 'text' => esc_html__( 'Disconnect', 'rank-math' ), ], ]; if ( Helper::is_advanced_mode() && ( $is_profile_connected || $is_adsense_connected || $is_analytics_connected ) ) { $actions['test-connections'] = [ 'link' => '#', 'class' => 'rank-math-test-connection-google', 'text' => esc_html__( 'Test Connections', 'rank-math' ), ]; } $actions = apply_filters( 'rank_math/analytics/connect_actions', $actions ); ?>
$is_profile_connected, 'disconnected' => ! $is_profile_connected, 'disabled' => ! Permissions::has_console(), ] ); $console_status_classes = Helper::classnames( 'rank-math-connection-status', [ 'rank-math-connection-status-success' => $is_profile_connected, 'rank-math-connection-status-error' => ! $is_profile_connected, ] ); $console_status = $is_profile_connected ? 'Connected' : 'Not Connected'; ?>

$is_analytics_connected, 'disconnected' => ! $is_analytics_connected, 'disabled' => ! Permissions::has_analytics(), ] ); $analytic_status_classes = Helper::classnames( 'rank-math-connection-status', [ 'rank-math-connection-status-success' => $is_analytics_connected, 'rank-math-connection-status-error' => ! $is_analytics_connected, ] ); $analytic_status = $is_analytics_connected ? 'Connected' : 'Not Connected'; ?>

' . esc_html__( 'Click here to know how', 'rank-math' ) . '.' ); ?>

>
>
$is_adsense_connected, 'disconnected' => ! $is_adsense_connected, 'disabled' => ! Permissions::has_adsense(), ] ); $adsense_status_classes = Helper::classnames( 'rank-math-connection-status', [ 'rank-math-connection-status-success' => Permissions::has_adsense() && $is_adsense_connected, 'rank-math-connection-status-error' => Permissions::has_adsense() && ! $is_adsense_connected, ] ); $adsense_status = $is_adsense_connected ? 'Connected' : 'Not Connected'; ?>

' . esc_html__( 'Learn more.', 'rank-math' ) . '' ); ?>