PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 2.0.5
ShareThis Dashboard for Google Analytics v2.0.5
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / view / stats.php
googleanalytics / view Last commit date
ga_accounts_selector.php 9 years ago ga_code.php 9 years ago ga_dashboard_widget.php 9 years ago ga_notice.php 9 years ago ga_oauth_notice.php 9 years ago ga_wp_notice.php 9 years ago page.php 9 years ago statistics.php 9 years ago stats.php 9 years ago
stats.php
125 lines
1 <div class="wrap ga-wrap" id="ga-stats-container">
2 <div class="ga-panel ga-panel-default">
3 <div class="ga-panel-heading"><strong><?php _e( "Pageviews - Last 7 days vs previous 7 days" ) ?></strong></div>
4 <div class="ga-panel-body ga-chart">
5 <div id="chart_div" style="width: 100%;"></div>
6 <div class="ga-loader-wrapper stats-page">
7 <div class="ga-loader stats-page-loader"></div>
8 </div>
9 </div>
10 </div>
11
12 <div class="ga-panel ga-panel-default">
13 <div class="ga-panel-heading"><strong><?php _e( "Comparison - Last 7 days vs previous 7 days" ) ?></strong>
14 </div>
15 <div class="ga-panel-body">
16 <div class="ga-row">
17 <?php if ( ! empty( $boxes ) ) : ?>
18 <?php foreach ( $boxes as $box ) : ?>
19 <div class="ga-box">
20 <div class="ga-panel ga-panel-default">
21 <div class="ga-panel-body ga-box-centered">
22 <div class="ga-box-label"><?php echo $box['label'] ?></div>
23 <div class="ga-box-diff"
24 style="color: <?php echo $box['color'] ?>;"><?php echo Ga_Helper::format_percent( $box['diff'] ); ?></div>
25 <div class="ga-box-comparison"><?php echo $box['comparison'] ?></div>
26 </div>
27 </div>
28 </div>
29 <?php endforeach; ?>
30 <?php endif; ?>
31 </div>
32 </div>
33 </div>
34 <?php if ( ! empty( $sources ) ) : ?>
35 <div class="ga-panel ga-panel-default">
36 <div class="ga-panel-heading"><strong><?php _e( "Top 5 Traffic Sources for the past 7 days" ) ?></strong>
37 </div>
38 <div class="ga-panel-body">
39
40 <div id="table-container">
41 <table class="ga-table">
42 <tr>
43 <td colspan="2">
44 </td>
45 <th style="text-align: right;">
46 <?php _e( 'Pageviews' ); ?>
47 </th>
48 <th style="text-align: right;">
49 <?php echo '%'; ?>
50 </th>
51 </tr>
52 <tr>
53 <td colspan="2"></td>
54 <td class="ga-col-pageviews" style="text-align: right">
55 <div style="font-size: 16px;"><?php echo $sources['total'] ?></div>
56 <div style="color: grey; font-size: 10px;">% of
57 Total: <?php echo Ga_Helper::format_percent( ( ! empty( $sources['total'] ) ) ? number_format( $sources['sum'] / $sources['total'] * 100,
58 2, '.', ' ' ) : 100 );
59 ?>
60 (<?php echo $sources['sum'] ?>)
61 </div>
62 </td>
63 <td class="ga-col-progressbar" style="text-align: right">
64 <div style="font-size: 16px;"><?php echo $sources['total'] ?></div>
65 <div style="color: grey; font-size: 10px;">% of
66 Total: <?php echo Ga_Helper::format_percent( ( ! empty( $sources['total'] ) ) ? number_format( $sources['sum'] / $sources['total'] * 100,
67 2, '.', ' ' ) : 100 );
68 ?>
69 (<?php echo $sources['sum'] ?>)
70 </div>
71 </td>
72 </tr>
73 <?php foreach ( $sources['rows'] as $key => $source ): ?>
74 <tr>
75 <td style="width: 5%;text-align: right"><?php echo $key ?>.</td>
76 <td class="ga-col-name">
77 <?php if ( $source['name'] != '(direct) / (none)' ) : ?>
78 <a class="ga-source-name" href="<?php echo $source['url'] ?>"
79 target="_blank"><?php echo $source['name'] ?></a>
80 <?php else: ?>
81 <?php echo $source['name'] ?>
82 <?php endif; ?>
83 </td>
84 <td style="text-align: right"><?php echo $source['number'] ?></td>
85 <td>
86 <div class="progress">
87 <div class="progress-bar" role="progressbar"
88 aria-valuenow="<?php echo $source['percent'] ?>" aria-valuemin="0"
89 aria-valuemax="100"
90 style="width: <?php echo $source['percent'] ?>%;"></div>
91 <span style="margin-left: 10px;"><?php echo Ga_Helper::format_percent( $source['percent'] ); ?></span>
92 </div>
93 </td>
94 </tr>
95 <?php endforeach; ?>
96 </table>
97 </div>
98 </div>
99 </div>
100 <?php endif; ?>
101
102 <?php if ( ! empty( $chart ) ) : ?>
103 <script type="text/javascript">
104
105 ga_charts.init(function () {
106
107 var data = new google.visualization.DataTable();
108 data.addColumn('string', 'Day');
109 data.addColumn('number', '<?php echo $labels['thisWeek'] ?>');
110 data.addColumn({type: 'string', role: 'tooltip', 'p': {'html': true}});
111 data.addColumn('number', '<?php echo $labels['lastWeek'] ?>');
112 data.addColumn({type: 'string', role: 'tooltip', 'p': {'html': true}});
113
114 <?php foreach ( $chart as $row ) : ?>
115 data.addRow(['<?php echo $row['day'] ?>', <?php echo $row['current'] ?>, ga_charts.createTooltip('<?php echo $row['day'] ?>', '<?php echo $row['current'] ?>'), <?php echo $row['previous'] ?>, ga_charts.createTooltip('<?php echo $row['previous-day'] ?>', '<?php echo $row['previous'] ?>')]);
116 <?php endforeach; ?>
117 ga_charts.events(data);
118 ga_charts.drawChart(data);
119 ga_loader.hide();
120 }
121 );
122 </script>
123 <?php endif; ?>
124 </div>
125