Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
perpending
/
wp-content
/
plugins
/
seo-by-rank-math-pro
/
includes
/
modules
/
analytics
/
views
/
email-reports
/
sections
:
summary.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php /** * Analytics Report summary table template. * * @package RankMath * @subpackage RankMath\Admin */ defined( 'ABSPATH' ) || exit; $analytics = get_option( 'rank_math_google_analytic_options' ); $is_analytics_connected = ! empty( $analytics ) && ! empty( $analytics['view_id'] ); ?> <?php if ( $this->get_variable( 'stats_invalid_data' ) ) { ?> <?php return; ?> <?php } ?> <table role="presentation" border="0" cellpadding="0" cellspacing="0" class="stats"> <tr> <?php if ( $is_analytics_connected ) : ?> <td class="col-1"> <h3><?php esc_html_e( 'Search Traffic', 'rank-math-pro' ); ?></h3> <?php $this->template_part( 'stat', [ 'value' => $this->get_variable( 'stats_traffic' ), 'diff' => $this->get_variable( 'stats_traffic_diff' ), 'graph' => true, 'graph_data' => $this->get_graph_data( 'traffic' ), ] ); ?> </td> <?php else : ?> <td class="col-1"> <h3><?php esc_html_e( 'Total Impressions', 'rank-math-pro' ); ?></h3> <?php $this->template_part( 'stat', [ 'value' => $this->get_variable( 'stats_impressions' ), 'diff' => $this->get_variable( 'stats_impressions_diff' ), 'graph' => true, 'graph_data' => $this->get_graph_data( 'impressions' ), ] ); ?> </td> <?php endif; ?> <?php if ( ! $is_analytics_connected ) : ?> <td class="col-2"> <h3><?php esc_html_e( 'Total Clicks', 'rank-math-pro' ); ?></h3> <?php $this->template_part( 'stat', [ 'value' => $this->get_variable( 'stats_clicks' ), 'diff' => $this->get_variable( 'stats_clicks_diff' ), 'graph' => true, 'graph_data' => $this->get_graph_data( 'clicks' ), ] ); ?> </td> <?php else : ?> <td class="col-2"> <h3><?php esc_html_e( 'Total Impressions', 'rank-math-pro' ); ?></h3> <?php $this->template_part( 'stat', [ 'value' => $this->get_variable( 'stats_impressions' ), 'diff' => $this->get_variable( 'stats_impressions_diff' ), 'graph' => true, 'graph_data' => $this->get_graph_data( 'impressions' ), ] ); ?> </td> <?php endif; ?> </tr> <tr> <td class="col-1"> <h3><?php esc_html_e( 'Total Keywords', 'rank-math-pro' ); ?></h3> <?php $this->template_part( 'stat', [ 'value' => $this->get_variable( 'stats_keywords' ), 'diff' => $this->get_variable( 'stats_keywords_diff' ), 'graph' => true, 'graph_data' => $this->get_graph_data( 'keywords' ), ] ); ?> </td> <td class="col-2"> <h3><?php esc_html_e( 'Average Position', 'rank-math-pro' ); ?></h3> <?php $this->template_part( 'stat', [ 'value' => $this->get_variable( 'stats_position' ), 'diff' => $this->get_variable( 'stats_position_diff' ), 'graph' => true, 'graph_data' => $this->get_graph_data( 'position' ), 'graph_modifier' => -100, 'human_number' => false, ] ); ?> </td> </tr> </table>