WD Google Analytics - Version 1.0.18

Version Description

  • Fixed: Bug on city/pageview report
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 WD Google Analytics
Version 1.0.18
Comparing to
See all releases

Code changes from version 1.0.17 to 1.0.18

admin/pages/dashboard.php CHANGED
@@ -426,7 +426,7 @@ if($current_user != 1 && isset($saved_user_menues[$current_user])){
426
  </select>
427
  </div>
428
  <?php
429
- $tab = $get_custom_reports[$tab]['dimension'];
430
  }
431
  elseif($tab == 'custom') { ?>
432
  <div id="first_metric" >
426
  </select>
427
  </div>
428
  <?php
429
+ $tab = 'custom_' . $get_custom_reports[$tab]['dimension'];
430
  }
431
  elseif($tab == 'custom') { ?>
432
  <div id="first_metric" >
gawd_class.php CHANGED
@@ -585,7 +585,7 @@ class GAWD
585
  $screen = get_current_screen();
586
  if (strpos($screen->base, 'gawd') !== false || strpos($screen->post_type, 'page') !== false || strpos($screen->post_type, 'post') !== false || strpos($screen->base, 'dashboard') !== false || strpos($screen->base, 'edit') !== false) {
587
  wp_enqueue_script('common');
588
- wp_enqueue_script('wp-lists');
589
  wp_enqueue_script('postbox');
590
  wp_enqueue_script('jquery-ui-tooltip');
591
  wp_enqueue_script('gawd_paging', GAWD_URL . '/inc/js/paging.js', false, GAWD_VERSION);
@@ -2097,7 +2097,7 @@ class GAWD
2097
  }
2098
  echo $goal_data;
2099
  die();
2100
- } elseif (($dimension == 'region' || $dimension == 'city') || ($dimension == 'Region' || $dimension == 'City')) {
2101
  if (get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $country_filter . '-' . $start_date . '-' . $end_date)) {
2102
  $chart_data = get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $country_filter . '-' . $start_date . '-' . $end_date);
