PluginProbe
Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) / 1.3.0
Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) v1.3.0
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 / admin / browser-stats.php

browser-stats.php in Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) 1.3.0, at views/admin/browser-stats.php

49 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
5 // View of Browser Statistics
6 function pa_include_browser( $current, $browser_stats ) {
7 ?>
8 <div class="data_boxes">
9 <div class="data_boxes_title"><?php echo _e( 'Browsers Statistics', 'wp-analytify'); ?><div class="arrow_btn"></div></div>
10 <div class="data_container">
11 <?php
12 if (!empty($browser_stats["rows"])){ ?>
13 <script type="text/javascript">
14 google.load("visualization", "1", {packages:["corechart"],'callback': drawChart});
15 function drawChart() {
16
17 var data = google.visualization.arrayToDataTable([
18 ['Browser (OS)', 'Sessions'],
19 <?php
20 foreach ($browser_stats["rows"] as $b_stats) { ?>
21 ['<?php echo $b_stats[0];?> (<?php echo $b_stats[1];?>)', <?php echo $b_stats[2];?>],
22 <?php } ?>
23 ]);
24
25 var options = {
26 hAxis: {titleTextStyle: {color: 'red'}},
27 legend: 'none',
28 };
29 var formatter = new google.visualization.NumberFormat({fractionDigits: 0});
30 formatter.format(data, 1);
31
32 var chart = new google.visualization.ColumnChart(document.getElementById('browser_chart'));
33 chart.draw(data, options);
34
35 }
36 </script>
37 <div id="browser_chart" style="width: 600px; height: 400px; margin:0 auto;"></div>
38 <?php } ?>
39 </div>
40 <div class="data_boxes_footer">
41 <span class="blk">
42 <span class="dot"></span>
43 <span class="line"></span>
44 </span>
45 <span class="information-txt"><?php echo _e('listing statistics of top five browsers.', 'wp-analytify');?></span>
46 </div>
47 </div>
48 <?php } ?>
49