PluginProbe
Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) / 1.0.3
Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) v1.0.3
9.1.2 9.1.1 9.1.0 9.0.2 9.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 All 153 releases
wp-analytify / views / front / general-stats.php

general-stats.php in Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) 1.0.3, at views/front/general-stats.php

112 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // View of General Statistics
4
5 function pa_include_general( $current, $stats) {
6 ?>
7 <div class="analytify_popup" id="general">
8 <div class="analytify_popup_header">
9 <h4>General Statistics</h4>
10 <span class="analytify_popup_clsbtn">&times;</span>
11 </div>
12 <div class="analytify_popup_body">
13 <div class="table-responsive">
14 <table class="analytify_table analytify_table_hover">
15 <tbody>
16 <tr>
17 <th>SESSIONS</th>
18 <td><?php echo number_format($stats->totalsForAllResults['ga:sessions']); ?></td>
19 </tr>
20 <tr>
21 <th>USERS</th>
22 <td><?php echo number_format($stats->totalsForAllResults['ga:users']); ?></td>
23 </tr>
24 <tr>
25
26 <th style="min-width: 120px;">BOUNCE RATE</th>
27 <td>
28 <?php
29 if ($stats->totalsForAllResults['ga:entrances'] <= 0) { ?>
30 0.00%
31 <?php
32 }
33 else {
34 echo number_format(round(($stats->totalsForAllResults['ga:bounces'] / $stats->totalsForAllResults['ga:entrances']) * 100, 2), 2);
35 ?>%
36 <?php } ?>
37 </td>
38 </tr>
39 <tr>
40 <th style="min-width: 145px;">AVG TIME ON SITE</th>
41 <td>
42 <?php
43 if ($stats->totalsForAllResults['ga:sessions'] <= 0) {
44 ?>
45 00:00:00
46 <?php
47 }
48 else {
49
50 echo $current->pa_pretty_time($stats->totalsForAllResults['ga:avgSessionDuration']);
51 ?>
52 <?php } ?>
53 </td>
54 </tr>
55 <tr>
56 <th style="min-width: 130px;">AVERAGE PAGES</th>
57 <td>
58 <?php
59 if ($stats->totalsForAllResults['ga:sessions'] <= 0) {
60 ?>
61 0.00
62 <?php
63 } //$stats->totalsForAllResults['ga:sessions'] <= 0
64 else {
65 ?>
66 <?php
67 echo number_format(round($stats->totalsForAllResults['ga:pageviews'] / $stats->totalsForAllResults['ga:sessions'], 2), 2);
68 ?>
69 <?php } ?>
70 </td>
71 </tr>
72 <tr>
73 <th style="min-width: 120px;">PAGE VIEWS</th>
74 <td>
75 <?php
76 if ($stats->totalsForAllResults['ga:pageviews'] <= 0) {
77 ?>
78 0
79 <?php
80 } //$stats->totalsForAllResults['ga:sessions'] <= 0
81 else {
82 ?>
83 <?php
84 echo $current->wpa_number_format( $stats->totalsForAllResults['ga:pageviews'] );
85 ?>
86 <?php } ?>
87 </td>
88 </tr>
89 <tr>
90 <th style="min-width: 145px;">USER TYPE</th>
91 <td>
92 <?php
93 if (isset($stats->totalsForAllResults))
94 {
95 $returning = $stats->totalsForAllResults['ga:sessions'] - $stats->totalsForAllResults['ga:newUsers'];
96 ?>
97 New (<?php echo $stats->totalsForAllResults['ga:newUsers'];?>)
98 Returning (<?php echo $returning;?>)
99 <?php
100 }
101 ?>
102 </td>
103 </tr>
104 </tbody>
105 </table>
106 </div>
107 </div>
108 <div class="analytify_popup_footer">
109 <span class="analytify_popup_info"></span> These are the general statistics of this page.
110 </div>
111 </div>
112 <?php } ?>