2103
  } else {
@@ -2111,6 +2111,9 @@ class GAWD
2111
  } else {
2112
  if ($custom != '') {
2113
  $chart_data = $gawd_client->get_data($metric, $dimension, $start_date, $end_date, $filter_type, $timezone, $same_dimension);
 
 
 
2114
  } else {
2115
  if ($dimension == 'siteSpeed') {
2116
  if (get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $same_dimension . '_' . $filter_type . '-' . $start_date . '-' . $end_date)) {
585
  $screen = get_current_screen();
586
  if (strpos($screen->base, 'gawd') !== false || strpos($screen->post_type, 'page') !== false || strpos($screen->post_type, 'post') !== false || strpos($screen->base, 'dashboard') !== false || strpos($screen->base, 'edit') !== false) {
587
  wp_enqueue_script('common');
588
+ /* wp_enqueue_script('wp-lists'); */
589
  wp_enqueue_script('postbox');
590
  wp_enqueue_script('jquery-ui-tooltip');
591
  wp_enqueue_script('gawd_paging', GAWD_URL . '/inc/js/paging.js', false, GAWD_VERSION);
2097
  }
2098
  echo $goal_data;
2099
  die();
2100
+ } elseif ( $custom == '' && (( $dimension == 'region' || $dimension == 'city' ) || ( $dimension == 'Region' || $dimension == 'City' )) ) {
2101
  if (get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $country_filter . '-' . $start_date . '-' . $end_date)) {
2102
  $chart_data = get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $country_filter . '-' . $start_date . '-' . $end_date);
2103
  } else {
2111
  } else {
2112
  if ($custom != '') {
2113
  $chart_data = $gawd_client->get_data($metric, $dimension, $start_date, $end_date, $filter_type, $timezone, $same_dimension);
2114
+ if ( $return ) {
2115
+ return $chart_data;
2116
+ }
2117
  } else {
2118
  if ($dimension == 'siteSpeed') {
2119
  if (get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $same_dimension . '_' . $filter_type . '-' . $start_date . '-' . $end_date)) {
google-analytics-wd.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Google Analytics
5
  * Plugin URI: https://web-dorado.com/products/wordpress-google-analytics-plugin.html
6
  * Description: Google Analytics WD is a user-friendly all in one plugin, which allows to manage and monitor your website analytics from WordPress dashboard.
7
- * Version: 1.0.17
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -26,7 +26,7 @@ if (!defined('GAWD_INC')) {
26
  }
27
 
28
  if (!defined('GAWD_VERSION')) {
29
- define('GAWD_VERSION', '1.0.17');
30
  }
31
 
32
 
4
  * Plugin Name: Google Analytics
5
  * Plugin URI: https://web-dorado.com/products/wordpress-google-analytics-plugin.html
6
  * Description: Google Analytics WD is a user-friendly all in one plugin, which allows to manage and monitor your website analytics from WordPress dashboard.
7
+ * Version: 1.0.18
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
26
  }
27
 
28
  if (!defined('GAWD_VERSION')) {
29
+ define('GAWD_VERSION', '1.0.18');
30
  }
31
 
32
 
inc/js/gawd_admin.js CHANGED
@@ -12,6 +12,7 @@ var d_tab_name = "";
12
  var d_filter_type = "";
13
  var d_geo_type = "";
14
  var d_country_filter = "";
 
15
  var weekdays = new Array(7);
16
  weekdays[0] = "Sunday";
17
  weekdays[1] = "Monday";
@@ -63,6 +64,7 @@ function gawd_compare() {
63
  var fillAlphas = 1;
64
  }
65
  var dimension = jQuery("#gawd_tab").val();
 
66
 
67
  if (dimension == 'date') {
68
  var parseDates = true;
@@ -75,7 +77,12 @@ function gawd_compare() {
75
  } else if (dimension == 'custom') {
76
  var custom = jQuery("#gawd_custom_option").val();
77
  dimension = custom.substring(3);
78
- } else {
 
 
 
 
 
79
  var parseDates = false;
80
  var rotateAngle = 90;
81
  }
@@ -90,6 +97,7 @@ function gawd_compare() {
90
  dimension: dimension,
91
  security: gawd_admin.ajaxnonce,
92
  filter_type: filter_type,
 
93
  beforeSend: function () {
94
  jQuery('#opacity_div').show();
95
  jQuery('#loading_div').show();
@@ -255,6 +263,10 @@ function gawd_compare() {
255
  "balloonText": "",
256
  "balloonFunction": function (graphDataItem, graph) {
257
  var dimension = jQuery("#gawd_tab").val();
 
 
 
 
258
  var metric = jQuery("#gawd_metric").val();
259
  var metric_compare = metric + " compare";
260
  metric = metric.replace(/([A-Z])/g, " $1").trim();
@@ -310,7 +322,12 @@ function gawd_compare() {
310
  }
311
  metric_value = metric == "Bounce Rate" || metric == "Percent New Sessions" ? parseFloat(metric_value).toLocaleString() +'%' : metric != 'Avg Session Duration' ? parseFloat(metric_value).toLocaleString() : metric_value;
312
 
313
- date_compare = date_compare.toString().indexOf("GMT") > -1 ? '' : date_compare;
 
 
 
 
 
314
  date = date.toString().indexOf('GMT') > -1 ? '' : date;
315
  week = typeof week == 'undefined' ? '' : week != '' ? week + ', ' : '';
316
  week_compare = typeof week_compare == 'undefined' ? '' : week_compare != '' ? week_compare + ', ' : '';
@@ -798,7 +815,6 @@ function gawd_draw_analytics_compact(metric, metric_compare, dimension, chart_ty
798
  }
799
 
800
  function gawd_draw_analytics() {
801
-
802
  jQuery('#country_filter_reset').hide();
803
  jQuery("#metric_compare").show();
804
  jQuery(".vs_image").show();
@@ -856,6 +872,8 @@ function gawd_draw_analytics() {
856
  var chartType = 'column';
857
  var fillAlphas = 1;
858
  }
 
 
859
 
860
  if (dimension == 'socialActivityNetworkAction' || dimension == 'socialActivityAction' || dimension == 'socialActivityTagsSummary' || dimension == 'socialActivityPost' || dimension == 'socialActivityTimestamp' || dimension == 'socialActivityUserProfileUrl' || dimension == 'socialActivityContentUrl' || dimension == 'socialActivityUserPhotoUrl' || dimension == 'socialActivityUserHandle' || dimension == 'socialActivityEndorsingUrl' || dimension == 'socialEndorsingUrl' || dimension == 'socialActivityDisplayName') {
861
  jQuery('#metric_compare').hide();
@@ -881,7 +899,12 @@ function gawd_draw_analytics() {
881
  }
882
  return;
883
  }
884
- } else {
 
 
 
 
 
885
  var rotateAngle = 90;
886
  }
887
 
@@ -893,6 +916,7 @@ function gawd_draw_analytics() {
893
  dimension: dimension,
894
  security: gawd_admin.ajaxnonce,
895
  filter_type: filter_type,
 
896
  timezone: timezone,
897
  beforeSend: function () {
898
  jQuery('#opacity_div').show();
@@ -1122,6 +1146,10 @@ function gawd_draw_analytics() {
1122
  "balloonText": "",
1123
  "balloonFunction": function (graphDataItem, graph) {
1124
  var dimension = jQuery("#gawd_tab").val();
 
 
 
 
1125
  var metric = jQuery("#gawd_metric").val();
1126
  var metric_compare = jQuery("#gawd_metric_compare").val();
1127
  metric = metric.replace(/([A-Z])/g, " $1").trim();
@@ -1295,6 +1323,7 @@ function gawd_draw_analytics() {
1295
  d_metric_export = metric_export;
1296
  d_metric_compare_export = metric_compare_export;
1297
  d_dimension_export = dimension_export;
 
1298
  d_tab_name = tab_name;
1299
  d_filter_type = filter_type;
1300
  jQuery("#gbox_griddiv").remove();
@@ -1411,6 +1440,10 @@ jQuery(document).ready(function () {
1411
  gawd_start_date: d_start_date,
1412
  gawd_end_date: d_end_date
1413
  };
 
 
 
 
1414
 
1415
  if(jQuery('#second_data').val() != ''){
1416
  if(tab_name[1] == 'pagePath' || tab_name[1] == 'landingPagePath'){
@@ -1754,7 +1787,24 @@ function gawd_pie_chart() {
1754
  }
1755
 
1756
  var dimension = jQuery("#gawd_tab").val();
1757
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1758
  if (dimension == 'custom') {
1759
 
1760
  var custom = jQuery("#gawd_custom_option").val();
@@ -2177,6 +2227,7 @@ function gawd_pie_chart_post_page(uri, divID) {
2177
  })
2178
  }
2179
  function gawd_chart_type() {
 
2180
  if(typeof jQuery.cookie("collapsed") != 'undefined' && jQuery.cookie("collapsed") == 1){
2181
  jQuery('.gawd_menu_coteiner').hide();
2182
  jQuery('.gawd_menu_coteiner_collapse').show();
@@ -4059,4 +4110,4 @@ function pro_popup(title, link){
4059
  html += '<span style="display: inline-block;"><a id="gawd_try_demo" class="gawd_pro_buttons" target="_blank" href="http://wpdemo.web-dorado.com/wp-admin/admin.php?' + link + '">Try Demo</a></span>';
4060
  html += '</div>';
4061
  jQuery('body').append(html);
4062
- }
12
  var d_filter_type = "";
13
  var d_geo_type = "";
14
  var d_country_filter = "";
15
+ var d_custom = "";
16
  var weekdays = new Array(7);
17
  weekdays[0] = "Sunday";
18
  weekdays[1] = "Monday";
64
  var fillAlphas = 1;
65
  }
66
  var dimension = jQuery("#gawd_tab").val();
67
+ var customReport = "";
68
 
69
  if (dimension == 'date') {
70
  var parseDates = true;
77
  } else if (dimension == 'custom') {
78
  var custom = jQuery("#gawd_custom_option").val();
79
  dimension = custom.substring(3);
80
+ }
81
+ else if(dimension.indexOf("custom_") > -1){
82
+ customReport = true;
83
+ dimension = dimension.substring(7);
84
+ }
85
+ else {
86
  var parseDates = false;
87
  var rotateAngle = 90;
88
  }
97
  dimension: dimension,
98
  security: gawd_admin.ajaxnonce,
99
  filter_type: filter_type,
100
+ custom: customReport,
101
  beforeSend: function () {
102
  jQuery('#opacity_div').show();
103
  jQuery('#loading_div').show();
263
  "balloonText": "",
264
  "balloonFunction": function (graphDataItem, graph) {
265
  var dimension = jQuery("#gawd_tab").val();
266
+ if(dimension.indexOf("custom_") > -1){
267
+ customReport = true;
268
+ dimension = dimension.substring(7);
269
+ }
270
  var metric = jQuery("#gawd_metric").val();
271
  var metric_compare = metric + " compare";
272
  metric = metric.replace(/([A-Z])/g, " $1").trim();
322
  }
323
  metric_value = metric == "Bounce Rate" || metric == "Percent New Sessions" ? parseFloat(metric_value).toLocaleString() +'%' : metric != 'Avg Session Duration' ? parseFloat(metric_value).toLocaleString() : metric_value;
324
 
325
+ if(date_compare) {
326
+ date_compare = date_compare.toString().indexOf("GMT") > -1 ? '' : date_compare;
327
+ }
328
+ else {
329
+ date_compare = '';
330
+ }
331
  date = date.toString().indexOf('GMT') > -1 ? '' : date;
332
  week = typeof week == 'undefined' ? '' : week != '' ? week + ', ' : '';
333
  week_compare = typeof week_compare == 'undefined' ? '' : week_compare != '' ? week_compare + ', ' : '';
815
  }
816
 
817
  function gawd_draw_analytics() {
 
818
  jQuery('#country_filter_reset').hide();
819
  jQuery("#metric_compare").show();
820
  jQuery(".vs_image").show();
872
  var chartType = 'column';
873
  var fillAlphas = 1;
874
  }
875
+ var dimension = jQuery("#gawd_tab").val();
876
+ var customReport = "";
877
 
878
  if (dimension == 'socialActivityNetworkAction' || dimension == 'socialActivityAction' || dimension == 'socialActivityTagsSummary' || dimension == 'socialActivityPost' || dimension == 'socialActivityTimestamp' || dimension == 'socialActivityUserProfileUrl' || dimension == 'socialActivityContentUrl' || dimension == 'socialActivityUserPhotoUrl' || dimension == 'socialActivityUserHandle' || dimension == 'socialActivityEndorsingUrl' || dimension == 'socialEndorsingUrl' || dimension == 'socialActivityDisplayName') {
879
  jQuery('#metric_compare').hide();
899
  }
900
  return;
901
  }
902
+ }
903
+ else if(dimension.indexOf("custom_") > -1){
904
+ customReport = true;
905
+ dimension = dimension.substring(7);
906
+ }
907
+ else {
908
  var rotateAngle = 90;
909
  }
910
 
916
  dimension: dimension,
917
  security: gawd_admin.ajaxnonce,
918
  filter_type: filter_type,
919
+ custom: customReport,
920
  timezone: timezone,
921
  beforeSend: function () {
922
  jQuery('#opacity_div').show();
1146
  "balloonText": "",
1147
  "balloonFunction": function (graphDataItem, graph) {
1148
  var dimension = jQuery("#gawd_tab").val();
1149
+ if(dimension.indexOf("custom_") > -1){
1150
+ customReport = true;
1151
+ dimension = dimension.substring(7);
1152
+ }
1153
  var metric = jQuery("#gawd_metric").val();
1154
  var metric_compare = jQuery("#gawd_metric_compare").val();
1155
  metric = metric.replace(/([A-Z])/g, " $1").trim();
1323
  d_metric_export = metric_export;
1324
  d_metric_compare_export = metric_compare_export;
1325
  d_dimension_export = dimension_export;
1326
+ d_custom = customReport,
1327
  d_tab_name = tab_name;
1328
  d_filter_type = filter_type;
1329
  jQuery("#gbox_griddiv").remove();
1440
  gawd_start_date: d_start_date,
1441
  gawd_end_date: d_end_date
1442
  };
1443
+
1444
+ if(d_custom) {
1445
+ data.custom = d_custom;
1446
+ }
1447
 
1448
  if(jQuery('#second_data').val() != ''){
1449
  if(tab_name[1] == 'pagePath' || tab_name[1] == 'landingPagePath'){
1787
  }
1788
 
1789
  var dimension = jQuery("#gawd_tab").val();
1790
+ if(gawd_admin.show_report_page == 'on'){
1791
+ if(dimension == 'adsense' || dimension == 'adGroup' || dimension == 'productCategory' || dimension == 'productName' || dimension == 'productSku' || dimension == 'transactionId' || dimension == 'sales_performance' || dimension == 'daysToTransaction'){
1792
+ jQuery('#gawd_right_conteiner div').remove();
1793
+ var message = '<div><h4><a target="_blank" href="https://web-dorado.com/products/wordpress-google-analytics-plugin.html" class="gawd_pro"> This feature is available in Google Analytics WD Pro. </a></h4></div>';
1794
+ jQuery('#gawd_right_conteiner').append(message);
1795
+ dimension == 'pro';
1796
+ return;
1797
+ }
1798
+ }
1799
+ else{
1800
+ if(dimension != 'date' && dimension != 'realTime'){
1801
+ jQuery('#gawd_right_conteiner div').remove();
1802
+ var message = '<div><h4><a target="_blank" href="https://web-dorado.com/products/wordpress-google-analytics-plugin.html" class="gawd_pro"> This feature is available in Google Analytics WD Pro. </a></h4></div>';
1803
+ jQuery('#gawd_right_conteiner').append(message);
1804
+ dimension == 'pro';
1805
+ return;
1806
+ }
1807
+ }
1808
  if (dimension == 'custom') {
1809
 
1810
  var custom = jQuery("#gawd_custom_option").val();
2227
  })
2228
  }
2229
  function gawd_chart_type() {
2230
+
2231
  if(typeof jQuery.cookie("collapsed") != 'undefined' && jQuery.cookie("collapsed") == 1){
2232
  jQuery('.gawd_menu_coteiner').hide();
2233
  jQuery('.gawd_menu_coteiner_collapse').show();
4110
  html += '<span style="display: inline-block;"><a id="gawd_try_demo" class="gawd_pro_buttons" target="_blank" href="http://wpdemo.web-dorado.com/wp-admin/admin.php?' + link + '">Try Demo</a></span>';
4111
  html += '</div>';
4112
  jQuery('body').append(html);
4113
+ }
include/gawd_file.php CHANGED
@@ -1,312 +1,316 @@
1
- <?php
2
-
3
- abstract class GAWD_FILE {
4
-
5
- public $data;
6
- public $data_sum;
7
- public $_data_compare;
8
- public $file_type;
9
- public $report_type;
10
- public $dimension;
11
- public $dimension_recc;
12
- public $metric;
13
- public $metric_compare;
14
- public $img;
15
- public $name;
16
- public $start_date;
17
- public $end_date;
18
- public $tab_name;
19
- public $site_title;
20
- public $filter_type;
21
- public $column_names;
22
- public $sort;
23
- public $sort_by;
24
- public $file_name;
25
- public $file_dir;
26
- public $country_filter;
27
- public $geo_type;
28
- public $first_data;
29
- public $second_data;
30
- public $first_data_sum;
31
- public $second_data_sum;
32
- public $second_start_date;
33
- public $second_end_date;
34
-
35
- protected $output;
36
-
37
- abstract protected function __construct();
38
-
39
- abstract protected function create_file();
40
-
41
- abstract protected function export_file();
42
-
43
- public function sort_data() {
44
- if ($this->sort_by == 'No') {
45
- $this->sort_by = $this->column_names[1];
46
- }
47
-
48
- if ($this->sort_by == $this->column_names[1] && $this->sort == 'asc') {
49
- return true;
50
- }
51
-
52
- //usort($this->data, array($this, "compare"));
53
- }
54
-
55
- public function compare($a, $b) {
56
- $data1 = $a[$this->sort_by];
57
- $data2 = $b[$this->sort_by];
58
-
59
-
60
- if ($this->sort_by == 'date') {
61
- $data1 = strtotime($data1);
62
- $data2 = strtotime($data2);
63
- }
64
-
65
- if ($data1 == $data2) {
66
- return 0;
67
- }
68
- if ($this->sort == 'asc') {
69
- return ($data1 < $data2) ? -1 : 1;
70
- } else {
71
- return ($data1 > $data2) ? -1 : 1;
72
- }
73
- }
74
-
75
- public function get_request_data($obj,$ajax = true, $email_data = null, $dimension_recc = null, $start_date = null, $end_date = null, $metric_compare_recc = null, $metric_recc = null) {
76
- $gawd_user_data = get_option('gawd_user_data');
77
- $this->site_title = $gawd_user_data['web_property_name'];
78
- $this->img = isset($_REQUEST["img"]) && $_REQUEST["img"] != '' ? $_REQUEST["img"] : '';
79
- $this->start_date = isset($_REQUEST["gawd_start_date"]) && $_REQUEST["gawd_start_date"] != '' ? $_REQUEST["gawd_start_date"] : date('Y-m-d', strtotime('-7 days'));
80
- $this->end_date = isset($_REQUEST["gawd_end_date"]) && $_REQUEST["gawd_end_date"] != '' ? $_REQUEST["gawd_end_date"] : date('Y-m-d', strtotime('-1 days'));
81
- if(isset($_REQUEST["gawd_metric"])){
82
- $metric = sanitize_text_field($_REQUEST["gawd_metric"]);
83
- }
84
- else{
85
- if($metric_recc != null){
86
- $metric = $metric_recc;
87
- }
88
- else{
89
- $metric = 'ga:sessions';
90
- }
91
- }
92
- $this->set_metric($metric);
93
- $this->country_filter = isset($_REQUEST["country_filter"]) ? sanitize_text_field($_REQUEST["country_filter"]) : '';
94
- $this->geo_type = isset($_REQUEST["geo_type"]) ? sanitize_text_field($_REQUEST["geo_type"]) : '';
95
- if(isset($_REQUEST["gawd_metric_compare"])){
96
- $metric_compare = sanitize_text_field($_REQUEST["gawd_metric_compare"]);
97
- }
98
- else{
99
- if($metric_compare_recc != null){
100
- $metric_compare = $metric_compare_recc;
101
- }
102
- else{
103
- $metric_compare = '';
104
- }
105
- }
106
-
107
- $this->set_metric_compare($metric_compare);
108
- $this->tab_name = isset($_REQUEST["tab_name"]) ? sanitize_text_field($_REQUEST["tab_name"]) : '';
109
- /////COMPARED PAGES VARIABLES////
110
- $this->first_data = isset($_REQUEST["first_data"]) ? sanitize_text_field($_REQUEST["first_data"]) : '';
111
- $this->second_data = isset($_REQUEST["second_data"]) ? sanitize_text_field($_REQUEST["second_data"]) : '';
112
- $this->first_data_sum = isset($_REQUEST["first_data_sum"]) ? sanitize_text_field($_REQUEST["first_data_sum"]) : '';
113
- $this->second_data_sum = isset($_REQUEST["second_data_sum"]) ? sanitize_text_field($_REQUEST["second_data_sum"]) : '';
114
- $this->second_start_date = isset($_REQUEST["second_start_date"]) ? sanitize_text_field($_REQUEST["second_start_date"]) : '';
115
- $this->second_end_date = isset($_REQUEST["second_end_date"]) ? sanitize_text_field($_REQUEST["second_end_date"]) : '';
116
- /////END COMPARED PAGES VARIABLES////
117
-
118
- $this->_data_compare = isset($_REQUEST["_data_compare"]) ? ($_REQUEST["_data_compare"]) : '';
119
-
120
- if(isset($_REQUEST["gawd_dimension"]) && $dimension_recc == null){
121
- $dimension = sanitize_text_field($_REQUEST["gawd_dimension"]);
122
- }
123
- else{
124
- if($dimension_recc != null){
125
- $dimension = $dimension_recc;
126
- $this->dimension_recc = $dimension_recc;
127
- }
128
- else{
129
- $dimension = 'Date';
130
- }
131
- }
132
- if($this->dimension_recc != null){
133
- $this->set_name($this->dimension_recc);
134
-
135
- }
136
- else{
137
- $this->set_name($this->tab_name);
138
- }
139
- $dimension = ucfirst(preg_replace('/([A-Z])/', '$1', $dimension));
140
- $dimension_arg = $dimension;
141
- if($this->tab_name == 'goals'){
142
- $dimension_arg = $this->tab_name;
143
- }
144
- $this->filter_type = isset($_REQUEST["filter_type"]) && sanitize_text_field($_REQUEST["filter_type"]) != '' ? $_REQUEST["filter_type"] : 'Date';
145
- $this->set_colum_names($dimension);
146
- $this->dimension = ($this->filter_type != 'Date') ? $this->filter_type : $dimension;
147
- if(strpos($this->dimension,'dimension') >-1){
148
- require_once(GAWD_DIR . '/admin/gawd_google_class.php');
149
- $gawd_client = GAWD_google_client::get_instance();
150
- $dimension_data = $gawd_client->get_custom_dimensions();
151
- foreach($dimension_data as $key => $value){
152
- if($dimension == substr($value['id'],3)){
153
- $dimension = $value['name'];
154
- }
155
- }
156
- }
157
-
158
-
159
- $this->export_type = isset($_REQUEST["export_type"]) ? sanitize_text_field($_REQUEST["export_type"]) : '';
160
- $this->report_type = isset($_REQUEST["report_type"]) ? sanitize_text_field($_REQUEST["report_type"]) : '';
161
-
162
- $this->sort = isset($_REQUEST["sort"]) ? sanitize_text_field($_REQUEST["sort"]) : 'asc';
163
- $this->sort_by = isset($_REQUEST["sort_by"]) ? sanitize_text_field($_REQUEST["sort_by"]) : '';
164
-
165
- $args = array(
166
- 'start_date' => $this->start_date,
167
- 'end_date' => $this->end_date,
168
- 'metric' => preg_replace('/\s+/', '', $this->metric),
169
- 'dimension' => preg_replace('/\s+/', '', $dimension_arg),
170
- 'filter_type' => $this->filter_type,
171
- 'geo_type' => $this->geo_type,
172
- 'country_filter' => $this->country_filter
173
- );
174
-
175
- if ($this->metric_compare != '') {
176
- $args['metric_compare'] = $this->metric_compare;
177
- }
178
- //if($ajax == true){
179
- $data = $obj->show_data($args);
180
- //}
181
- //else{
182
- if($this->first_data != '' || $this->_data_compare != ''){
183
- $this->set_data($data,false);
184
- }
185
- else{
186
- if($start_date != null){
187
- $this->start_date = $start_date;
188
- $this->end_date = $end_date;
189
- $data = $email_data;
190
- }
191
- $this->set_data($data);
192
- }
193
-
194
- //}
195
-
196
- }
197
-
198
- public function set_data($data, $flag = true) {
199
- if($flag){
200
- $data = json_decode($data, true);
201
-
202
- $this->data = isset($data['chart_data']) ? $data['chart_data'] : $data;
203
- $this->data_sum = isset($data['data_sum']) ? $data['data_sum'] : '';
204
- }
205
- }
206
-
207
- private function set_metric($metric) {
208
- if (strpos($metric, 'ga:') !== false) {
209
- $metric = substr($metric, 3);
210
- }
211
- $this->metric = ucfirst(preg_replace('/([A-Z])/', ' $1', $metric));
212
- }
213
-
214
- private function set_metric_compare($metric_compare) {
215
- if (strpos($metric_compare, 'ga:') !== false) {
216
- $metric_compare = substr($metric_compare, 3);
217
- }
218
- $this->metric_compare = ucfirst(preg_replace('/([A-Z])/', ' $1', $metric_compare));
219
- }
220
-
221
- public function set_name($name = null) {
222
- if ($this->tab_name == 'pagePath') {
223
- $name = 'pages';
224
- }
225
- $name = ($name != null) ? $name : 'general';
226
- $this->name = ($name != 'general' && $name != 'general#') ? ucfirst(preg_replace('/([A-Z])/', ' $1', $name)) : "Audience";
227
- }
228
-
229
- public function set_colum_names($dimension) {
230
-
231
- if(strpos($dimension,'Dimension') >-1){
232
- require_once(GAWD_DIR . '/admin/gawd_google_class.php');
233
- $gawd_client = GAWD_google_client::get_instance();
234
- $dimension_data = $gawd_client->get_custom_dimensions();
235
- foreach($dimension_data as $key => $value){
236
- if(lcfirst($dimension) == substr($value['id'],3)){
237
- $dimension = $value['name'];
238
- }
239
- }
240
- }
241
- if ($dimension == 'SiteSpeed' || $dimension == 'Adsense' || $dimension == 'Goals' || $dimension == 'Sales_performance' || $dimension == 'Date') {
242
- $dimension = ucfirst($this->filter_type);
243
-
244
- }
245
-
246
- if ($this->metric_compare != '' && $this->metric_compare != '0') {
247
- $colum_names = array(
248
- 'No', trim($dimension), trim($this->metric), trim($this->metric_compare)
249
- );
250
-
251
- } else {
252
- $colum_names = array(
253
- 'No', trim($dimension), trim($this->metric)
254
- );
255
-
256
- }
257
-
258
- if ($dimension == 'Page Path' || $dimension == 'PagePath') {
259
- $colum_names = array(
260
- 'No','Page Path','Pageviews','Unique Pageviews',
261
- 'Avg Time On Page','Entrances','Bounce Rate',
262
- 'Exit Rate','Page Value','Avg Page Load Time'
263
- );
264
- }
265
- elseif ($dimension == 'Landing Page Path' || $dimension == 'LandingPagePath') {
266
- $colum_names = array(
267
- 'No','Landing Page','Sessions','Percent New Sessions','New Users','Bounce Rate','Pageviews Per Session','Avg Session Duration','Transactions','Transaction Revenue','Transactions Per Session'
268
- );
269
- }
270
- elseif ($dimension == 'Days To Transaction') {
271
- $colum_names = array('No', $dimension, 'transactions');
272
- }
273
- elseif ($dimension == 'Date') {
274
- if ($this->metric_compare != '' && $this->metric_compare != '0') {
275
- $colum_names = array(
276
- 'No', $dimension, $this->metric, $this->metric_compare
277
- );
278
-
279
- } else {
280
- $colum_names = array('No', $dimension, $this->metric);
281
-
282
- }
283
- }
284
-
285
- $this->column_names = $colum_names;
286
-
287
-
288
- }
289
-
290
- protected function set_file_name() {
291
- $file_name = ucfirst($this->name);
292
- if($this->second_data != '' || $this->_data_compare != ''){
293
- $file_name .= '(' . date('Y-m-d', strtotime($this->second_start_date)) . ' - ' . date('Y-m-d', strtotime($this->second_end_date)) . ') -compare- (' . date('Y-m-d', strtotime($this->start_date)) . ' - ' . date('Y-m-d', strtotime($this->end_date)) . ')';
294
- }
295
- else{
296
- $file_name .= '(' . date('Y-m-d', strtotime($this->start_date)) . ' - ' . date('Y-m-d', strtotime($this->end_date)). ')';
297
- }
298
- $this->file_name = (str_replace(array('"', "'", ' ', ','), '_', $file_name));
299
- }
300
-
301
- protected function set_file_dir() {
302
- if (!$this->file_name) {
303
- $this->set_file_name();
304
- }
305
- $uplode_dir = wp_upload_dir();
306
-
307
- $this->file_dir = $uplode_dir['path'] . '/' . $this->file_name . '-' . uniqid() . '.' . $this->file_type;
308
- //chmod($this->file_dir, 0777);
309
- $this->file_url = $uplode_dir['url'] . '/' . $this->file_name . '-' . uniqid() . '.' . $this->file_type;
310
- }
311
-
312
- }
 
 
 
 
1
+ <?php
2
+
3
+ abstract class GAWD_FILE {
4
+
5
+ public $data;
6
+ public $data_sum;
7
+ public $_data_compare;
8
+ public $file_type;
9
+ public $report_type;
10
+ public $dimension;
11
+ public $dimension_recc;
12
+ public $metric;
13
+ public $metric_compare;
14
+ public $img;
15
+ public $name;
16
+ public $start_date;
17
+ public $end_date;
18
+ public $tab_name;
19
+ public $site_title;
20
+ public $filter_type;
21
+ public $column_names;
22
+ public $sort;
23
+ public $sort_by;
24
+ public $file_name;
25
+ public $file_dir;
26
+ public $country_filter;
27
+ public $geo_type;
28
+ public $first_data;
29
+ public $second_data;
30
+ public $first_data_sum;
31
+ public $second_data_sum;
32
+ public $second_start_date;
33
+ public $second_end_date;
34
+ public $custom;
35
+
36
+ protected $output;
37
+
38
+ abstract protected function __construct();
39
+
40
+ abstract protected function create_file();
41
+
42
+ abstract protected function export_file();
43
+
44
+ public function sort_data() {
45
+ if ($this->sort_by == 'No') {
46
+ $this->sort_by = $this->column_names[1];
47
+ }
48
+
49
+ if ($this->sort_by == $this->column_names[1] && $this->sort == 'asc') {
50
+ return true;
51
+ }
52
+
53
+ //usort($this->data, array($this, "compare"));
54
+ }
55
+
56
+ public function compare($a, $b) {
57
+ $data1 = $a[$this->sort_by];
58
+ $data2 = $b[$this->sort_by];
59
+
60
+
61
+ if ($this->sort_by == 'date') {
62
+ $data1 = strtotime($data1);
63
+ $data2 = strtotime($data2);
64
+ }
65
+
66
+ if ($data1 == $data2) {
67
+ return 0;
68
+ }
69
+ if ($this->sort == 'asc') {
70
+ return ($data1 < $data2) ? -1 : 1;
71
+ } else {
72
+ return ($data1 > $data2) ? -1 : 1;
73
+ }
74
+ }
75
+
76
+ public function get_request_data($obj,$ajax = true, $email_data = null, $dimension_recc = null, $start_date = null, $end_date = null, $metric_compare_recc = null, $metric_recc = null) {
77
+ $gawd_user_data = get_option('gawd_user_data');
78
+ $this->site_title = $gawd_user_data['web_property_name'];
79
+ $this->img = isset($_REQUEST["img"]) && $_REQUEST["img"] != '' ? $_REQUEST["img"] : '';
80
+ $this->start_date = isset($_REQUEST["gawd_start_date"]) && $_REQUEST["gawd_start_date"] != '' ? $_REQUEST["gawd_start_date"] : date('Y-m-d', strtotime('-7 days'));
81
+ $this->end_date = isset($_REQUEST["gawd_end_date"]) && $_REQUEST["gawd_end_date"] != '' ? $_REQUEST["gawd_end_date"] : date('Y-m-d', strtotime('-1 days'));
82
+ if(isset($_REQUEST["gawd_metric"])){
83
+ $metric = sanitize_text_field($_REQUEST["gawd_metric"]);
84
+ }
85
+ else{
86
+ if($metric_recc != null){
87
+ $metric = $metric_recc;
88
+ }
89
+ else{
90
+ $metric = 'ga:sessions';
91
+ }
92
+ }
93
+ $this->set_metric($metric);
94
+ $this->country_filter = isset($_REQUEST["country_filter"]) ? sanitize_text_field($_REQUEST["country_filter"]) : '';
95
+ $this->custom = isset( $_REQUEST["custom"] ) && $_REQUEST["custom"] != '' ? $_REQUEST["custom"] : '';
96
+
97
+ $this->geo_type = isset($_REQUEST["geo_type"]) ? sanitize_text_field($_REQUEST["geo_type"]) : '';
98
+ if(isset($_REQUEST["gawd_metric_compare"])){
99
+ $metric_compare = sanitize_text_field($_REQUEST["gawd_metric_compare"]);
100
+ }
101
+ else{
102
+ if($metric_compare_recc != null){
103
+ $metric_compare = $metric_compare_recc;
104
+ }
105
+ else{
106
+ $metric_compare = '';
107
+ }
108
+ }
109
+
110
+ $this->set_metric_compare($metric_compare);
111
+ $this->tab_name = isset($_REQUEST["tab_name"]) ? sanitize_text_field($_REQUEST["tab_name"]) : '';
112
+ /////COMPARED PAGES VARIABLES////
113
+ $this->first_data = isset($_REQUEST["first_data"]) ? sanitize_text_field($_REQUEST["first_data"]) : '';
114
+ $this->second_data = isset($_REQUEST["second_data"]) ? sanitize_text_field($_REQUEST["second_data"]) : '';
115
+ $this->first_data_sum = isset($_REQUEST["first_data_sum"]) ? sanitize_text_field($_REQUEST["first_data_sum"]) : '';
116
+ $this->second_data_sum = isset($_REQUEST["second_data_sum"]) ? sanitize_text_field($_REQUEST["second_data_sum"]) : '';
117
+ $this->second_start_date = isset($_REQUEST["second_start_date"]) ? sanitize_text_field($_REQUEST["second_start_date"]) : '';
118
+ $this->second_end_date = isset($_REQUEST["second_end_date"]) ? sanitize_text_field($_REQUEST["second_end_date"]) : '';
119
+ /////END COMPARED PAGES VARIABLES////
120
+
121
+ $this->_data_compare = isset($_REQUEST["_data_compare"]) ? ($_REQUEST["_data_compare"]) : '';
122
+
123
+ if(isset($_REQUEST["gawd_dimension"]) && $dimension_recc == null){
124
+ $dimension = sanitize_text_field($_REQUEST["gawd_dimension"]);
125
+ }
126
+ else{
127
+ if($dimension_recc != null){
128
+ $dimension = $dimension_recc;
129
+ $this->dimension_recc = $dimension_recc;
130
+ }
131
+ else{
132
+ $dimension = 'Date';
133
+ }
134
+ }
135
+ if($this->dimension_recc != null){
136
+ $this->set_name($this->dimension_recc);
137
+
138
+ }
139
+ else{
140
+ $this->set_name($this->tab_name);
141
+ }
142
+ $dimension = ucfirst(preg_replace('/([A-Z])/', '$1', $dimension));
143
+ $dimension_arg = $dimension;
144
+ if($this->tab_name == 'goals'){
145
+ $dimension_arg = $this->tab_name;
146
+ }
147
+ $this->filter_type = isset($_REQUEST["filter_type"]) && sanitize_text_field($_REQUEST["filter_type"]) != '' ? $_REQUEST["filter_type"] : 'Date';
148
+ $this->set_colum_names($dimension);
149
+ $this->dimension = ($this->filter_type != 'Date') ? $this->filter_type : $dimension;
150
+ if(strpos($this->dimension,'dimension') >-1){
151
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
152
+ $gawd_client = GAWD_google_client::get_instance();
153
+ $dimension_data = $gawd_client->get_custom_dimensions();
154
+ foreach($dimension_data as $key => $value){
155
+ if($dimension == substr($value['id'],3)){
156
+ $dimension = $value['name'];
157
+ }
158
+ }
159
+ }
160
+
161
+
162
+ $this->export_type = isset($_REQUEST["export_type"]) ? sanitize_text_field($_REQUEST["export_type"]) : '';
163
+ $this->report_type = isset($_REQUEST["report_type"]) ? sanitize_text_field($_REQUEST["report_type"]) : '';
164
+
165
+ $this->sort = isset($_REQUEST["sort"]) ? sanitize_text_field($_REQUEST["sort"]) : 'asc';
166
+ $this->sort_by = isset($_REQUEST["sort_by"]) ? sanitize_text_field($_REQUEST["sort_by"]) : '';
167
+
168
+ $args = array(
169
+ 'start_date' => $this->start_date,
170
+ 'end_date' => $this->end_date,
171
+ 'metric' => preg_replace('/\s+/', '', $this->metric),
172
+ 'dimension' => preg_replace('/\s+/', '', $dimension_arg),
173
+ 'filter_type' => $this->filter_type,
174
+ 'geo_type' => $this->geo_type,
175
+ 'country_filter' => $this->country_filter,
176
+ 'custom' => $this->custom
177
+ );
178
+
179
+ if ($this->metric_compare != '') {
180
+ $args['metric_compare'] = $this->metric_compare;
181
+ }
182
+ //if($ajax == true){
183
+ $data = $obj->show_data($args);
184
+ //}
185
+ //else{
186
+ if($this->first_data != '' || $this->_data_compare != ''){
187
+ $this->set_data($data,false);
188
+ }
189
+ else{
190
+ if($start_date != null){
191
+ $this->start_date = $start_date;
192
+ $this->end_date = $end_date;
193
+ $data = $email_data;
194
+ }
195
+ $this->set_data($data);
196
+ }
197
+
198
+ //}
199
+
200
+ }
201
+
202
+ public function set_data($data, $flag = true) {
203
+ if($flag){
204
+ $data = json_decode($data, true);
205
+
206
+ $this->data = isset($data['chart_data']) ? $data['chart_data'] : $data;
207
+ $this->data_sum = isset($data['data_sum']) ? $data['data_sum'] : '';
208
+ }
209
+ }
210
+
211
+ private function set_metric($metric) {
212
+ if (strpos($metric, 'ga:') !== false) {
213
+ $metric = substr($metric, 3);
214
+ }
215
+ $this->metric = ucfirst(preg_replace('/([A-Z])/', ' $1', $metric));
216
+ }
217
+
218
+ private function set_metric_compare($metric_compare) {
219
+ if (strpos($metric_compare, 'ga:') !== false) {
220
+ $metric_compare = substr($metric_compare, 3);
221
+ }
222
+ $this->metric_compare = ucfirst(preg_replace('/([A-Z])/', ' $1', $metric_compare));
223
+ }
224
+
225
+ public function set_name($name = null) {
226
+ if ($this->tab_name == 'pagePath') {
227
+ $name = 'pages';
228
+ }
229
+ $name = ($name != null) ? $name : 'general';
230
+ $this->name = ($name != 'general' && $name != 'general#') ? ucfirst(preg_replace('/([A-Z])/', ' $1', $name)) : "Audience";
231
+ }
232
+
233
+ public function set_colum_names($dimension) {
234
+
235
+ if(strpos($dimension,'Dimension') >-1){
236
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
237
+ $gawd_client = GAWD_google_client::get_instance();
238
+ $dimension_data = $gawd_client->get_custom_dimensions();
239
+ foreach($dimension_data as $key => $value){
240
+ if(lcfirst($dimension) == substr($value['id'],3)){
241
+ $dimension = $value['name'];
242
+ }
243
+ }
244
+ }
245
+ if ($dimension == 'SiteSpeed' || $dimension == 'Adsense' || $dimension == 'Goals' || $dimension == 'Sales_performance' || $dimension == 'Date') {
246
+ $dimension = ucfirst($this->filter_type);
247
+
248
+ }
249
+
250
+ if ($this->metric_compare != '' && $this->metric_compare != '0') {
251
+ $colum_names = array(
252
+ 'No', trim($dimension), trim($this->metric), trim($this->metric_compare)
253
+ );
254
+
255
+ } else {
256
+ $colum_names = array(
257
+ 'No', trim($dimension), trim($this->metric)
258
+ );
259
+
260
+ }
261
+
262
+ if ($dimension == 'Page Path' || $dimension == 'PagePath') {
263
+ $colum_names = array(
264
+ 'No','Page Path','Pageviews','Unique Pageviews',
265
+ 'Avg Time On Page','Entrances','Bounce Rate',
266
+ 'Exit Rate','Page Value','Avg Page Load Time'
267
+ );
268
+ }
269
+ elseif ($dimension == 'Landing Page Path' || $dimension == 'LandingPagePath') {
270
+ $colum_names = array(
271
+ 'No','Landing Page','Sessions','Percent New Sessions','New Users','Bounce Rate','Pageviews Per Session','Avg Session Duration','Transactions','Transaction Revenue','Transactions Per Session'
272
+ );
273
+ }
274
+ elseif ($dimension == 'Days To Transaction') {
275
+ $colum_names = array('No', $dimension, 'transactions');
276
+ }
277
+ elseif ($dimension == 'Date') {
278
+ if ($this->metric_compare != '' && $this->metric_compare != '0') {
279
+ $colum_names = array(
280
+ 'No', $dimension, $this->metric, $this->metric_compare
281
+ );
282
+
283
+ } else {
284
+ $colum_names = array('No', $dimension, $this->metric);
285
+
286
+ }
287
+ }
288
+
289
+ $this->column_names = $colum_names;
290
+
291
+
292
+ }
293
+
294
+ protected function set_file_name() {
295
+ $file_name = ucfirst($this->name);
296
+ if($this->second_data != '' || $this->_data_compare != ''){
297
+ $file_name .= '(' . date('Y-m-d', strtotime($this->second_start_date)) . ' - ' . date('Y-m-d', strtotime($this->second_end_date)) . ') -compare- (' . date('Y-m-d', strtotime($this->start_date)) . ' - ' . date('Y-m-d', strtotime($this->end_date)) . ')';
298
+ }
299
+ else{
300
+ $file_name .= '(' . date('Y-m-d', strtotime($this->start_date)) . ' - ' . date('Y-m-d', strtotime($this->end_date)). ')';
301
+ }
302
+ $this->file_name = (str_replace(array('"', "'", ' ', ','), '_', $file_name));
303
+ }
304
+
305
+ protected function set_file_dir() {
306
+ if (!$this->file_name) {
307
+ $this->set_file_name();
308
+ }
309
+ $uplode_dir = wp_upload_dir();
310
+
311
+ $this->file_dir = $uplode_dir['path'] . '/' . $this->file_name . '-' . uniqid() . '.' . $this->file_type;
312
+ //chmod($this->file_dir, 0777);
313
+ $this->file_url = $uplode_dir['url'] . '/' . $this->file_name . '-' . uniqid() . '.' . $this->file_type;
314
+ }
315
+
316
+ }
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Google Analytics WD - user-friendly Google Analytics integration plugin ===
2
  Contributors: webdorado
3
  Donate link: https://web-dorado.com/products/wordpress-google-analytics-plugin.html
4
- Tags: google analytics, statistics, tracking, analytics dashboard, ga, google analytics dashboard, analytics, stats, googleanalytics, ecommerce tracking, custom reports, custom dimensions, analyticator, better google analytics, analitics, charts, counter, dashboard, demographics, easy analytics, ga code, gogle, google, google analytic, google analytics for wordpress, google analytics manager, google analytics plugin, google analytics tracking code, google analytics widget, hit, hit counter, hits website, install analytics, interests, keywords, marketing, pageview counter, pageviews, reports, simple analytics, statistic, stats counter, statscounter, track, tracker, tracking code, universal tracking, visitor tracker, web statistics, web stats, website visitors, wordpress analytics, hitcounter, hits, visitor tracking, visitors, universal google analytics
5
  Requires at least: 3.9
6
  Tested up to: 4.7
7
- Stable tag: 1.0.17
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -20,21 +20,23 @@ https://www.youtube.com/watch?v=n1f7ECVFNPI
20
  [Demo](http://wpdemo.web-dorado.com/wp-admin/admin.php?page=gawd_analytics)
21
  [User Manual](https://web-dorado.com/wordpress-google-analytics/installation.html)
22
 
23
- The plugin adds Google Analytics tracking code to your website, provides all the necessary options to easily customize the tracking code to best fit your requirements. You can enable Anonymize IP address to mask the user IPs, or choose to track links with same destinations, buttons, menus and search boxes with “Enhanced Link Attribution”.
24
 
25
- After authenticating your Google Analytics, you can check the traffic of any site associated with your account. You can quickly and easily switch between different website reports.
26
 
27
- Use Overview page to select any date range and check the traffic of websites registered on your Google Analytics account. This section displays Real Time, Audience, Visitors, Location and Browsers reports.
28
 
29
- If you are looking for detailed and in-depth tracking reports, then this WordPress Google Analytics plugin is what you need. It allows checking your website Audience, Real Time statistics, Visitors Demographics, Interests and many more reports. You can easily compare data in reports from two different date ranges or by metrics.
30
 
31
- All these reports can be displayed in Line, Pie or Column charts. Moreover, they can be exported to CSV and PDF files, as well as sent as scheduled emails.
32
 
33
- Various settings of this WordPress plugin will let you place Google Analytics section on your admin dashboard, and reports - in posts and pages. You can enable Cross Domain tracking, set permissions for different roles or users to access Google Analytics WD reports and more.
34
 
35
- The outstanding functionality of this plugin allows to configure Google Analytics Filters with just a few easy steps. These options will let you exclude certain IP address, country, region or city from tracking. You can also set Goals based on Destinations, Durations and Pages/Screens per Session, using Goal Management function of the Google Analytics WD plugin.
36
 
37
- The mobile-friendly layout of the WordPress Google Analytics plugin provides flawless experience on any device. You can check and configure tracking reports or settings anytime, anywhere.
 
 
38
 
39
  IMPORTANT: If you think you found a bug in the Google Analytics WD or have any problem or question concerning Google Analytics WD, do not hesitate to contact us at [support@web-dorado.com](mailto:support@web-dorado.com).
40
 
@@ -102,6 +104,9 @@ Upgrade to Google Analytics WD Pro for premium features:
102
 
103
  == Changelog ==
104
 
 
 
 
105
  = 1.0.17 =
106
  * Added: Overview page
107
  * Removed: Featured Plugins, Featured Themes pages
@@ -271,7 +276,7 @@ Click Install Now.
271
 
272
  Installation with FTP connection
273
 
274
- Connect to your website server using an FTP client software, e.g. FileZilla.
275
  Open the directory containing the files of your WordPress site and navigate to /wp-content/plugins folder.
276
  Unzip the plugin installation folder and upload it to /wp-content/plugins directory, without modifying files.
277
  Login to administrative panel of your WordPress site and go to Plugins page.
@@ -286,22 +291,22 @@ Authentication
286
 
287
  After activating Google Analytics WD, click on Analytics menu item, which will start Google Analytics account authorization process. Click Authenticate button and login to your Google account.
288
 
289
- A window asking for relevant permissions will appear. Click Allow and copy the authentication code from the text input. You will be redirected to Google Analytics WD Tracking page.
290
 
291
  Here you can add a web property on your Google Analytics account using current WordPress website. Provide a Name for the property and click Add. You can check and manage web properties from your Google Analytics account, Admin page.
292
 
293
- Alternatively, you can click Later and configure the web property any other time.
294
 
295
  You can Reauthenticate in Settings section anytime in case you need to use a different Google account to monitor Analytics tracking.
296
 
297
 
298
  Overview
299
 
300
- Click Analytics > Overview menu item. You will be taken to a page with quick reports: Real Time, Audience, Visitors, Browsers and Locations.
301
 
302
  Make sure to select the date period for overview reports. You can monitor audience overview of any of sites registered to your Google Analytics account. Choose the website using tracking site select box.
303
 
304
- Real Time. Indicates the number of users visiting your website just at that second.
305
 
306
  Audience. Number of Sessions and Users within the specified period. Use Metrics to check Sessions, New Sessions, Users, Bounce Rates, Session Duration, Page/Session and Pageviews tracking. You can also compare reports of two different metrics.
307
  Visitors. Draws a pie chart based on shares of New Visitors and Returning visitors of your website during the specified period.
@@ -314,11 +319,11 @@ Full reports of Google Analytics are under Reports page of the plugin.
314
  Reports
315
  Global description
316
 
317
- Keep track of the audience of any website of your Google Analytics account. Use the select box from the top to pick the tracking site.
318
 
319
  Metrics
320
 
321
- Metrics dropdown menus indicate Google Analytics metrics, based on which the report is being built.
322
 
323
  Use the first select box only, in case you would like to view the information of one metric. You can also compare reports of two metrics. Select a value for the second dropdown to see the result.
324
 
@@ -333,7 +338,7 @@ Bounce Rate. The percentage of single page sessions, when the user left your web
333
 
334
  Session Duration. Average duration of sessions, that took place on your site during the specified period.
335
 
336
- Pageviews. The number of pages viewed during selected time frame.
337
 
338
  Pages/Session. Indicates the average number of pages viewed during a session.
339
 
@@ -404,7 +409,7 @@ The scheduled e-mails can be deleted from Settings > Emails page of Google Analy
404
 
405
  Report Types
406
 
407
- Audience. Report of your website audience. Provides details about new and returning users of your website, sessions, bounces, pageviews, page/sessions and session durations.
408
 
409
  Real Time. Shows the number of active users visiting your website pages at that second.
410
 
@@ -412,7 +417,7 @@ Demographics. Displays tracking statistics of your website users based on their
412
 
413
  Interests. Provides tracking information about site users depending on Affinity Categories (e.g. Music Lovers or Mobile Enthusiasts), In-Market Segments (based on online product purchase interests) and Other Categories (most specific identification, for example, tennis lovers among Sports Fans).
414
 
415
- Geo. Geo-identifier report is built from interactions of location (countries, cities) and language of your website users.
416
 
417
  Behavior. Compares number of New visitors and Returning users of your website in percents. You can check the duration of sessions with Engagement report.
418
 
@@ -426,7 +431,7 @@ Traffic Source. Displays overall graph of traffic sources directing to your webs
426
 
427
  AdWords. If your website is registered on Google AdWords, you can link its Google Analytics to AdWords, and gather relevant tracking information with this report.
428
 
429
- Pages. Pages report table will provide you information about Bounces, Entrances, Pageviews, Unique Pageviews, time spent on pages, Exits and Average page loading time.
430
 
431
  Site Speed. Shows the average load time of your website during specified date range.
432
 
@@ -438,7 +443,7 @@ Ecommerce. Check sales statistics of your website by revenues, transactions, pro
438
 
439
  AdSense. Link your Google Analytics and AdSense accounts from Google Analytics Admin setting and keep track of AdSense tracking under this report.
440
 
441
- Custom Reports. Add Custom Reports from any metric and dimension in Custom Reports page, and view relevant Google Analytics tracking information in this tab.
442
 
443
  Settings
444
  Authenticate
@@ -524,13 +529,13 @@ As you configure scheduled e-mails for each Google Analytics WD report, they app
524
 
525
  Advanced
526
 
527
- The group of settings under Advanced tab provides options to enlarge the basis of your reports, select user permissions and more:
528
 
529
  Enable hover tooltips. Turn this option on to display help texts for Google Analytics WD options.
530
 
531
  Enable AdSense link tracking. You can include your Google AdSense reports to Google Analytics WD reports page by turning this option on.
532
 
533
- Enable reports on posts/pages (frontend and backend). Adds buttons to pages/posts list and site frontend, as well as under page/post metabox in editor. Clicking one will open a popup window containing comprehensive statistics of that specific page or post.
534
 
535
  Exclude non-interaction events from bounce-rate calculation. If this setting is turned on, non-interaction events will be filtered when calculating bounce-rate. Watching a video, for example, is a non-interaction event, whereas posting a comment is interactive.
536
  You can find out more about non-interaction events here.
1
  === Google Analytics WD - user-friendly Google Analytics integration plugin ===
2
  Contributors: webdorado
3
  Donate link: https://web-dorado.com/products/wordpress-google-analytics-plugin.html
4
+ Tags: google analytics, statistics, tracking, analytics dashboard, ga, google analytics dashboard, analytics, stats, googleanalytics, ecommerce tracking, custom reports, custom dimensions
5
  Requires at least: 3.9
6
  Tested up to: 4.7
7
+ Stable tag: 1.0.18
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
20
  [Demo](http://wpdemo.web-dorado.com/wp-admin/admin.php?page=gawd_analytics)
21
  [User Manual](https://web-dorado.com/wordpress-google-analytics/installation.html)
22
 
23
+ The plugin adds Google Analytics tracking code to your website, provides all the necessary options to easily customize the tracking code to best fit your requirements. With this simple analytics plugin you can enable Anonymize IP address to mask the user IPs, or choose to track links with same destinations, buttons, menus and search boxes with “Enhanced Link Attribution”.
24
 
25
+ If you are looking for detailed and in-depth tracking reports and web statistics, then this WordPress Google Analytics plugin is what you need. It allows checking your website Audience, Real Time statistics, Visitors Demographics, Interests, pageviews, and many more reports. You can easily compare data in reports from two different date ranges or by metrics. It’s a powerful WordPress analytics reporting tool widely used for marketing, visitor tracking, remarketing analytics, as well as for tracking keywords, page views, hits, visit duration and other web stats. It also performs some functions of Google tag manager including hit counter, conversion tracking,and more.
26
 
27
+ After you install this easy analytics plugin on your website it will add a Google Analytics section in your site’s admin panel, where you can access your GA code, tracking reports, and other power stats of your web properties. On the right of the tracking page you’ll see the Google Analytics script, which is the analytics code for obtaining Google statistics. You can enable Cross Domain tracking, set permissions for different roles or users to access Google Analytics WD reports and more.
28
 
29
+ Various settings of this WordPress plugin will let you place Google Analytics section on your admin dashboard, and reports - in posts and pages.
30
 
31
+ Once you authenticate your Google Analytics, you can check the traffic of any web property associated with your account. You can quickly and easily switch between different website reports.
32
 
33
+ The plugin will display statistic reports in Line, Pie or Column charts. Moreover, the reports can be exported to CSV and PDF files, as well as sent as scheduled emails.
34
 
35
+ Use Overview page to select any date range and check the traffic of websites registered on your Google Analytics account. This section displays Realtime visits, Audience Overview, Website Visitors, Location and Browsers reports.
36
 
37
+ The outstanding functionality of this universal tracking plugin allows to configure Google Analytics Filters with just a few easy steps. These options will let you exclude certain IP address, country, region or city from tracking. You can also set Goals based on Destinations, Durations and Pages/Screens per Session, using Goal Management function of the WordPress Google Analytics WD plugin.
38
+
39
+ This Google Analytics for WordPress plugin comes with a mobile friendly layout and provides flawless experience on any device. You can check and configure tracking reports or settings anytime, anywhere. Once you get to use this analytics tool you’ll make sure there is no better Google Analytics plugin that provides easy integration with GA,and lets you track visitors, manage and analyse data.
40
 
41
  IMPORTANT: If you think you found a bug in the Google Analytics WD or have any problem or question concerning Google Analytics WD, do not hesitate to contact us at [support@web-dorado.com](mailto:support@web-dorado.com).
42
 
104
 
105
  == Changelog ==
106
 
107
+ = 1.0.18 =
108
+ * Fixed: Bug on city/pageview report
109
+
110
  = 1.0.17 =
111
  * Added: Overview page
112
  * Removed: Featured Plugins, Featured Themes pages
276
 
277
  Installation with FTP connection
278
 
279
+ To install analytics on your website connect to your website server using an FTP client software, e.g. FileZilla.
280
  Open the directory containing the files of your WordPress site and navigate to /wp-content/plugins folder.
281
  Unzip the plugin installation folder and upload it to /wp-content/plugins directory, without modifying files.
282
  Login to administrative panel of your WordPress site and go to Plugins page.
291
 
292
  After activating Google Analytics WD, click on Analytics menu item, which will start Google Analytics account authorization process. Click Authenticate button and login to your Google account.
293
 
294
+ A window asking for relevant permissions will appear. Click Allow and copy the authentication Google code from the text input. You will be redirected to Google Analytics WD Tracking page.
295
 
296
  Here you can add a web property on your Google Analytics account using current WordPress website. Provide a Name for the property and click Add. You can check and manage web properties from your Google Analytics account, Admin page.
297
 
298
+ Alternatively, you can click Later and configure the web property any other time. Once you enter the tracking code analytics will start doing its work.
299
 
300
  You can Reauthenticate in Settings section anytime in case you need to use a different Google account to monitor Analytics tracking.
301
 
302
 
303
  Overview
304
 
305
+ Click Analytics > Overview menu item. You will be taken to a page with quick reports: Real Time, Audience, Visitors Overview, Browsers and Locations.
306
 
307
  Make sure to select the date period for overview reports. You can monitor audience overview of any of sites registered to your Google Analytics account. Choose the website using tracking site select box.
308
 
309
+ Real Time. Its powerful visitor tracker provides the number of users visiting your website just at that second.
310
 
311
  Audience. Number of Sessions and Users within the specified period. Use Metrics to check Sessions, New Sessions, Users, Bounce Rates, Session Duration, Page/Session and Pageviews tracking. You can also compare reports of two different metrics.
312
  Visitors. Draws a pie chart based on shares of New Visitors and Returning visitors of your website during the specified period.
319
  Reports
320
  Global description
321
 
322
+ Keep track of the audience of any website from your Google Analytics manager account. Use the select box from the top to pick the tracking site. Using its powerful hitcounter it gives you detailed reports on clicks and interactions on your pages.
323
 
324
  Metrics
325
 
326
+ Metrics dropdown menus indicate universal Google Analytics metrics, based on which the report is being built.
327
 
328
  Use the first select box only, in case you would like to view the information of one metric. You can also compare reports of two metrics. Select a value for the second dropdown to see the result.
329
 
338
 
339
  Session Duration. Average duration of sessions, that took place on your site during the specified period.
340
 
341
+ Pageviews. The pageview counter provides number of pages viewed during selected time frame.
342
 
343
  Pages/Session. Indicates the average number of pages viewed during a session.
344
 
409
 
410
  Report Types
411
 
412
+ Audience. Report of your website audience. The tracker provides details about new and returning users of your website, sessions, bounces, pageviews, page/sessions and session durations.
413
 
414
  Real Time. Shows the number of active users visiting your website pages at that second.
415
 
417
 
418
  Interests. Provides tracking information about site users depending on Affinity Categories (e.g. Music Lovers or Mobile Enthusiasts), In-Market Segments (based on online product purchase interests) and Other Categories (most specific identification, for example, tennis lovers among Sports Fans).
419
 
420
+ Geo. Geo-identifier report is built from interactions of location (countries, cities) and language of your website users similar to MaxMind.
421
 
422
  Behavior. Compares number of New visitors and Returning users of your website in percents. You can check the duration of sessions with Engagement report.
423
 
431
 
432
  AdWords. If your website is registered on Google AdWords, you can link its Google Analytics to AdWords, and gather relevant tracking information with this report.
433
 
434
+ Pages. Pages report table will provide you information about Bounces, Entrances, Pageviews, Unique Pageviews, time spent on pages, Exits, Average page loading time and hits website gets.
435
 
436
  Site Speed. Shows the average load time of your website during specified date range.
437
 
443
 
444
  AdSense. Link your Google Analytics and AdSense accounts from Google Analytics Admin setting and keep track of AdSense tracking under this report.
445
 
446
+ Custom Reports. Add Custom Reports from any metric and dimension in Custom Reports page, and view relevant Google Analytics tracking information in this tab. This is a great feature to get stats for Google marketing.
447
 
448
  Settings
449
  Authenticate
529
 
530
  Advanced
531
 
532
+ The group of settings under Advanced tab provides options to enlarge the basis of your reports, select user permissions and and enhance the functions of stats counter.
533
 
534
  Enable hover tooltips. Turn this option on to display help texts for Google Analytics WD options.
535
 
536
  Enable AdSense link tracking. You can include your Google AdSense reports to Google Analytics WD reports page by turning this option on.
537
 
538
+ Enable reports on posts/pages (frontend and backend). Adds buttons to pages/posts list and site frontend, as well as under page/post metabox in editor. Clicking one will open a popup window containing comprehensive statistics of that specific page or post. The plugin does not feature Google Analytics widget and analytics opt-out.
539
 
540
  Exclude non-interaction events from bounce-rate calculation. If this setting is turned on, non-interaction events will be filtered when calculating bounce-rate. Watching a video, for example, is a non-interaction event, whereas posting a comment is interactive.
541
  You can find out more about non-interaction events here.