diff --git a/classes/Admin/Popups.php b/classes/Admin/Popups.php index 4749849e7..0664bc158 100644 --- a/classes/Admin/Popups.php +++ b/classes/Admin/Popups.php @@ -1066,15 +1066,16 @@ public static function fill_missing_defaults( $settings = [] ) { public static function render_analytics_meta_box() { global $post; - $popup = pum_get_popup( $post->ID ); ?> + $popup = pum_get_popup( $post->ID ); + ?>
ID ); ?> get_event_count( 'open', 'current' ); - //$conversions = $popup->get_event_count( 'conversion', 'current' ); - //$conversion_rate = $opens > 0 && $opens >= $conversions ? $conversions / $opens * 100 : false; + $opens = $popup->get_event_count( 'open' ); + $conversions = $popup->get_event_count( 'conversion' ); + $conversion_rate = $opens > 0 && $opens >= $conversions ? $conversions / $opens * 100 : 0; ?>
@@ -1082,42 +1083,38 @@ public static function render_analytics_meta_box() { - - + + + + + + + + + + - 0 ) : ?> - - - - - - 0 ) : ?> - - - - -
%
%
get_last_count_reset() ) ) : ?>
- : -
: + : +
: - 0 ) : ?> + 0 ) : ?>
- : - + : + -
: get_event_count( 'open', 'total' ); ?> +
: get_event_count( 'open', 'total' ) ); ?> - get_event_count( 'conversion', 'total' ) > 0 ) : ?> + get_event_count( 'conversion', 'total' ) > 0 ) : ?>
- : get_event_count( 'conversion', 'total' ); ?> - + : get_event_count( 'conversion', 'total' ) ); ?> +