Google Analytics - Version 3.1.0

Version Description

  • 26-Jan-2020
  • New : Localization support.
  • New : Review notice.
Download this release

Release Info

Developer amribrahim
Plugin Icon 128x128 Google Analytics
Version 3.1.0
Comparing to
See all releases

Code changes from version 3.0.0 to 3.1.0

core/GoogleAnalyticsAPI.class.php CHANGED
@@ -7,7 +7,7 @@ use Lara\Utils\Common as Common;
7
  * @package Google Analytics by Lara
8
  * @author Amr M. Ibrahim <mailamr@gmail.com>
9
  * @link https://www.xtraorbit.com/
10
- * @copyright Copyright (c) WHMCSAdminTheme 2016 - 2017
11
  */
12
 
13
  if (!defined("ABSPATH"))
@@ -35,12 +35,14 @@ class GoogleAnalyticsAPI{
35
  private $redirect_uri;
36
  private $httpRequest;
37
  private $queryParams;
 
38
 
39
  public function __construct(){
40
  $this->httpRequest = new Common\callURL();
41
  $this->redirect_uri = 'urn:ietf:wg:oauth:2.0:oob';
42
  $this->start_date = date('Y-m-d', strtotime('-1 month'));
43
  $this->end_date = date('Y-m-d');
 
44
  }
45
 
46
  public function authURL($params=array()) {
@@ -82,7 +84,7 @@ class GoogleAnalyticsAPI{
82
  $results = $this->httpRequest(self::TOKEN_URL, $params, "POST");
83
  if ( !empty($results['access_token']) && !empty($results['token_type']) && !empty($results['expires_in']) && !empty($results['refresh_token']) ){
84
  return $results;
85
- }else{ Common\ErrorHandler::FatalError("Invalid Reply","Google Replied with unexpected replay, enable debugging to check the reply..",100,$results); }
86
  }
87
 
88
  public function refreshAccessToken() {
@@ -94,7 +96,7 @@ class GoogleAnalyticsAPI{
94
  $results = $this->httpRequest(self::TOKEN_URL, $params, "POST");
95
  if ( !empty($results['access_token']) && !empty($results['token_type']) && !empty($results['expires_in']) ){
96
  return $results;
97
- }else{ Common\ErrorHandler::FatalError("Invalid Reply","Google Replied with unexpected replay, enable debugging to check the reply..",101,$results); }
98
  }
99
 
100
  private function httpRequest ($url, $query, $method){
@@ -126,7 +128,7 @@ class GoogleAnalyticsAPI{
126
  $this->$property = $value;
127
  break;
128
  default;
129
- Common\ErrorHandler::FatalError("Invalid Property! : ".$property);
130
  break;
131
  }
132
  }
7
  * @package Google Analytics by Lara
8
  * @author Amr M. Ibrahim <mailamr@gmail.com>
9
  * @link https://www.xtraorbit.com/
10
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
11
  */
12
 
13
  if (!defined("ABSPATH"))
35
  private $redirect_uri;
36
  private $httpRequest;
37
  private $queryParams;
38
+ private $errorMessages = array();
39
 
40
  public function __construct(){
41
  $this->httpRequest = new Common\callURL();
42
  $this->redirect_uri = 'urn:ietf:wg:oauth:2.0:oob';
43
  $this->start_date = date('Y-m-d', strtotime('-1 month'));
44
  $this->end_date = date('Y-m-d');
45
+ $this->errorMessages['missingWebmasterSiteUrl'] = __('Missing Search Console Property URL - Please use the <b>Settings</b> tab to choose a valid <b>Search Console Property URL</b>.', 'lara-google-analytics');
46
  }
47
 
48
  public function authURL($params=array()) {
84
  $results = $this->httpRequest(self::TOKEN_URL, $params, "POST");
85
  if ( !empty($results['access_token']) && !empty($results['token_type']) && !empty($results['expires_in']) && !empty($results['refresh_token']) ){
86
  return $results;
87
+ }else{ Common\ErrorHandler::FatalError(__('Invalid Reply', 'lara-google-analytics'),__('Google Replied with unexpected replay, enable debugging to check the reply', 'lara-google-analytics'),100,$results); }
88
  }
89
 
90
  public function refreshAccessToken() {
96
  $results = $this->httpRequest(self::TOKEN_URL, $params, "POST");
97
  if ( !empty($results['access_token']) && !empty($results['token_type']) && !empty($results['expires_in']) ){
98
  return $results;
99
+ }else{ Common\ErrorHandler::FatalError(__('Invalid Reply', 'lara-google-analytics'),__('Google Replied with unexpected replay, enable debugging to check the reply', 'lara-google-analytics'),101,$results); }
100
  }
101
 
102
  private function httpRequest ($url, $query, $method){
128
  $this->$property = $value;
129
  break;
130
  default;
131
+ Common\ErrorHandler::FatalError(__('Invalid Property', 'lara-google-analytics')." : ".$property);
132
  break;
133
  }
134
  }
core/callURL.class.php CHANGED
@@ -7,7 +7,7 @@ use Lara\Utils\Common as Common;
7
  * @package Google Analytics by Lara
8
  * @author Amr M. Ibrahim <mailamr@gmail.com>
9
  * @link https://www.xtraorbit.com/
10
- * @copyright Copyright (c) WHMCSAdminTheme 2016 - 2017
11
  */
12
 
13
  if (!defined("ABSPATH"))
@@ -88,7 +88,7 @@ class callURL{
88
 
89
  ## Check for cURL
90
  if (!extension_loaded('curl')) {
91
- Common\ErrorHandler::FatalError("Fatal Error","cURL is not installed/enabled on your server. Please contact your server administrator or hosting provider for assistance with installing/enabling cURL extension for PHP.");
92
  }
93
 
94
  ## Do Call
7
  * @package Google Analytics by Lara
8
  * @author Amr M. Ibrahim <mailamr@gmail.com>
9
  * @link https://www.xtraorbit.com/
10
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
11
  */
12
 
13
  if (!defined("ABSPATH"))
88
 
89
  ## Check for cURL
90
  if (!extension_loaded('curl')) {
91
+ Common\ErrorHandler::FatalError(__('Fatal Error', 'lara-google-analytics'),__('cURL is not installed/enabled on your server. Please contact your server administrator or hosting provider for assistance with installing/enabling cURL extension for PHP.', 'lara-google-analytics'));
92
  }
93
 
94
  ## Do Call
core/exception.class.php CHANGED
@@ -6,7 +6,7 @@ namespace Lara\Utils\Common;
6
  * @package Google Analytics by Lara
7
  * @author Amr M. Ibrahim <mailamr@gmail.com>
8
  * @link https://www.xtraorbit.com/
9
- * @copyright Copyright (c) WHMCSAdminTheme 2016 - 2017
10
  */
11
 
12
  if (!defined("ABSPATH"))
6
  * @package Google Analytics by Lara
7
  * @author Amr M. Ibrahim <mailamr@gmail.com>
8
  * @link https://www.xtraorbit.com/
9
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
10
  */
11
 
12
  if (!defined("ABSPATH"))
core/lrgawidget.class.php CHANGED
@@ -9,7 +9,7 @@ use Lara\Utils\Common as Common;
9
  * @package Google Analytics by Lara
10
  * @author Amr M. Ibrahim <mailamr@gmail.com>
11
  * @link https://www.xtraorbit.com/
12
- * @copyright Copyright (c) WHMCSAdminTheme 2016 - 2017
13
  */
14
 
15
  if (!defined("ABSPATH"))
@@ -80,13 +80,13 @@ class lrgawidget{
80
  elseif ($id === 7){$plotData['pageviewsPerSession'][] = array($row[0], $this->roundNumbers($value)); $plotData['pageviewsPerSession_sb'][] = $this->roundNumbers($value);}
81
  }
82
  }
83
- $finalPlotData['sessions'] = array("label" => "Sessions", "data" => $plotData['sessions'], "lrbefore"=>"", "lrafter"=>"", "lrformat"=>"");
84
- $finalPlotData['users'] = array("label" => "Users", "data" => $plotData['users'], "lrbefore"=>"", "lrafter"=>"", "lrformat"=>"");
85
- $finalPlotData['pageviews'] = array("label" => "Pageviews", "data" => $plotData['pageviews'], "lrbefore"=>"", "lrafter"=>"", "lrformat"=>"");
86
- $finalPlotData['percentNewSessions'] = array("label" => "% New Sessions", "data" => $plotData['percentNewSessions'], "lrbefore"=>"", "lrafter"=>"%", "lrformat"=>"");
87
- $finalPlotData['bounceRate'] = array("label" => "Bounce Rate", "data" => $plotData['bounceRate'], "lrbefore"=>"", "lrafter"=>"%", "lrformat"=>"");
88
- $finalPlotData['avgSessionDuration'] = array("label" => "avg. Session Duration", "data" => $plotData['avgSessionDuration'], "lrbefore"=>"", "lrafter"=>"", "lrformat"=>"seconds");
89
- $finalPlotData['pageviewsPerSession'] = array("label" => "Pageviews/Session", "data" => $plotData['pageviewsPerSession'], "lrbefore"=>"", "lrafter"=>"", "lrformat"=>"");
90
 
91
  $totalsForAllResults['sessions'] = array("total" => $this->results['totalsForAllResults']['ga:sessions'], "data" => implode(",", $plotData['sessions_sb']));
92
  $totalsForAllResults['users'] = array("total" => $this->results['totalsForAllResults']['ga:users'], "data" => implode(",", $plotData['users_sb']));
@@ -385,7 +385,7 @@ class lrgawidget{
385
  $this->output['end'] = $this->getSetting('end_date');
386
  $this->output['status'] = "done";
387
  echo json_encode($this->output, true);
388
- }else{ Common\ErrorHandler::FatalError("Fatal Error","Something went wrong .. please contact an administrator",100001,$this->errors); }
389
 
390
  exit();
391
  }
9
  * @package Google Analytics by Lara
10
  * @author Amr M. Ibrahim <mailamr@gmail.com>
11
  * @link https://www.xtraorbit.com/
12
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
13
  */
14
 
15
  if (!defined("ABSPATH"))
80
  elseif ($id === 7){$plotData['pageviewsPerSession'][] = array($row[0], $this->roundNumbers($value)); $plotData['pageviewsPerSession_sb'][] = $this->roundNumbers($value);}
81
  }
82
  }
83
+ $finalPlotData['sessions'] = array("label" => __('Sessions', 'lara-google-analytics'), "data" => $plotData['sessions'], "lrbefore"=>"", "lrafter"=>"", "lrformat"=>"");
84
+ $finalPlotData['users'] = array("label" => __('Users', 'lara-google-analytics'), "data" => $plotData['users'], "lrbefore"=>"", "lrafter"=>"", "lrformat"=>"");
85
+ $finalPlotData['pageviews'] = array("label" => __('Pageviews', 'lara-google-analytics'), "data" => $plotData['pageviews'], "lrbefore"=>"", "lrafter"=>"", "lrformat"=>"");
86
+ $finalPlotData['percentNewSessions'] = array("label" => __('% New Sessions', 'lara-google-analytics'), "data" => $plotData['percentNewSessions'], "lrbefore"=>"", "lrafter"=>"%", "lrformat"=>"");
87
+ $finalPlotData['bounceRate'] = array("label" => __('Bounce Rate', 'lara-google-analytics'), "data" => $plotData['bounceRate'], "lrbefore"=>"", "lrafter"=>"%", "lrformat"=>"");
88
+ $finalPlotData['avgSessionDuration'] = array("label" => __('Avg. Session Duration', 'lara-google-analytics'), "data" => $plotData['avgSessionDuration'], "lrbefore"=>"", "lrafter"=>"", "lrformat"=>"seconds");
89
+ $finalPlotData['pageviewsPerSession'] = array("label" => __('Pages / Session', 'lara-google-analytics'), "data" => $plotData['pageviewsPerSession'], "lrbefore"=>"", "lrafter"=>"", "lrformat"=>"");
90
 
91
  $totalsForAllResults['sessions'] = array("total" => $this->results['totalsForAllResults']['ga:sessions'], "data" => implode(",", $plotData['sessions_sb']));
92
  $totalsForAllResults['users'] = array("total" => $this->results['totalsForAllResults']['ga:users'], "data" => implode(",", $plotData['users_sb']));
385
  $this->output['end'] = $this->getSetting('end_date');
386
  $this->output['status'] = "done";
387
  echo json_encode($this->output, true);
388
+ }else{ Common\ErrorHandler::FatalError(__('Fatal Error', 'lara-google-analytics'),__('Something went wrong .. please contact an administrator', 'lara-google-analytics'),100001,$this->errors); }
389
 
390
  exit();
391
  }
core/lrgawidget.handler.php CHANGED
@@ -8,7 +8,7 @@ use Lara\Utils\Common as Common;
8
  * @package Google Analytics by Lara
9
  * @author Amr M. Ibrahim <mailamr@gmail.com>
10
  * @link https://www.xtraorbit.com/
11
- * @copyright Copyright (c) WHMCSAdminTheme 2016 - 2017
12
  */
13
 
14
  if (!defined("ABSPATH"))
@@ -35,55 +35,55 @@ if (isset($lrdata['action']) && !empty($lrperm)){
35
  switch ($lrdata['action']) {
36
  case "getAuthURL":
37
  if (in_array("lrgawidget_perm_admin", $lrperm["permissions"])){$call->getAuthURL(trim($lrdata['client_id']), trim($lrdata['client_secret']));}
38
- else{ Common\ErrorHandler::FatalError("You don't have permission to access this tab!");}
39
  break;
40
  case "getAccessToken":
41
  if (in_array("lrgawidget_perm_admin", $lrperm["permissions"])){$call->getAccessToken(trim($lrdata['client_id']), trim($lrdata['client_secret']), trim($lrdata['code']));}
42
- else{ Common\ErrorHandler::FatalError("You don't have permission to access this tab!");}
43
  break;
44
  case "getProfiles":
45
  if (in_array("lrgawidget_perm_admin", $lrperm["permissions"])){$call->getProfiles();}
46
- else{ Common\ErrorHandler::FatalError("You don't have permission to access this tab!");}
47
  break;
48
  case "setProfileID":
49
  if (in_array("lrgawidget_perm_admin", $lrperm["permissions"])){ $call->setProfileID($lrdata['account_id'],$lrdata['property_id'],$lrdata['profile_id'], $lrdata['profile_timezone'], @$lrdata['enable_universal_tracking']);}
50
- else{ Common\ErrorHandler::FatalError("You don't have permission to access this tab!");}
51
  break;
52
  case "settingsReset":
53
  if (in_array("lrgawidget_perm_admin", $lrperm["permissions"])){ $call->settingsReset();}
54
- else{ Common\ErrorHandler::FatalError("You don't have permission to reset data!");}
55
  break;
56
  case "getSessions":
57
  if (in_array("lrgawidget_perm_sessions", $lrperm["permissions"])){$call->getSessions();}
58
- else{ Common\ErrorHandler::FatalError("You don't have permission to access this tab!");}
59
  break;
60
  case "getPages":
61
  if (in_array("lrgawidget_perm_pages", $lrperm["permissions"])){$call->getPages();}
62
- else{ Common\ErrorHandler::FatalError("You don't have permission to access this tab!");}
63
  break;
64
  case "getBrowsers":
65
  if (in_array("lrgawidget_perm_browsers", $lrperm["permissions"])){$call->getBrowsers(@$lrdata['versions']);}
66
- else{ Common\ErrorHandler::FatalError("You don't have permission to access this tab!");}
67
  break;
68
  case "getLanguages":
69
  if (in_array("lrgawidget_perm_languages", $lrperm["permissions"])){$call->getLanguages();}
70
- else{ Common\ErrorHandler::FatalError("You don't have permission to access this tab!");}
71
  break;
72
  case "getOS":
73
  if (in_array("lrgawidget_perm_os", $lrperm["permissions"])){$call->getOS(@$lrdata['versions']);}
74
- else{ Common\ErrorHandler::FatalError("You don't have permission to access this tab!");}
75
  break;
76
  case "getDevices":
77
  if (in_array("lrgawidget_perm_devices", $lrperm["permissions"])){$call->getDevices(@$lrdata['versions']);}
78
- else{ Common\ErrorHandler::FatalError("You don't have permission to access this tab!");}
79
  break;
80
  case "getScreenResolution":
81
  if (in_array("lrgawidget_perm_screenres", $lrperm["permissions"])){$call->getScreenResolution();}
82
- else{ Common\ErrorHandler::FatalError("You don't have permission to access this tab!");}
83
  break;
84
  default:
85
  exit;
86
  }
87
- }else{ Common\ErrorHandler::FatalError("Fatal :: Invalid Call!");}
88
 
89
  ?>
8
  * @package Google Analytics by Lara
9
  * @author Amr M. Ibrahim <mailamr@gmail.com>
10
  * @link https://www.xtraorbit.com/
11
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
12
  */
13
 
14
  if (!defined("ABSPATH"))
35
  switch ($lrdata['action']) {
36
  case "getAuthURL":
37
  if (in_array("lrgawidget_perm_admin", $lrperm["permissions"])){$call->getAuthURL(trim($lrdata['client_id']), trim($lrdata['client_secret']));}
38
+ else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
39
  break;
40
  case "getAccessToken":
41
  if (in_array("lrgawidget_perm_admin", $lrperm["permissions"])){$call->getAccessToken(trim($lrdata['client_id']), trim($lrdata['client_secret']), trim($lrdata['code']));}
42
+ else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
43
  break;
44
  case "getProfiles":
45
  if (in_array("lrgawidget_perm_admin", $lrperm["permissions"])){$call->getProfiles();}
46
+ else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
47
  break;
48
  case "setProfileID":
49
  if (in_array("lrgawidget_perm_admin", $lrperm["permissions"])){ $call->setProfileID($lrdata['account_id'],$lrdata['property_id'],$lrdata['profile_id'], $lrdata['profile_timezone'], @$lrdata['enable_universal_tracking']);}
50
+ else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
51
  break;
52
  case "settingsReset":
53
  if (in_array("lrgawidget_perm_admin", $lrperm["permissions"])){ $call->settingsReset();}
54
+ else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
55
  break;
56
  case "getSessions":
57
  if (in_array("lrgawidget_perm_sessions", $lrperm["permissions"])){$call->getSessions();}
58
+ else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
59
  break;
60
  case "getPages":
61
  if (in_array("lrgawidget_perm_pages", $lrperm["permissions"])){$call->getPages();}
62
+ else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
63
  break;
64
  case "getBrowsers":
65
  if (in_array("lrgawidget_perm_browsers", $lrperm["permissions"])){$call->getBrowsers(@$lrdata['versions']);}
66
+ else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
67
  break;
68
  case "getLanguages":
69
  if (in_array("lrgawidget_perm_languages", $lrperm["permissions"])){$call->getLanguages();}
70
+ else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
71
  break;
72
  case "getOS":
73
  if (in_array("lrgawidget_perm_os", $lrperm["permissions"])){$call->getOS(@$lrdata['versions']);}
74
+ else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
75
  break;
76
  case "getDevices":
77
  if (in_array("lrgawidget_perm_devices", $lrperm["permissions"])){$call->getDevices(@$lrdata['versions']);}
78
+ else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
79
  break;
80
  case "getScreenResolution":
81
  if (in_array("lrgawidget_perm_screenres", $lrperm["permissions"])){$call->getScreenResolution();}
82
+ else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
83
  break;
84
  default:
85
  exit;
86
  }
87
+ }else{ Common\ErrorHandler::FatalError(__('Fatal Error', 'lara-google-analytics'),__('Invalid Call', 'lara-google-analytics'));}
88
 
89
  ?>
core/lrgawidget.permissions.php CHANGED
@@ -8,7 +8,7 @@ use Lara\Utils\Common\WPHelperFunctions as WPHelperFunctions;
8
  * @package Google Analytics by Lara
9
  * @author Amr M. Ibrahim <mailamr@gmail.com>
10
  * @link https://www.xtraorbit.com/
11
- * @copyright Copyright (c) WHMCSAdminTheme 2016 - 2017
12
  */
13
 
14
  if (!defined("ABSPATH"))
@@ -26,29 +26,29 @@ class permissions{
26
  function __construct(){
27
  $this->laraStockPermissions = array(
28
  array( "id" => "permissions",
29
- "name" => "Permissions",
30
  "icon" => "fa-key",
31
- "permissions" => array(array("name" => "lrgawidget_perm_perm", "label" => "Super Administrator [Change Permissions]"),
32
- array("name" => "lrgawidget_perm_admin", "label" => "Administrator [Change Settings]")
33
  )
34
  ),
35
  array( "id" => "tabs",
36
- "name" => "Tabs",
37
  "icon" => "fa-bar-chart",
38
- "permissions" => array(array("name" => "lrgawidget_perm_sessions", "label" => "View Sessions"),
39
- array("name" => "lrgawidget_perm_daterange","label" => "Change Date Range"),
40
- array("name" => "lrgawidget_perm_realtime", "label" => "Real Time"),
41
- array("name" => "lrgawidget_perm_countries","label" => "View Countries"),
42
- array("name" => "lrgawidget_perm_browsers", "label" => "View Browsers"),
43
- array("name" => "lrgawidget_perm_languages","label" => "View Languages"),
44
- array("name" => "lrgawidget_perm_os", "label" => "View Operating Systems"),
45
- array("name" => "lrgawidget_perm_devices", "label" => "View Devices"),
46
- array("name" => "lrgawidget_perm_screenres","label" => "View Screen Resolutions"),
47
- array("name" => "lrgawidget_perm_keywords", "label" => "View Keywords"),
48
- array("name" => "lrgawidget_perm_sources", "label" => "View Sources"),
49
- array("name" => "lrgawidget_perm_pages", "label" => "View Pages")
50
- )
51
  )
 
52
  );
53
 
54
  $this->userRoles = array("administrator");
@@ -75,7 +75,7 @@ class permissions{
75
  $return['role_permissions'][$role['id']] = array();
76
  }
77
  $this->output = $return;
78
- }else{$this->errors[] = "You don't have permission to access this page";}
79
  $this->jsonOutput();
80
  }
81
 
@@ -86,7 +86,7 @@ class permissions{
86
  echo json_encode($this->output, true);
87
  }else{
88
  if(in_array("administrator", $this->userRoles)){Common\ErrorHandler::setDebugMode(true);}
89
- Common\ErrorHandler::FatalError("Fatal Error","Couldn't get or set widget permissions .. please contact an administrator",10001,$this->errors);
90
  }
91
  exit();
92
  }
8
  * @package Google Analytics by Lara
9
  * @author Amr M. Ibrahim <mailamr@gmail.com>
10
  * @link https://www.xtraorbit.com/
11
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
12
  */
13
 
14
  if (!defined("ABSPATH"))
26
  function __construct(){
27
  $this->laraStockPermissions = array(
28
  array( "id" => "permissions",
29
+ "name" => __('Permissions', 'lara-google-analytics'),
30
  "icon" => "fa-key",
31
+ "permissions" => array(array("name" => "lrgawidget_perm_perm", "label" => __('Super Administrator [Change Permissions]', 'lara-google-analytics')),
32
+ array("name" => "lrgawidget_perm_admin", "label" => __('Administrator [Change Settings]', 'lara-google-analytics'))
33
  )
34
  ),
35
  array( "id" => "tabs",
36
+ "name" => __('Tabs', 'lara-google-analytics'),
37
  "icon" => "fa-bar-chart",
38
+ "permissions" => array(array("name" => "lrgawidget_perm_daterange","label" => __('Change Date Range', 'lara-google-analytics')),
39
+ array("name" => "lrgawidget_perm_sessions", "label" => __('Sessions', 'lara-google-analytics')),
40
+ array("name" => "lrgawidget_perm_realtime", "label" => __('Real Time', 'lara-google-analytics')),
41
+ array("name" => "lrgawidget_perm_countries","label" => __('Countries', 'lara-google-analytics')),
42
+ array("name" => "lrgawidget_perm_browsers", "label" => __('Browsers', 'lara-google-analytics')),
43
+ array("name" => "lrgawidget_perm_languages","label" => __('Languages', 'lara-google-analytics')),
44
+ array("name" => "lrgawidget_perm_os", "label" => __('Operating Systems', 'lara-google-analytics')),
45
+ array("name" => "lrgawidget_perm_devices", "label" => __('Devices', 'lara-google-analytics')),
46
+ array("name" => "lrgawidget_perm_screenres","label" => __('Screen Resolutions', 'lara-google-analytics')),
47
+ array("name" => "lrgawidget_perm_keywords", "label" => __('Keywords', 'lara-google-analytics')),
48
+ array("name" => "lrgawidget_perm_sources", "label" => __('Sources', 'lara-google-analytics')),
49
+ array("name" => "lrgawidget_perm_pages", "label" => __('Pages', 'lara-google-analytics'))
 
50
  )
51
+ )
52
  );
53
 
54
  $this->userRoles = array("administrator");
75
  $return['role_permissions'][$role['id']] = array();
76
  }
77
  $this->output = $return;
78
+ }else{$this->errors[] = __('You do not have permission to access this page', 'lara-google-analytics');}
79
  $this->jsonOutput();
80
  }
81
 
86
  echo json_encode($this->output, true);
87
  }else{
88
  if(in_array("administrator", $this->userRoles)){Common\ErrorHandler::setDebugMode(true);}
89
+ Common\ErrorHandler::FatalError(__('Fatal Error', 'lara-google-analytics'),__('Could not get or set widget permissions .. please contact an administrator', 'lara-google-analytics'),10001,$this->errors);
90
  }
91
  exit();
92
  }
core/storage.class.php CHANGED
@@ -9,7 +9,7 @@ use Lara\Utils\Common\WPHelperFunctions as WPHelperFunctions;
9
  * @package Google Analytics by Lara
10
  * @author Amr M. Ibrahim <mailamr@gmail.com>
11
  * @link https://www.xtraorbit.com/
12
- * @copyright Copyright (c) WHMCSAdminTheme 2016 - 2017
13
  */
14
 
15
  if (!defined("ABSPATH"))
@@ -30,13 +30,13 @@ class registryStore{
30
  elseif (!empty($name)){
31
  try{
32
  $exists = $wpdb->get_results( "SELECT * FROM `".lrgawidget_plugin_table."` WHERE `name` = '".$name."'",ARRAY_A );
33
- if (!empty($wpdb->last_error)){Common\ErrorHandler::FatalError("Fatal Error","DataBase Error .. please contact an administrator",10002,$wpdb->last_error);}
34
  if (!empty($exists)){
35
  $wpdb->update( lrgawidget_plugin_table, array('value' => $value), array('name' => $name));
36
- if (!empty($wpdb->last_error)){Common\ErrorHandler::FatalError("Fatal Error","DataBase Error .. please contact an administrator",10003,$wpdb->last_error);}
37
  }else{
38
  $wpdb->insert( lrgawidget_plugin_table, array( 'name' => $name, 'value' => $value));
39
- if (!empty($wpdb->last_error)){Common\ErrorHandler::FatalError("Fatal Error","DataBase Error .. please contact an administrator",10004,$wpdb->last_error);}
40
  }
41
  } catch (\Exception $e) {
42
  Common\ErrorHandler::FatalError("cannot save ".$name." returned error: ". $e->getMessage());
@@ -51,7 +51,7 @@ class registryStore{
51
  if (!empty($name)){
52
  try{
53
  $wpdb->delete( lrgawidget_plugin_table, array('name' => $name) );
54
- if (!empty($wpdb->last_error)){Common\ErrorHandler::FatalError("Fatal Error","DataBase Error .. please contact an administrator",10005,$wpdb->last_error);}
55
  } catch (\Exception $e) {
56
  Common\ErrorHandler::FatalError("cannot delete ".$name." returned error: ". $e->getMessage());
57
  }
@@ -63,7 +63,7 @@ class registryStore{
63
 
64
  $allSettings = array();
65
  $settings = $wpdb->get_results ( "SELECT `name`, `value` FROM `".lrgawidget_plugin_table."`", ARRAY_A );
66
- if (!empty($wpdb->last_error)){Common\ErrorHandler::FatalError("Fatal Error","DataBase Error .. please contact an administrator",10006,$wpdb->last_error);}
67
  if (!empty($settings)){
68
  foreach ($settings as $setting) {
69
  $allSettings[$setting['name']] = $setting['value'];
@@ -83,7 +83,7 @@ class registryStore{
83
 
84
  try{
85
  $wpdb->query("TRUNCATE TABLE `".lrgawidget_plugin_table."`");
86
- if (!empty($wpdb->last_error)){Common\ErrorHandler::FatalError("Fatal Error","DataBase Error .. please contact an administrator",10007,$wpdb->last_error);}
87
  } catch (\Exception $e) {
88
  Common\ErrorHandler::FatalError("cannot empty table, returned error: ". $e->getMessage());
89
  }
9
  * @package Google Analytics by Lara
10
  * @author Amr M. Ibrahim <mailamr@gmail.com>
11
  * @link https://www.xtraorbit.com/
12
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
13
  */
14
 
15
  if (!defined("ABSPATH"))
30
  elseif (!empty($name)){
31
  try{
32
  $exists = $wpdb->get_results( "SELECT * FROM `".lrgawidget_plugin_table."` WHERE `name` = '".$name."'",ARRAY_A );
33
+ if (!empty($wpdb->last_error)){Common\ErrorHandler::FatalError(__('Fatal Error', 'lara-google-analytics'),__('DataBase Error .. please contact an administrator', 'lara-google-analytics'),10002,$wpdb->last_error);}
34
  if (!empty($exists)){
35
  $wpdb->update( lrgawidget_plugin_table, array('value' => $value), array('name' => $name));
36
+ if (!empty($wpdb->last_error)){Common\ErrorHandler::FatalError(__('Fatal Error', 'lara-google-analytics'),__('DataBase Error .. please contact an administrator', 'lara-google-analytics'),10003,$wpdb->last_error);}
37
  }else{
38
  $wpdb->insert( lrgawidget_plugin_table, array( 'name' => $name, 'value' => $value));
39
+ if (!empty($wpdb->last_error)){Common\ErrorHandler::FatalError(__('Fatal Error', 'lara-google-analytics'),__('DataBase Error .. please contact an administrator', 'lara-google-analytics'),10004,$wpdb->last_error);}
40
  }
41
  } catch (\Exception $e) {
42
  Common\ErrorHandler::FatalError("cannot save ".$name." returned error: ". $e->getMessage());
51
  if (!empty($name)){
52
  try{
53
  $wpdb->delete( lrgawidget_plugin_table, array('name' => $name) );
54
+ if (!empty($wpdb->last_error)){Common\ErrorHandler::FatalError(__('Fatal Error', 'lara-google-analytics'),__('DataBase Error .. please contact an administrator', 'lara-google-analytics'),10005,$wpdb->last_error);}
55
  } catch (\Exception $e) {
56
  Common\ErrorHandler::FatalError("cannot delete ".$name." returned error: ". $e->getMessage());
57
  }
63
 
64
  $allSettings = array();
65
  $settings = $wpdb->get_results ( "SELECT `name`, `value` FROM `".lrgawidget_plugin_table."`", ARRAY_A );
66
+ if (!empty($wpdb->last_error)){Common\ErrorHandler::FatalError(__('Fatal Error', 'lara-google-analytics'),__('DataBase Error .. please contact an administrator', 'lara-google-analytics'),10006,$wpdb->last_error);}
67
  if (!empty($settings)){
68
  foreach ($settings as $setting) {
69
  $allSettings[$setting['name']] = $setting['value'];
83
 
84
  try{
85
  $wpdb->query("TRUNCATE TABLE `".lrgawidget_plugin_table."`");
86
+ if (!empty($wpdb->last_error)){Common\ErrorHandler::FatalError(__('Fatal Error', 'lara-google-analytics'),__('DataBase Error .. please contact an administrator', 'lara-google-analytics'),10007,$wpdb->last_error);}
87
  } catch (\Exception $e) {
88
  Common\ErrorHandler::FatalError("cannot empty table, returned error: ". $e->getMessage());
89
  }
core/wp.helper.functions.php CHANGED
@@ -6,7 +6,7 @@ namespace Lara\Utils\Common;
6
  * @package Google Analytics by Lara
7
  * @author Amr M. Ibrahim <mailamr@gmail.com>
8
  * @link https://www.xtraorbit.com/
9
- * @copyright Copyright (c) WHMCSAdminTheme 2016 - 2017
10
  */
11
 
12
  if (!defined("ABSPATH"))
@@ -142,4 +142,5 @@ class WPHelperFunctions {
142
  }
143
  }
144
  add_action('init', 'Lara\Utils\Common\WPHelperFunctions::initInstance');
 
145
  ?>
6
  * @package Google Analytics by Lara
7
  * @author Amr M. Ibrahim <mailamr@gmail.com>
8
  * @link https://www.xtraorbit.com/
9
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
10
  */
11
 
12
  if (!defined("ABSPATH"))
142
  }
143
  }
144
  add_action('init', 'Lara\Utils\Common\WPHelperFunctions::initInstance');
145
+
146
  ?>
core/wp.review.notice.php ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Lara\Utils\Common;
4
+
5
+ /**
6
+ * @package Google Analytics by Lara
7
+ * @author Amr M. Ibrahim <mailamr@gmail.com>
8
+ * @link https://www.xtraorbit.com/
9
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
10
+ */
11
+
12
+ if (!defined("ABSPATH"))
13
+ die("This file cannot be accessed directly");
14
+
15
+ class WPReviewNotice {
16
+
17
+ private static $already_rated;
18
+ private static $install_date;
19
+ private static $install_date_raw;
20
+ private static $current_date;
21
+ private static $current_date_raw;
22
+ private static $difference_in_days;
23
+
24
+ public static function update_option($option, $value){
25
+ if (!is_multisite()){
26
+ update_option($option, $value, 'yes' );
27
+ }else{
28
+ update_network_option(1, $option, $value );
29
+ }
30
+ }
31
+
32
+ public static function show_review_notice(){
33
+ if(current_user_can('update_plugins')){
34
+ self::$already_rated = get_network_option(1,lrgawidget_plugin_prefiex.'already_rated', 'no');
35
+ if (self::$already_rated == 'no'){
36
+ self::update_option(lrgawidget_plugin_prefiex.'already_rated', 'no');
37
+ self::$current_date_raw = date('Y-m-d');
38
+ self::$install_date_raw = get_network_option(1,lrgawidget_plugin_prefiex.'install_date', 'unknown');
39
+ if (self::$install_date_raw != 'unknown'){
40
+ self::$install_date = new \DateTime( self::$install_date_raw );
41
+ self::$current_date = new \DateTime( self::$current_date_raw );
42
+ self::$difference_in_days = (int)self::$install_date->diff(self::$current_date)->format("%r%a");
43
+
44
+ if (isset(self::$difference_in_days) && self::$difference_in_days >= 7) {
45
+ add_action('admin_notices','Lara\Utils\Common\WPReviewNotice::review_notice');
46
+ }
47
+
48
+ }else{
49
+ self::update_option(lrgawidget_plugin_prefiex.'install_date', self::$current_date_raw);
50
+ }
51
+ }
52
+
53
+ }
54
+ }
55
+
56
+ public static function review_response(){
57
+ if(current_user_can('update_plugins')){
58
+ if (!empty($_POST["action"]) && $_POST["action"] == "lrgawidget_review_response"){
59
+ if ($_POST['rresponse'] === "rated" || $_POST['rresponse'] === "notinterested"){
60
+ self::update_option(lrgawidget_plugin_prefiex.'already_rated', $_POST['rresponse']);
61
+ }
62
+ }
63
+ }
64
+
65
+ header('Content-Type: application/json; charset=utf-8');
66
+ $output['status'] = "done";
67
+ echo json_encode($output);
68
+ exit();
69
+ }
70
+
71
+ public static function review_notice(){
72
+
73
+ $message = __('Thank you for using <b>Lara Google Analytics</b> - WordPress plugin. We hope it has saved your valuable time and efforts!', 'lara-google-analytics');
74
+ $message .= "<br><br>".__('If you have a free moment, and want to help us spread the word and boost our motivation, please do us a BIG favour and give us 5 Stars rating on wordpress .. The more reviews we get, the more cool features we will add to the plugin :)', 'lara-google-analytics');
75
+
76
+ $btns = '<a href="https://wordpress.org/support/plugin/lara-google-analytics/reviews/" target="_blank"><button class="btn" id="rating" type="button">';
77
+ $btns .= '<span><i aria-hidden="true" class="fa fa-star"></i> <i aria-hidden="true" class="fa fa-star"></i> <i aria-hidden="true" class="fa fa-star"></i> <i aria-hidden="true" class="fa fa-star"></i> <i aria-hidden="true" class="fa fa-star"></i></span>&nbsp;&nbsp;';
78
+ $btns .= __('Let\'s do it, You deserve it', 'lara-google-analytics');
79
+ $btns .= '</button></a>';
80
+
81
+ $btns .= '<button class="btn " data-lrrateresponse="rated" type="button"><i aria-hidden="true" class="fa fa-thumbs-o-up"></i>&nbsp;&nbsp;';
82
+ $btns .= __('I already rated it', 'lara-google-analytics');
83
+ $btns .= '</button>';
84
+
85
+ $btns .= '<button class="btn " data-lrrateresponse="notinterested" type="button"><i aria-hidden="true" class="fa fa-ban"></i>&nbsp;&nbsp;';
86
+ $btns .= __('Not Interested', 'lara-google-analytics');
87
+ $btns .= '</button>';
88
+
89
+
90
+ echo '
91
+ <style>
92
+ #lrgawidget_reviews_notice {
93
+ display: table;
94
+ background-image: url("'.lrgawidget_plugin_dist_dir.'/img/xo_footer.png");
95
+ background-position: center bottom;
96
+ background-repeat: repeat-x;
97
+ background-color: #f9f9f9;
98
+ height: 150px;
99
+ padding: 10px;
100
+ }
101
+
102
+ #lrgawidget_reviews_notice .lrxologo {
103
+ display: table-cell;
104
+ background-image: url("'.lrgawidget_plugin_dist_dir.'/img/xtraorbit_logo_small.png");
105
+ background-repeat: no-repeat;
106
+ background-position: center top;
107
+ width: 400px;
108
+ height: 150px;
109
+ margin-top: 15px;
110
+ }
111
+
112
+ #lrgawidget_reviews_notice .lrnoticelogo {
113
+ display: table-cell;
114
+ vertical-align: middle;
115
+ }
116
+
117
+ #lrgawidget_reviews_notice .lrnoticemessage {
118
+ display: table-cell;
119
+ border: 25px solid transparent;
120
+ vertical-align: top;
121
+ }
122
+
123
+ #lrgawidget_reviews_notice .btn {
124
+ background-color: #272e38;
125
+ color: #FFFFFF;
126
+ border: 1px solid transparent;
127
+ cursor: pointer;
128
+ margin: 0px 10px 10px 0px;
129
+ min-height: 40px;
130
+ border-radius: 5px;
131
+ }
132
+
133
+ #lrgawidget_reviews_notice .btn:hover {
134
+ background-color: #f7981d;
135
+ }
136
+
137
+ </style>
138
+
139
+ <script type="text/javascript">
140
+ (function($) {
141
+ function lrWidgetSettings(arr){
142
+ return $.ajax({
143
+ method: "POST",
144
+ url: lrgawidget_ajax_object.lrgawidget_ajax_url,
145
+ data: arr,
146
+ dataType: "json"
147
+ });
148
+ }
149
+
150
+ $(document).ready(function(){
151
+ $("[data-lrrateresponse]").on("click", function (e) {
152
+ lrWidgetSettings({action : "lrgawidget_review_response", rresponse: $(this).data("lrrateresponse")}).done(function (data, textStatus, jqXHR) {
153
+ $("#lrgawidget_reviews_notice").slideUp("fast");
154
+ });
155
+ });
156
+ });
157
+ })(jQuery);
158
+ </script>
159
+
160
+
161
+ <div id="lrgawidget_reviews_notice" class="notice notice-info is-dismissible">
162
+ <div class="lrnoticelogo"><img src="'.lrgawidget_plugin_dist_dir.'/img/lrwidget_logo.png"></div>
163
+ <div class="lrnoticemessage">'.$message.'<br><br>'.$btns.'</div>
164
+ <a href="https://www.xtraorbit.com/wordpress-google-analytics-dashboard-widget/?utm_source=InApp&amp;utm_medium=Rate_Screen" target="_blank"><div class="lrxologo">&nbsp;</div></a>
165
+
166
+ <button type="button" class="notice-dismiss">
167
+ <span class="screen-reader-text">Dismiss this notice.</span>
168
+ </button>
169
+ </div>';
170
+ }
171
+ }
172
+
173
+ ?>
dist/css/lrgalite-main.css CHANGED
@@ -8960,6 +8960,10 @@ div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:las
8960
  content:'ON';
8961
  }
8962
 
 
 
 
 
8963
  .lrga_bs select {
8964
  max-width: initial !important;
8965
  -webkit-appearance: menulist !important;
@@ -8969,4 +8973,25 @@ div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:las
8969
 
8970
  .lrga_bs select:hover {
8971
  color: initial !important;
8972
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8960
  content:'ON';
8961
  }
8962
 
8963
+ .lrga_bs {
8964
+ /* direction: ltr; */
8965
+ }
8966
+
8967
  .lrga_bs select {
8968
  max-width: initial !important;
8969
  -webkit-appearance: menulist !important;
8973
 
8974
  .lrga_bs select:hover {
8975
  color: initial !important;
8976
+ }
8977
+
8978
+ /* RTL Testing; */
8979
+ /*
8980
+ [dir="rtl"] .lrga_bs .nav-tabs > li {
8981
+ float: right;
8982
+ margin-bottom: -1px;
8983
+ }
8984
+
8985
+ [dir="rtl"] .lrgawidget .box-header > .box-tools {
8986
+ float: left !important;
8987
+ position: static;
8988
+ }
8989
+
8990
+ [dir="rtl"] .lrga_bs .table th {
8991
+ text-align: right !important;
8992
+ }
8993
+
8994
+ [dir="rtl"] .lrga_bs .col-md-6 {
8995
+ float: right;
8996
+ }
8997
+ */
dist/css/lrgawidget.css CHANGED
@@ -1974,6 +1974,10 @@
1974
  content:'ON';
1975
  }
1976
 
 
 
 
 
1977
  .lrga_bs select {
1978
  max-width: initial !important;
1979
  -webkit-appearance: menulist !important;
@@ -1983,4 +1987,25 @@
1983
 
1984
  .lrga_bs select:hover {
1985
  color: initial !important;
1986
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1974
  content:'ON';
1975
  }
1976
 
1977
+ .lrga_bs {
1978
+ /* direction: ltr; */
1979
+ }
1980
+
1981
  .lrga_bs select {
1982
  max-width: initial !important;
1983
  -webkit-appearance: menulist !important;
1987
 
1988
  .lrga_bs select:hover {
1989
  color: initial !important;
1990
+ }
1991
+
1992
+ /* RTL Testing; */
1993
+ /*
1994
+ [dir="rtl"] .lrga_bs .nav-tabs > li {
1995
+ float: right;
1996
+ margin-bottom: -1px;
1997
+ }
1998
+
1999
+ [dir="rtl"] .lrgawidget .box-header > .box-tools {
2000
+ float: left !important;
2001
+ position: static;
2002
+ }
2003
+
2004
+ [dir="rtl"] .lrga_bs .table th {
2005
+ text-align: right !important;
2006
+ }
2007
+
2008
+ [dir="rtl"] .lrga_bs .col-md-6 {
2009
+ float: right;
2010
+ }
2011
+ */
dist/img/lrwidget_logo.png ADDED
Binary file
dist/img/xtraorbit_logo_small.png ADDED
Binary file
dist/js/lrgalite-main.js CHANGED
@@ -283,7 +283,7 @@ l=0;for(h=f.length;l<h;l++)if(c=f[l],b.isArray(c))q(d,c);else{g=e="";switch(c){c
283
  * @package Google Analytics by Lara
284
  * @author Amr M. Ibrahim <mailamr@gmail.com>
285
  * @link https://www.xtraorbit.com/
286
- * @copyright Copyright (c) WHMCSAdminTheme 2016 - 2017
287
  */
288
 
289
  window.gauthWindow = function (url) {
@@ -386,12 +386,12 @@ function lrWidgetSettings(arr){
386
  if ($("#lrgawidget a[data-target='#lrgawidget_settings_tab']").is(":visible")){
387
  $("#lrgawidget a[data-target='#lrgawidget_settings_tab']").tab('show');
388
  }else{
389
- lrgaErrorHandler("Initial Setup Required!<br><br>Please contact an administratior to complete the widget setup.");
390
  }
391
  }
392
 
393
  if (data.status == "done"){
394
- if (data.cached){ $("#lrgawidget_mode").attr( "class", "label label-success").html('cached');}
395
  if (data.system_timezone){ systemTimeZone = data.system_timezone;}
396
  if (data.gaview_timezone){ gaViewTimeZone = data.gaview_timezone;}
397
  }
@@ -706,6 +706,10 @@ var dataTableDefaults = { "paging": true,
706
  "columnDefs": [{ "width": "60%", "targets": 0 }],
707
  "order": [[ 1, "desc" ]]};
708
 
 
 
 
 
709
  function getIcon (name, icons){
710
  var sname = name.toLowerCase();
711
  if ( icons[sname] ){
@@ -984,11 +988,15 @@ $(document).ready(function(){
984
  $('#lrgawidget a[data-target="#lrgawidget_gopro_tab"]').tab('show');
985
  });
986
 
987
- dateRange = {start : moment().subtract(29, 'days').format('YYYY-MM-DD'), end : moment().format('YYYY-MM-DD')};
 
 
 
 
988
 
989
  $('#lrgawidget_reportrange').html(moment(dateRange.start).format('MMMM D, YYYY') + ' - ' + moment(dateRange.end).format('MMMM D, YYYY'));
990
  $("[data-lrgawidget-reset]").on('click', function () {
991
- if (confirm("All saved authentication data will be removed.\nDo you want to continue ?!") == true) {
992
  lrWidgetSettings({action : "settingsReset"}).done(function (data, textStatus, jqXHR) {
993
  if (data.status == "done"){
994
  $('#lrga-wizard').wizard('selectedItem', {step: 1});
283
  * @package Google Analytics by Lara
284
  * @author Amr M. Ibrahim <mailamr@gmail.com>
285
  * @link https://www.xtraorbit.com/
286
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
287
  */
288
 
289
  window.gauthWindow = function (url) {
386
  if ($("#lrgawidget a[data-target='#lrgawidget_settings_tab']").is(":visible")){
387
  $("#lrgawidget a[data-target='#lrgawidget_settings_tab']").tab('show');
388
  }else{
389
+ lrgaErrorHandler(lrwidgetenLang.setuprequired);
390
  }
391
  }
392
 
393
  if (data.status == "done"){
394
+ if (data.cached){ $("#lrgawidget_mode").attr( "class", "label label-success").html(lrwidgetenLang.cached);}
395
  if (data.system_timezone){ systemTimeZone = data.system_timezone;}
396
  if (data.gaview_timezone){ gaViewTimeZone = data.gaview_timezone;}
397
  }
706
  "columnDefs": [{ "width": "60%", "targets": 0 }],
707
  "order": [[ 1, "desc" ]]};
708
 
709
+ if (typeof lrdataTableLang !== 'undefined'){
710
+ dataTableDefaults.language = lrdataTableLang;
711
+ }
712
+
713
  function getIcon (name, icons){
714
  var sname = name.toLowerCase();
715
  if ( icons[sname] ){
988
  $('#lrgawidget a[data-target="#lrgawidget_gopro_tab"]').tab('show');
989
  });
990
 
991
+ moment.updateLocale('en', {
992
+ months : lrwidgetDateLang.monthNames
993
+ });
994
+
995
+ dateRange = {locale: lrwidgetDateLang, start : moment().subtract(29, 'days').format('YYYY-MM-DD'), end : moment().format('YYYY-MM-DD')};
996
 
997
  $('#lrgawidget_reportrange').html(moment(dateRange.start).format('MMMM D, YYYY') + ' - ' + moment(dateRange.end).format('MMMM D, YYYY'));
998
  $("[data-lrgawidget-reset]").on('click', function () {
999
+ if (confirm(lrwidgetenLang.resetmsg) == true) {
1000
  lrWidgetSettings({action : "settingsReset"}).done(function (data, textStatus, jqXHR) {
1001
  if (data.status == "done"){
1002
  $('#lrga-wizard').wizard('selectedItem', {step: 1});
dist/js/lrgawidget.js CHANGED
@@ -3,7 +3,7 @@
3
  * @package Google Analytics by Lara
4
  * @author Amr M. Ibrahim <mailamr@gmail.com>
5
  * @link https://www.xtraorbit.com/
6
- * @copyright Copyright (c) WHMCSAdminTheme 2016 - 2017
7
  */
8
 
9
  window.gauthWindow = function (url) {
@@ -106,12 +106,12 @@ function lrWidgetSettings(arr){
106
  if ($("#lrgawidget a[data-target='#lrgawidget_settings_tab']").is(":visible")){
107
  $("#lrgawidget a[data-target='#lrgawidget_settings_tab']").tab('show');
108
  }else{
109
- lrgaErrorHandler("Initial Setup Required!<br><br>Please contact an administratior to complete the widget setup.");
110
  }
111
  }
112
 
113
  if (data.status == "done"){
114
- if (data.cached){ $("#lrgawidget_mode").attr( "class", "label label-success").html('cached');}
115
  if (data.system_timezone){ systemTimeZone = data.system_timezone;}
116
  if (data.gaview_timezone){ gaViewTimeZone = data.gaview_timezone;}
117
  }
@@ -426,6 +426,10 @@ var dataTableDefaults = { "paging": true,
426
  "columnDefs": [{ "width": "60%", "targets": 0 }],
427
  "order": [[ 1, "desc" ]]};
428
 
 
 
 
 
429
  function getIcon (name, icons){
430
  var sname = name.toLowerCase();
431
  if ( icons[sname] ){
@@ -704,11 +708,15 @@ $(document).ready(function(){
704
  $('#lrgawidget a[data-target="#lrgawidget_gopro_tab"]').tab('show');
705
  });
706
 
707
- dateRange = {start : moment().subtract(29, 'days').format('YYYY-MM-DD'), end : moment().format('YYYY-MM-DD')};
 
 
 
 
708
 
709
  $('#lrgawidget_reportrange').html(moment(dateRange.start).format('MMMM D, YYYY') + ' - ' + moment(dateRange.end).format('MMMM D, YYYY'));
710
  $("[data-lrgawidget-reset]").on('click', function () {
711
- if (confirm("All saved authentication data will be removed.\nDo you want to continue ?!") == true) {
712
  lrWidgetSettings({action : "settingsReset"}).done(function (data, textStatus, jqXHR) {
713
  if (data.status == "done"){
714
  $('#lrga-wizard').wizard('selectedItem', {step: 1});
3
  * @package Google Analytics by Lara
4
  * @author Amr M. Ibrahim <mailamr@gmail.com>
5
  * @link https://www.xtraorbit.com/
6
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
7
  */
8
 
9
  window.gauthWindow = function (url) {
106
  if ($("#lrgawidget a[data-target='#lrgawidget_settings_tab']").is(":visible")){
107
  $("#lrgawidget a[data-target='#lrgawidget_settings_tab']").tab('show');
108
  }else{
109
+ lrgaErrorHandler(lrwidgetenLang.setuprequired);
110
  }
111
  }
112
 
113
  if (data.status == "done"){
114
+ if (data.cached){ $("#lrgawidget_mode").attr( "class", "label label-success").html(lrwidgetenLang.cached);}
115
  if (data.system_timezone){ systemTimeZone = data.system_timezone;}
116
  if (data.gaview_timezone){ gaViewTimeZone = data.gaview_timezone;}
117
  }
426
  "columnDefs": [{ "width": "60%", "targets": 0 }],
427
  "order": [[ 1, "desc" ]]};
428
 
429
+ if (typeof lrdataTableLang !== 'undefined'){
430
+ dataTableDefaults.language = lrdataTableLang;
431
+ }
432
+
433
  function getIcon (name, icons){
434
  var sname = name.toLowerCase();
435
  if ( icons[sname] ){
708
  $('#lrgawidget a[data-target="#lrgawidget_gopro_tab"]').tab('show');
709
  });
710
 
711
+ moment.updateLocale('en', {
712
+ months : lrwidgetDateLang.monthNames
713
+ });
714
+
715
+ dateRange = {locale: lrwidgetDateLang, start : moment().subtract(29, 'days').format('YYYY-MM-DD'), end : moment().format('YYYY-MM-DD')};
716
 
717
  $('#lrgawidget_reportrange').html(moment(dateRange.start).format('MMMM D, YYYY') + ' - ' + moment(dateRange.end).format('MMMM D, YYYY'));
718
  $("[data-lrgawidget-reset]").on('click', function () {
719
+ if (confirm(lrwidgetenLang.resetmsg) == true) {
720
  lrWidgetSettings({action : "settingsReset"}).done(function (data, textStatus, jqXHR) {
721
  if (data.status == "done"){
722
  $('#lrga-wizard').wizard('selectedItem', {step: 1});
dist/js/lrgawidget_control.js CHANGED
@@ -3,7 +3,7 @@
3
  * @package Google Analytics by Lara
4
  * @author Amr M. Ibrahim <mailamr@gmail.com>
5
  * @link https://www.xtraorbit.com/
6
- * @copyright Copyright (c) WHMCSAdminTheme 2016 - 2017
7
  */
8
 
9
  (function($) {
3
  * @package Google Analytics by Lara
4
  * @author Amr M. Ibrahim <mailamr@gmail.com>
5
  * @link https://www.xtraorbit.com/
6
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
7
  */
8
 
9
  (function($) {
languages/lara-google-analytics.pot ADDED
@@ -0,0 +1,926 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Project-Id-Version: Lara Google Analytics\n"
5
+ "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2020-01-26 12:34+0000\n"
7
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
+ "Language-Team: \n"
10
+ "Language: \n"
11
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Loco https://localise.biz/\n"
16
+ "X-Loco-Version: 2.3.1; wp-5.3.2"
17
+
18
+ #: core/lrgawidget.class.php:86 widgets/lrgawidget.php:394
19
+ msgid "% New Sessions"
20
+ msgstr ""
21
+
22
+ #: widgets/lrgawidget.php:854
23
+ msgid "(filtered from _MAX_ total entries)"
24
+ msgstr ""
25
+
26
+ #: widgets/lrgawidget.php:75
27
+ msgid "1"
28
+ msgstr ""
29
+
30
+ #: widgets/lrgawidget.php:771
31
+ msgid "12 Months of Free Updates and Support"
32
+ msgstr ""
33
+
34
+ #: widgets/lrgawidget.php:76
35
+ msgid "2"
36
+ msgstr ""
37
+
38
+ #: widgets/lrgawidget.php:77
39
+ msgid "3"
40
+ msgstr ""
41
+
42
+ #: widgets/lrgawidget.php:869
43
+ msgid ": activate to sort column ascending"
44
+ msgstr ""
45
+
46
+ #: widgets/lrgawidget.php:870
47
+ msgid ": activate to sort column descending"
48
+ msgstr ""
49
+
50
+ #: widgets/lrgawidget.php:575
51
+ msgid ""
52
+ "<b>Position</b> is the average ranking of your website URLs for that query "
53
+ "or keyword, on Google search results."
54
+ msgstr ""
55
+
56
+ #: widgets/lrgawidget.php:804
57
+ msgid ""
58
+ "<b>XtraOrbit</b> has been providing a wide range of services <b>since "
59
+ "2002</b>, including <b>Web Hosting</b>, <b>Domain Names</b> & <b>Web "
60
+ "Development</b>."
61
+ msgstr ""
62
+
63
+ #: widgets/lrgawidget.php:121 widgets/lrgawidget.php:210
64
+ msgid "Access Code"
65
+ msgstr ""
66
+
67
+ #: widgets/lrgawidget.php:245
68
+ msgid "Account"
69
+ msgstr ""
70
+
71
+ #: widgets/lrgawidget.php:277
72
+ msgid "Account Name"
73
+ msgstr ""
74
+
75
+ #: widgets/lrgawidget.php:430
76
+ msgid "active users on site"
77
+ msgstr ""
78
+
79
+ #: widgets/lrgawidget.php:267
80
+ msgid "Add <b>Google Universal Analytics</b> tracking code to all pages."
81
+ msgstr ""
82
+
83
+ #: core/lrgawidget.permissions.php:32
84
+ msgid "Administrator [Change Settings]"
85
+ msgstr ""
86
+
87
+ #: widgets/lrgawidget.php:143
88
+ msgid "Advanced Setup"
89
+ msgstr ""
90
+
91
+ #: widgets/lrgawidget.php:302
92
+ msgid ""
93
+ "After adding your website to <b>Google Search Console</b> and verifying "
94
+ "ownership, clich <b>Reload</b>, to reload the <b>Search Console Property "
95
+ "URL</b> menu."
96
+ msgstr ""
97
+
98
+ #: widgets/lrgawidget.php:873
99
+ msgid ""
100
+ "All saved authentication data will be removed. Do you want to continue ?!"
101
+ msgstr ""
102
+
103
+ #. Author of the plugin
104
+ msgid "Amr M. Ibrahim"
105
+ msgstr ""
106
+
107
+ #: widgets/lrgawidget.php:890
108
+ msgid "Apply"
109
+ msgstr ""
110
+
111
+ #: widgets/lrgawidget.php:909
112
+ msgid "April"
113
+ msgstr ""
114
+
115
+ #: widgets/lrgawidget.php:913
116
+ msgid "August"
117
+ msgstr ""
118
+
119
+ #: widgets/lrgawidget.php:76
120
+ msgid "Authorize APP"
121
+ msgstr ""
122
+
123
+ #: widgets/lrgawidget.php:223
124
+ msgid "Authorize App"
125
+ msgstr ""
126
+
127
+ #: core/lrgawidget.class.php:88 widgets/lrgawidget.php:380
128
+ msgid "Avg. Session Duration"
129
+ msgstr ""
130
+
131
+ #: widgets/lrgawidget.php:229
132
+ msgid ""
133
+ "Be sure to use the same email account that is linked to your <b>Google "
134
+ "Analytics</b> and <b>Google Search Console</b> (formerly, Google Webmaster "
135
+ "tools)."
136
+ msgstr ""
137
+
138
+ #: core/lrgawidget.class.php:87 widgets/lrgawidget.php:387
139
+ msgid "Bounce Rate"
140
+ msgstr ""
141
+
142
+ #: widgets/lrgawidget.php:472
143
+ msgid "Browser"
144
+ msgstr ""
145
+
146
+ #: core/lrgawidget.permissions.php:42 widgets/lrgawidget.php:36
147
+ msgid "Browsers"
148
+ msgstr ""
149
+
150
+ #: widgets/lrgawidget.php:755
151
+ msgid "Browsers versions (IE 6, IE 7 .. etc.)."
152
+ msgstr ""
153
+
154
+ #: widgets/lrgawidget.php:791
155
+ msgid "Buy Now"
156
+ msgstr ""
157
+
158
+ #: widgets/lrgawidget.php:731
159
+ msgid "Buy the Premium version and get access to these amazing features"
160
+ msgstr ""
161
+
162
+ #: widgets/lrgawidget.php:146
163
+ msgid ""
164
+ "By clicking on <b>Start Advanced Setup</b> button below, The setup wizard "
165
+ "will guide you through creating and/or configuring your own Google "
166
+ "Application."
167
+ msgstr ""
168
+
169
+ #: widgets/lrgawidget.php:881
170
+ msgid "cached"
171
+ msgstr ""
172
+
173
+ #: widgets/lrgawidget.php:891
174
+ msgid "Cancel"
175
+ msgstr ""
176
+
177
+ #: core/lrgawidget.permissions.php:38
178
+ msgid "Change Date Range"
179
+ msgstr ""
180
+
181
+ #: widgets/lrgawidget.php:765
182
+ msgid "Check any Date Range, not just the last 30 days"
183
+ msgstr ""
184
+
185
+ #: widgets/lrgawidget.php:778
186
+ msgid ""
187
+ "Check the<strong> Demo</strong> to see exactly how the premium version looks "
188
+ "like, and what you will get from it without leaving your wordpress dashboard"
189
+ msgstr ""
190
+
191
+ #: widgets/lrgawidget.php:108 widgets/lrgawidget.php:230
192
+ msgid ""
193
+ "Click <b>Allow</b>, then copy and paste the access code here, and click <b>"
194
+ "Submit</b>."
195
+ msgstr ""
196
+
197
+ #: widgets/lrgawidget.php:193
198
+ msgid "Click <b>Analytics API</b>, then click <b>Enable API</b>."
199
+ msgstr ""
200
+
201
+ #: widgets/lrgawidget.php:189
202
+ msgid ""
203
+ "Click on <b>Configure consent screen</b> and enter <b>Lara, The Google "
204
+ "Analytics Widget</b> as the <b>Product Name</b>, then click <b>Save</b>."
205
+ msgstr ""
206
+
207
+ #: widgets/lrgawidget.php:103
208
+ msgid ""
209
+ "Click on <b>Get Access Code</b> button below, and a pop-up window will open, "
210
+ "asking you to allow <b>Lara, The Google Analytics Widget</b> to access the "
211
+ "following:"
212
+ msgstr ""
213
+
214
+ #: widgets/lrgawidget.php:224
215
+ msgid ""
216
+ "Click on <b>Get Access Code</b> button below, and a pop-up window will open, "
217
+ "asking you to allow the <u>app you just created</u> to :"
218
+ msgstr ""
219
+
220
+ #: widgets/lrgawidget.php:186
221
+ msgid ""
222
+ "Click on <b>Select a project</b> drop-down, and choose <b>Create a new "
223
+ "project</b>."
224
+ msgstr ""
225
+
226
+ #: widgets/lrgawidget.php:569
227
+ msgid "Clicks"
228
+ msgstr ""
229
+
230
+ #: widgets/lrgawidget.php:160
231
+ msgid "Client ID"
232
+ msgstr ""
233
+
234
+ #: widgets/lrgawidget.php:168
235
+ msgid "Client Secret"
236
+ msgstr ""
237
+
238
+ #: widgets/lrgawidget.php:807
239
+ msgid "Come, check us out!"
240
+ msgstr ""
241
+
242
+ #: core/lrgawidget.permissions.php:89
243
+ msgid ""
244
+ "Could not get or set widget permissions .. please contact an administrator"
245
+ msgstr ""
246
+
247
+ #: core/lrgawidget.permissions.php:41 widgets/lrgawidget.php:33
248
+ msgid "Countries"
249
+ msgstr ""
250
+
251
+ #: widgets/lrgawidget.php:453
252
+ msgid "Country"
253
+ msgstr ""
254
+
255
+ #: widgets/lrgawidget.php:75 widgets/lrgawidget.php:181
256
+ msgid "Create Google APP"
257
+ msgstr ""
258
+
259
+ #: widgets/lrgawidget.php:569
260
+ msgid "CTR"
261
+ msgstr ""
262
+
263
+ #: core/callURL.class.php:91
264
+ msgid ""
265
+ "cURL is not installed/enabled on your server. Please contact your server "
266
+ "administrator or hosting provider for assistance with installing/enabling "
267
+ "cURL extension for PHP."
268
+ msgstr ""
269
+
270
+ #: widgets/lrgawidget.php:894
271
+ msgid "Custom Range"
272
+ msgstr ""
273
+
274
+ #: core/storage.class.php:33 core/storage.class.php:36
275
+ #: core/storage.class.php:39 core/storage.class.php:54
276
+ #: core/storage.class.php:66 core/storage.class.php:86
277
+ msgid "DataBase Error .. please contact an administrator"
278
+ msgstr ""
279
+
280
+ #: widgets/lrgawidget.php:917
281
+ msgid "December"
282
+ msgstr ""
283
+
284
+ #: widgets/lrgawidget.php:531
285
+ msgid "Device Type"
286
+ msgstr ""
287
+
288
+ #: widgets/lrgawidget.php:757
289
+ msgid "Device Types and brands (Samsung, Apple .. etc.)."
290
+ msgstr ""
291
+
292
+ #: core/lrgawidget.permissions.php:45 widgets/lrgawidget.php:45
293
+ msgid "Devices"
294
+ msgstr ""
295
+
296
+ #: widgets/lrgawidget.php:187
297
+ msgid "Enter <b>Lara</b> as the <b>Project name</b>, then click <b>Create</b>."
298
+ msgstr ""
299
+
300
+ #: widgets/lrgawidget.php:100
301
+ msgid "Express Setup"
302
+ msgstr ""
303
+
304
+ #: core/callURL.class.php:91 core/lrgawidget.class.php:388
305
+ #: core/lrgawidget.handler.php:87 core/lrgawidget.permissions.php:89
306
+ #: core/storage.class.php:33 core/storage.class.php:36
307
+ #: core/storage.class.php:39 core/storage.class.php:54
308
+ #: core/storage.class.php:66 core/storage.class.php:86
309
+ msgid "Fatal Error"
310
+ msgstr ""
311
+
312
+ #: widgets/lrgawidget.php:907
313
+ msgid "February"
314
+ msgstr ""
315
+
316
+ #: widgets/lrgawidget.php:863
317
+ msgid "First"
318
+ msgstr ""
319
+
320
+ #: widgets/lrgawidget.php:902
321
+ msgid "Fr"
322
+ msgstr ""
323
+
324
+ #: widgets/lrgawidget.php:892
325
+ msgid "From"
326
+ msgstr ""
327
+
328
+ #. Description of the plugin
329
+ msgid ""
330
+ "Full width Google Analytics dashboard widget for Wordpress admin interface, "
331
+ "which also inserts latest Google Analytics tracking code to your pages."
332
+ msgstr ""
333
+
334
+ #: widgets/lrgawidget.php:112 widgets/lrgawidget.php:233
335
+ msgid "Get Access Code"
336
+ msgstr ""
337
+
338
+ #: widgets/lrgawidget.php:87
339
+ msgid "Go Back to Express Setup"
340
+ msgstr ""
341
+
342
+ #: widgets/lrgawidget.php:57 widgets/lrgawidget.php:730
343
+ msgid "Go Premium !"
344
+ msgstr ""
345
+
346
+ #: widgets/lrgawidget.php:7
347
+ msgid "Google Analytics"
348
+ msgstr ""
349
+
350
+ #: core/GoogleAnalyticsAPI.class.php:87 core/GoogleAnalyticsAPI.class.php:99
351
+ msgid ""
352
+ "Google Replied with unexpected replay, enable debugging to check the reply"
353
+ msgstr ""
354
+
355
+ #: widgets/lrgawidget.php:827
356
+ msgid "Help & Support"
357
+ msgstr ""
358
+
359
+ #. Author URI of the plugin
360
+ msgid "https://www.xtraorbit.com/"
361
+ msgstr ""
362
+
363
+ #. URI of the plugin
364
+ msgid "https://www.xtraorbit.com/wordpress-google-analytics-dashboard-widget/"
365
+ msgstr ""
366
+
367
+ #: core/wp.review.notice.php:82
368
+ msgid "I already rated it"
369
+ msgstr ""
370
+
371
+ #: widgets/lrgawidget.php:410 widgets/lrgawidget.php:438
372
+ #: widgets/lrgawidget.php:472 widgets/lrgawidget.php:492
373
+ #: widgets/lrgawidget.php:512 widgets/lrgawidget.php:531
374
+ #: widgets/lrgawidget.php:550 widgets/lrgawidget.php:569
375
+ #: widgets/lrgawidget.php:594
376
+ msgid "ID"
377
+ msgstr ""
378
+
379
+ #: widgets/lrgawidget.php:828
380
+ msgid ""
381
+ "If you are facing any issues, need support or have a new feature request, "
382
+ "visit the official plugin support forum, where you will be able to submit a "
383
+ "support ticket."
384
+ msgstr ""
385
+
386
+ #: widgets/lrgawidget.php:110
387
+ msgid ""
388
+ "If you are using the <b>premium</b> version of the plugin, that email "
389
+ "account should also be linked to your <b>Google Search Console</b>."
390
+ msgstr ""
391
+
392
+ #: widgets/lrgawidget.php:301
393
+ msgid ""
394
+ "If you cannot find your website, please go to <a href=\"https://www.google."
395
+ "com/webmasters/tools/\" target=\"_blank\">Google Search Console</a> and "
396
+ "click on <b>Add a property</b>, to add your website."
397
+ msgstr ""
398
+
399
+ #: core/wp.review.notice.php:74 widgets/lrgawidget.php:818
400
+ msgid ""
401
+ "If you have a free moment, and want to help us spread the word and boost our "
402
+ "motivation, please do us a BIG favour and give us 5 Stars rating on "
403
+ "wordpress .. The more reviews we get, the more cool features we will add to "
404
+ "the plugin :)"
405
+ msgstr ""
406
+
407
+ #: widgets/lrgawidget.php:147
408
+ msgid ""
409
+ "If you want a quick start, or just trying the widget, use the <b>Express "
410
+ "Setup</b> on the left."
411
+ msgstr ""
412
+
413
+ #: widgets/lrgawidget.php:109
414
+ msgid ""
415
+ "If you were asked to login, be sure to use the same email account that is "
416
+ "linked to your <b>Google Analytics</b>."
417
+ msgstr ""
418
+
419
+ #: widgets/lrgawidget.php:569
420
+ msgid "Impressions"
421
+ msgstr ""
422
+
423
+ #: widgets/lrgawidget.php:883
424
+ msgid "inactive"
425
+ msgstr ""
426
+
427
+ #: widgets/lrgawidget.php:874
428
+ msgid ""
429
+ "Initial Setup Required! - Please contact an administratior to complete the "
430
+ "widget setup."
431
+ msgstr ""
432
+
433
+ #: core/lrgawidget.handler.php:87
434
+ msgid "Invalid Call"
435
+ msgstr ""
436
+
437
+ #: core/GoogleAnalyticsAPI.class.php:131
438
+ msgid "Invalid Property"
439
+ msgstr ""
440
+
441
+ #: core/GoogleAnalyticsAPI.class.php:87 core/GoogleAnalyticsAPI.class.php:99
442
+ msgid "Invalid Reply"
443
+ msgstr ""
444
+
445
+ #: widgets/lrgawidget.php:906
446
+ msgid "January"
447
+ msgstr ""
448
+
449
+ #: widgets/lrgawidget.php:912
450
+ msgid "July"
451
+ msgstr ""
452
+
453
+ #: widgets/lrgawidget.php:911
454
+ msgid "June"
455
+ msgstr ""
456
+
457
+ #: widgets/lrgawidget.php:569
458
+ msgid "Keyword"
459
+ msgstr ""
460
+
461
+ #: core/lrgawidget.permissions.php:47 widgets/lrgawidget.php:51
462
+ msgid "Keywords"
463
+ msgstr ""
464
+
465
+ #: widgets/lrgawidget.php:747
466
+ msgid "Keywords ( provided by Google Search Console)."
467
+ msgstr ""
468
+
469
+ #: widgets/lrgawidget.php:492
470
+ msgid "Language"
471
+ msgstr ""
472
+
473
+ #: core/lrgawidget.permissions.php:43 widgets/lrgawidget.php:39
474
+ msgid "Languages"
475
+ msgstr ""
476
+
477
+ #. Name of the plugin
478
+ msgid "Lara's Google Analytics"
479
+ msgstr ""
480
+
481
+ #: widgets/lrgawidget.php:864
482
+ msgid "Last"
483
+ msgstr ""
484
+
485
+ #: widgets/lrgawidget.php:878
486
+ msgid "Last 30 Days"
487
+ msgstr ""
488
+
489
+ #: widgets/lrgawidget.php:877
490
+ msgid "Last 7 Days"
491
+ msgstr ""
492
+
493
+ #: widgets/lrgawidget.php:880
494
+ msgid "Last Month"
495
+ msgstr ""
496
+
497
+ #: widgets/lrgawidget.php:781
498
+ msgid "Launch Demo"
499
+ msgstr ""
500
+
501
+ #: core/wp.review.notice.php:78 widgets/lrgawidget.php:820
502
+ msgid "Let's do it, You deserve it"
503
+ msgstr ""
504
+
505
+ #: widgets/lrgawidget.php:858
506
+ msgid "Loading..."
507
+ msgstr ""
508
+
509
+ #: widgets/lrgawidget.php:908
510
+ msgid "March"
511
+ msgstr ""
512
+
513
+ #: widgets/lrgawidget.php:910
514
+ msgid "May"
515
+ msgstr ""
516
+
517
+ #: core/GoogleAnalyticsAPI.class.php:45
518
+ msgid ""
519
+ "Missing Search Console Property URL - Please use the <b>Settings</b> tab to "
520
+ "choose a valid <b>Search Console Property URL</b>."
521
+ msgstr ""
522
+
523
+ #: widgets/lrgawidget.php:898
524
+ msgid "Mo"
525
+ msgstr ""
526
+
527
+ #: widgets/lrgawidget.php:740
528
+ msgid ""
529
+ "Multisite Multi-Network enabled : </b>Every blog/site in your network can "
530
+ "has its own analytics tracking code and dashboard widget."
531
+ msgstr ""
532
+
533
+ #: widgets/lrgawidget.php:865
534
+ msgid "Next"
535
+ msgstr ""
536
+
537
+ #: widgets/lrgawidget.php:885
538
+ msgid "No active users"
539
+ msgstr ""
540
+
541
+ #: widgets/lrgawidget.php:851
542
+ msgid "No data available in table"
543
+ msgstr ""
544
+
545
+ #: widgets/lrgawidget.php:876
546
+ msgid ""
547
+ "No data available in table. <span class='pull-left'><ul><li>Did you <a "
548
+ "href='https://support.google.com/webmasters/answer/34592?hl=en' "
549
+ "target='_blank'>add your website to Google Search Console</a> ?</li><li>"
550
+ "After adding your website to Google Search Console, did you save it as the "
551
+ "<b>Search Console Property URL</b> in the widget <b>Settings</b> tab ?</li>"
552
+ "<li>If you have added your website recently, keywords may take some time to "
553
+ "appear.</li></ul></span>"
554
+ msgstr ""
555
+
556
+ #: widgets/lrgawidget.php:861
557
+ msgid "No matching records found"
558
+ msgstr ""
559
+
560
+ #: core/wp.review.notice.php:86
561
+ msgid "Not Interested"
562
+ msgstr ""
563
+
564
+ #: widgets/lrgawidget.php:916
565
+ msgid "November"
566
+ msgstr ""
567
+
568
+ #: widgets/lrgawidget.php:915
569
+ msgid "October"
570
+ msgstr ""
571
+
572
+ #: widgets/lrgawidget.php:192
573
+ msgid ""
574
+ "Open <b>Google Developers Console</b> menu, by clicking on \" <i class=\"fa "
575
+ "fa-bars\"></i> \" and select <b>API Manager</b>."
576
+ msgstr ""
577
+
578
+ #: widgets/lrgawidget.php:185
579
+ msgid ""
580
+ "Open the <a target=\"_blank\" href=\"//console.developers.google."
581
+ "com/apis/credentials?project=_\">Google Developers Console</a>."
582
+ msgstr ""
583
+
584
+ #: widgets/lrgawidget.php:512
585
+ msgid "Operating System"
586
+ msgstr ""
587
+
588
+ #: core/lrgawidget.permissions.php:44 widgets/lrgawidget.php:42
589
+ msgid "Operating Systems"
590
+ msgstr ""
591
+
592
+ #: widgets/lrgawidget.php:756
593
+ msgid "Operating Systems versions (Windows 7, Windows 8 .. etc.)."
594
+ msgstr ""
595
+
596
+ #: widgets/lrgawidget.php:410 widgets/lrgawidget.php:438
597
+ msgid "Page"
598
+ msgstr ""
599
+
600
+ #: core/lrgawidget.permissions.php:49 widgets/lrgawidget.php:27
601
+ msgid "Pages"
602
+ msgstr ""
603
+
604
+ #: core/lrgawidget.class.php:89 widgets/lrgawidget.php:373
605
+ msgid "Pages / Session"
606
+ msgstr ""
607
+
608
+ #: core/lrgawidget.class.php:85 widgets/lrgawidget.php:366
609
+ #: widgets/lrgawidget.php:410 widgets/lrgawidget.php:438
610
+ msgid "Pageviews"
611
+ msgstr ""
612
+
613
+ #: widgets/lrgawidget.php:410 widgets/lrgawidget.php:438
614
+ #: widgets/lrgawidget.php:453 widgets/lrgawidget.php:472
615
+ #: widgets/lrgawidget.php:492 widgets/lrgawidget.php:512
616
+ #: widgets/lrgawidget.php:531 widgets/lrgawidget.php:550
617
+ #: widgets/lrgawidget.php:594
618
+ msgid "Percentage"
619
+ msgstr ""
620
+
621
+ #: core/lrgawidget.permissions.php:29
622
+ msgid "Permissions"
623
+ msgstr ""
624
+
625
+ #: widgets/lrgawidget.php:741
626
+ msgid ""
627
+ "Permissions : </b>Easily control which data is viwed by your blog admins and "
628
+ "users (also compatible with Multisite Multi-Network)."
629
+ msgstr ""
630
+
631
+ #: widgets/lrgawidget.php:298
632
+ msgid ""
633
+ "Please choose a valid <b>Search Console Property URL</b>, or the widget will "
634
+ "not be able to get keywords data for your website."
635
+ msgstr ""
636
+
637
+ #: widgets/lrgawidget.php:569
638
+ msgid "Position"
639
+ msgstr ""
640
+
641
+ #: widgets/lrgawidget.php:866
642
+ msgid "Previous"
643
+ msgstr ""
644
+
645
+ #: widgets/lrgawidget.php:859
646
+ msgid "Processing..."
647
+ msgstr ""
648
+
649
+ #: widgets/lrgawidget.php:276
650
+ msgid "Profile Details"
651
+ msgstr ""
652
+
653
+ #: widgets/lrgawidget.php:250
654
+ msgid "Property"
655
+ msgstr ""
656
+
657
+ #: widgets/lrgawidget.php:278
658
+ msgid "Property Name"
659
+ msgstr ""
660
+
661
+ #: widgets/lrgawidget.php:295
662
+ msgid "Property Url"
663
+ msgstr ""
664
+
665
+ #: widgets/lrgawidget.php:279
666
+ msgid "Property WebsiteUrl"
667
+ msgstr ""
668
+
669
+ #: widgets/lrgawidget.php:817
670
+ msgid "Rate Us"
671
+ msgstr ""
672
+
673
+ #: core/lrgawidget.permissions.php:40 widgets/lrgawidget.php:30
674
+ #: widgets/lrgawidget.php:882
675
+ msgid "Real Time"
676
+ msgstr ""
677
+
678
+ #: widgets/lrgawidget.php:748
679
+ msgid "Real Time site visitors"
680
+ msgstr ""
681
+
682
+ #: widgets/lrgawidget.php:304
683
+ msgid "Reload"
684
+ msgstr ""
685
+
686
+ #: widgets/lrgawidget.php:84
687
+ msgid "Reset all data and start over"
688
+ msgstr ""
689
+
690
+ #: widgets/lrgawidget.php:428
691
+ msgid "Right now"
692
+ msgstr ""
693
+
694
+ #: widgets/lrgawidget.php:903
695
+ msgid "Sa"
696
+ msgstr ""
697
+
698
+ #: widgets/lrgawidget.php:270 widgets/lrgawidget.php:331
699
+ msgid "Save"
700
+ msgstr ""
701
+
702
+ #: widgets/lrgawidget.php:48 widgets/lrgawidget.php:550
703
+ msgid "Screen Resolution"
704
+ msgstr ""
705
+
706
+ #: core/lrgawidget.permissions.php:46
707
+ msgid "Screen Resolutions"
708
+ msgstr ""
709
+
710
+ #: widgets/lrgawidget.php:294
711
+ msgid "Search Console Property"
712
+ msgstr ""
713
+
714
+ #: widgets/lrgawidget.php:194
715
+ msgid ""
716
+ "Search for <b>Google Search Console API</b>, then click <b>Enable API</b>."
717
+ msgstr ""
718
+
719
+ #: widgets/lrgawidget.php:860
720
+ msgid "Search:"
721
+ msgstr ""
722
+
723
+ #: widgets/lrgawidget.php:188
724
+ msgid "Select <b>Create credentials</b> and choose <b>OAuth client ID</b>."
725
+ msgstr ""
726
+
727
+ #: widgets/lrgawidget.php:77
728
+ msgid "Select Analytics Profile"
729
+ msgstr ""
730
+
731
+ #: widgets/lrgawidget.php:875
732
+ msgid "Select Property URL"
733
+ msgstr ""
734
+
735
+ #: widgets/lrgawidget.php:914
736
+ msgid "September"
737
+ msgstr ""
738
+
739
+ #: core/lrgawidget.class.php:83 core/lrgawidget.permissions.php:39
740
+ #: widgets/lrgawidget.php:24 widgets/lrgawidget.php:352
741
+ #: widgets/lrgawidget.php:453 widgets/lrgawidget.php:472
742
+ #: widgets/lrgawidget.php:492 widgets/lrgawidget.php:512
743
+ #: widgets/lrgawidget.php:531 widgets/lrgawidget.php:550
744
+ #: widgets/lrgawidget.php:594
745
+ msgid "Sessions"
746
+ msgstr ""
747
+
748
+ #: widgets/lrgawidget.php:857
749
+ msgid "Show _MENU_ entries"
750
+ msgstr ""
751
+
752
+ #: widgets/lrgawidget.php:853
753
+ msgid "Showing 0 to 0 of 0 entries"
754
+ msgstr ""
755
+
756
+ #: widgets/lrgawidget.php:852
757
+ msgid "Showing _START_ to _END_ of _TOTAL_ entries"
758
+ msgstr ""
759
+
760
+ #: core/lrgawidget.class.php:388
761
+ msgid "Something went wrong .. please contact an administrator"
762
+ msgstr ""
763
+
764
+ #: widgets/lrgawidget.php:54 widgets/lrgawidget.php:594
765
+ msgid "Source"
766
+ msgstr ""
767
+
768
+ #: core/lrgawidget.permissions.php:48
769
+ msgid "Sources"
770
+ msgstr ""
771
+
772
+ #: widgets/lrgawidget.php:148
773
+ msgid "Start Advanced Setup"
774
+ msgstr ""
775
+
776
+ #: widgets/lrgawidget.php:897
777
+ msgid "Su"
778
+ msgstr ""
779
+
780
+ #: widgets/lrgawidget.php:128 widgets/lrgawidget.php:176
781
+ #: widgets/lrgawidget.php:218
782
+ msgid "Submit"
783
+ msgstr ""
784
+
785
+ #: core/lrgawidget.permissions.php:31
786
+ msgid "Super Administrator [Change Permissions]"
787
+ msgstr ""
788
+
789
+ #: widgets/lrgawidget.php:830
790
+ msgid "Support Center"
791
+ msgstr ""
792
+
793
+ #: core/lrgawidget.permissions.php:36
794
+ msgid "Tabs"
795
+ msgstr ""
796
+
797
+ #: widgets/lrgawidget.php:191
798
+ msgid ""
799
+ "Take note of the <b>client ID</b> & <b>client secret</b> then click <b>Ok</b>"
800
+ "."
801
+ msgstr ""
802
+
803
+ #: widgets/lrgawidget.php:901
804
+ msgid "Th"
805
+ msgstr ""
806
+
807
+ #: core/wp.review.notice.php:73
808
+ msgid ""
809
+ "Thank you for using <b>Lara Google Analytics</b> - WordPress plugin. We hope "
810
+ "it has saved your valuable time and efforts!"
811
+ msgstr ""
812
+
813
+ #: widgets/lrgawidget.php:285
814
+ msgid ""
815
+ "The selected view is using a different timezone than your <b>WordPress</b> "
816
+ "timezone, which <u>may</u> cause inaccurate dates/values."
817
+ msgstr ""
818
+
819
+ #: widgets/lrgawidget.php:879
820
+ msgid "This Month"
821
+ msgstr ""
822
+
823
+ #: widgets/lrgawidget.php:893
824
+ msgid "To"
825
+ msgstr ""
826
+
827
+ #: widgets/lrgawidget.php:182
828
+ msgid ""
829
+ "To use the <b>Google Analytics</b> widget, you will need to create a <b>"
830
+ "Google App</b> as follows :"
831
+ msgstr ""
832
+
833
+ #: widgets/lrgawidget.php:436
834
+ msgid "Top 10 Pages"
835
+ msgstr ""
836
+
837
+ #: widgets/lrgawidget.php:884
838
+ msgid "Total"
839
+ msgstr ""
840
+
841
+ #: widgets/lrgawidget.php:749
842
+ msgid "Traffic sources."
843
+ msgstr ""
844
+
845
+ #: widgets/lrgawidget.php:899
846
+ msgid "Tu"
847
+ msgstr ""
848
+
849
+ #: widgets/lrgawidget.php:190
850
+ msgid ""
851
+ "Under <b>Application type</b>, select <b>Other</b>, enter <b>Lara</b> then "
852
+ "click <b>Create</b>."
853
+ msgstr ""
854
+
855
+ #: core/lrgawidget.class.php:84 widgets/lrgawidget.php:359
856
+ msgid "Users"
857
+ msgstr ""
858
+
859
+ #: widgets/lrgawidget.php:255
860
+ msgid "View"
861
+ msgstr ""
862
+
863
+ #: widgets/lrgawidget.php:794
864
+ msgid "View all premuim features details"
865
+ msgstr ""
866
+
867
+ #: widgets/lrgawidget.php:280
868
+ msgid "View Name"
869
+ msgstr ""
870
+
871
+ #: widgets/lrgawidget.php:106 widgets/lrgawidget.php:227
872
+ msgid "View Search Console data for your verified sites"
873
+ msgstr ""
874
+
875
+ #: widgets/lrgawidget.php:282 widgets/lrgawidget.php:287
876
+ msgid "View Time Zone"
877
+ msgstr ""
878
+
879
+ #: widgets/lrgawidget.php:281
880
+ msgid "View Type"
881
+ msgstr ""
882
+
883
+ #: widgets/lrgawidget.php:105 widgets/lrgawidget.php:226
884
+ msgid "View your Google Analytics data"
885
+ msgstr ""
886
+
887
+ #: widgets/lrgawidget.php:750
888
+ msgid "Visitors Countries"
889
+ msgstr ""
890
+
891
+ #: widgets/lrgawidget.php:895
892
+ msgid "W"
893
+ msgstr ""
894
+
895
+ #: widgets/lrgawidget.php:900
896
+ msgid "We"
897
+ msgstr ""
898
+
899
+ #: widgets/lrgawidget.php:805
900
+ msgid ""
901
+ "We mix creativity with imagination, responsibility with passion, and "
902
+ "resourcefulness with fun. That is what we do everyday within our company."
903
+ msgstr ""
904
+
905
+ #: widgets/lrgawidget.php:196
906
+ msgid ""
907
+ "When done, paste the <b>client ID</b> & <b>client secret</b> here and click "
908
+ "<b>Submit</b>."
909
+ msgstr ""
910
+
911
+ #: widgets/lrgawidget.php:803
912
+ msgid "Who we are & What we do"
913
+ msgstr ""
914
+
915
+ #: core/lrgawidget.permissions.php:78
916
+ msgid "You do not have permission to access this page"
917
+ msgstr ""
918
+
919
+ #: core/lrgawidget.handler.php:38 core/lrgawidget.handler.php:42
920
+ #: core/lrgawidget.handler.php:46 core/lrgawidget.handler.php:50
921
+ #: core/lrgawidget.handler.php:54 core/lrgawidget.handler.php:58
922
+ #: core/lrgawidget.handler.php:62 core/lrgawidget.handler.php:66
923
+ #: core/lrgawidget.handler.php:70 core/lrgawidget.handler.php:74
924
+ #: core/lrgawidget.handler.php:78 core/lrgawidget.handler.php:82
925
+ msgid "You do not have permission to access this tab!"
926
+ msgstr ""
languages/readme.txt ADDED
File without changes
lara-google-analytics.php CHANGED
@@ -4,14 +4,16 @@
4
  Plugin Name: Lara's Google Analytics
5
  Plugin URI: https://www.xtraorbit.com/wordpress-google-analytics-dashboard-widget/
6
  Description: Full width Google Analytics dashboard widget for Wordpress admin interface, which also inserts latest Google Analytics tracking code to your pages.
7
- Version: 3.0.0
8
  Author: Amr M. Ibrahim
9
  Author URI: https://www.xtraorbit.com/
10
  License: GPL2
 
 
11
  */
12
 
13
- define ("lrgawidget_plugin_version", "3.0.0");
14
- define ("lrgawidget_plugin_scripts_version", "300");
15
  define ("lrgawidget_plugin_prefiex", "lrgalite-");
16
  define ("lrgawidget_plugin_dist_dir", plugin_dir_url( __FILE__ ).'dist/');
17
  define ("lrgawidget_plugin_plugins_dir", plugin_dir_url( __FILE__ ).'dist/plugins/');
@@ -38,6 +40,13 @@ add_action( 'wp_ajax_lrgawidget_getPages', 'lrgawidget_callback' );
38
  add_action( 'wp_ajax_lrgawidget_getPermissions', 'lrgawidget_permissions_editor' );
39
  add_action( 'wp_head', 'lrgawidget_ga_code');
40
 
 
 
 
 
 
 
 
41
 
42
  require_once(dirname(__FILE__).'/core/wp.helper.functions.php');
43
 
@@ -56,11 +65,21 @@ function lrgawidget_enqueue($hook) {
56
  wp_enqueue_script( lrgawidget_plugin_prefiex.'main', plugin_dir_url( __FILE__ ).'dist/js/lrgawidget_control.js' ,array('jquery'),lrgawidget_plugin_scripts_version);
57
  wp_localize_script( lrgawidget_plugin_prefiex.'main', 'lrgawidget_ajax_object', array( 'lrgawidget_ajax_url' => admin_url( 'admin-ajax.php' ) ));
58
  }
 
 
 
 
 
 
 
59
  }else{return;}
60
  }else{return;}
61
  }
62
 
63
-
 
 
 
64
 
65
  function lrgawidget_internal_permissions(){
66
  $parray = array();
@@ -140,5 +159,7 @@ function lrgawidget_uninstall() {
140
  $wpdb->query("DROP TABLE `".lrgawidget_plugin_table."`");
141
  delete_option('lrgawidget_property_id');
142
  delete_network_option( 1, lrgawidget_plugin_prefiex.'version' );
 
 
143
  }
144
  ?>
4
  Plugin Name: Lara's Google Analytics
5
  Plugin URI: https://www.xtraorbit.com/wordpress-google-analytics-dashboard-widget/
6
  Description: Full width Google Analytics dashboard widget for Wordpress admin interface, which also inserts latest Google Analytics tracking code to your pages.
7
+ Version: 3.1.0
8
  Author: Amr M. Ibrahim
9
  Author URI: https://www.xtraorbit.com/
10
  License: GPL2
11
+ Text Domain: lara-google-analytics
12
+ Domain Path: /languages/
13
  */
14
 
15
+ define ("lrgawidget_plugin_version", "3.1.0");
16
+ define ("lrgawidget_plugin_scripts_version", "310");
17
  define ("lrgawidget_plugin_prefiex", "lrgalite-");
18
  define ("lrgawidget_plugin_dist_dir", plugin_dir_url( __FILE__ ).'dist/');
19
  define ("lrgawidget_plugin_plugins_dir", plugin_dir_url( __FILE__ ).'dist/plugins/');
40
  add_action( 'wp_ajax_lrgawidget_getPermissions', 'lrgawidget_permissions_editor' );
41
  add_action( 'wp_head', 'lrgawidget_ga_code');
42
 
43
+ add_action( 'wp_ajax_lrgawidget_review_response', 'lrgawidget_review_response');
44
+
45
+ add_action( 'init', 'lrgawidget_load_textdomain' );
46
+ function lrgawidget_load_textdomain() {
47
+ load_plugin_textdomain( 'lara-google-analytics', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
48
+ }
49
+
50
 
51
  require_once(dirname(__FILE__).'/core/wp.helper.functions.php');
52
 
65
  wp_enqueue_script( lrgawidget_plugin_prefiex.'main', plugin_dir_url( __FILE__ ).'dist/js/lrgawidget_control.js' ,array('jquery'),lrgawidget_plugin_scripts_version);
66
  wp_localize_script( lrgawidget_plugin_prefiex.'main', 'lrgawidget_ajax_object', array( 'lrgawidget_ajax_url' => admin_url( 'admin-ajax.php' ) ));
67
  }
68
+
69
+ $already_rated = get_network_option(1,lrgawidget_plugin_prefiex.'already_rated', 'no');
70
+ if ($already_rated == 'no'){
71
+ require_once(dirname(__FILE__).'/core/wp.review.notice.php');
72
+ Lara\Utils\Common\WPReviewNotice::show_review_notice();
73
+ }
74
+
75
  }else{return;}
76
  }else{return;}
77
  }
78
 
79
+ function lrgawidget_review_response() {
80
+ require_once(dirname(__FILE__).'/core/wp.review.notice.php');
81
+ Lara\Utils\Common\WPReviewNotice::review_response();
82
+ }
83
 
84
  function lrgawidget_internal_permissions(){
85
  $parray = array();
159
  $wpdb->query("DROP TABLE `".lrgawidget_plugin_table."`");
160
  delete_option('lrgawidget_property_id');
161
  delete_network_option( 1, lrgawidget_plugin_prefiex.'version' );
162
+ delete_network_option( 1, lrgawidget_plugin_prefiex.'install_date' );
163
+ delete_network_option( 1, lrgawidget_plugin_prefiex.'already_rated' );
164
  }
165
  ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: amribrahim, laragoogleanalytics
4
  Requires PHP: 5.3.0
5
  Requires at least: 4.0
6
  Tested up to: 5.3.2
7
- Stable tag: 3.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -118,4 +118,9 @@ Adds a full width Google Analytics dashboard widget for WordPress admin interfac
118
  * New : Code refactoring.
119
  * New : Various security checks and validation for POST variables.
120
  * New : Implementing Multisite Multi-Network in the Pro Version.
121
- * New : Implementing Permissions Control in the Pro Version.
 
 
 
 
 
4
  Requires PHP: 5.3.0
5
  Requires at least: 4.0
6
  Tested up to: 5.3.2
7
+ Stable tag: 3.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
118
  * New : Code refactoring.
119
  * New : Various security checks and validation for POST variables.
120
  * New : Implementing Multisite Multi-Network in the Pro Version.
121
+ * New : Implementing Permissions Control in the Pro Version.
122
+
123
+ = 3.1.0 =
124
+ * 26-Jan-2020
125
+ * New : Localization support.
126
+ * New : Review notice.
widgets/lrgawidget.php CHANGED
@@ -4,7 +4,7 @@
4
  <div class="lrga_bs lrgawidget"><!-- /.id -->
5
  <div class="box box-primary" id="lrgawidget">
6
  <div class="box-header with-border">
7
- <h3 class="box-title"><i class="fa fa-bar-chart"></i> Google Analytics</h3>
8
  <div class="box-tools pull-right">
9
  <span id="lrgawidget_loading"></span>
10
  <span id="lrgawidget_mode" class="label label-success"></span>
@@ -20,29 +20,41 @@
20
  <ul class="nav nav-tabs">
21
  <?php if (in_array("lrgawidget_perm_admin",$globalWidgetPermissions)){ ?>
22
 
23
-
24
  <?php } if (in_array("lrgawidget_perm_sessions",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_sessions_tab"; ?>
25
- <li><a data-toggle="tab" data-target="#lrgawidget_sessions_tab" href="#lrgawidget_sessions_tab"><i class="fa fa-users fa-fw"></i><span class="hidden-xs hidden-sm"> Sessions</span></a></li>
26
 
27
  <?php } if (in_array("lrgawidget_perm_pages",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_pages_tab"; ?>
28
- <li><a data-toggle="tab" data-target="#lrgawidget_pages_tab" href="#lrgawidget_pages_tab"><i class="fa fa-file-o fa-fw"></i><span class="hidden-xs hidden-sm"> Pages</span></a></li>
 
 
 
 
 
 
29
 
30
  <?php } if (in_array("lrgawidget_perm_browsers",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_browsers_tab"; ?>
31
- <li><a data-toggle="tab" data-target="#lrgawidget_browsers_tab" href="#lrgawidget_browsers_tab"><i class="fa fa-list-alt fa-fw"></i><span class="hidden-xs hidden-sm"> Browsers</span></a></li>
32
 
33
  <?php } if (in_array("lrgawidget_perm_languages",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_languages_tab"; ?>
34
- <li><a data-toggle="tab" data-target="#lrgawidget_languages_tab" href="#lrgawidget_languages_tab"><i class="fa fa-font fa-fw"></i><span class="hidden-xs hidden-sm"> Languages</span></a></li>
35
 
36
  <?php } if (in_array("lrgawidget_perm_os",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_os_tab"; ?>
37
- <li><a data-toggle="tab" data-target="#lrgawidget_os_tab" href="#lrgawidget_os_tab"><i class="fa fa-desktop fa-fw"></i><span class="hidden-xs hidden-sm"> Operating Systems</span></a></li>
38
 
39
  <?php } if (in_array("lrgawidget_perm_devices",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_devices_tab"; ?>
40
- <li><a data-toggle="tab" data-target="#lrgawidget_devices_tab" href="#lrgawidget_devices_tab"><i class="fa fa-tablet fa-fw"></i><span class="hidden-xs hidden-sm"> Devices</span></a></li>
41
 
42
  <?php } if (in_array("lrgawidget_perm_screenres",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_screenres_tab"; ?>
43
- <li><a data-toggle="tab" data-target="#lrgawidget_screenres_tab" href="#lrgawidget_screenres_tab"><i class="fa fa-arrows-alt fa-fw"></i><span class="hidden-xs hidden-sm"> Screen Resolution</span></a></li>
 
 
 
 
 
 
 
44
  <?php } ?>
45
- <li><a data-toggle="tab" data-target="#lrgawidget_gopro_tab" href="#lrgawidget_gopro_tab"><i class="fa fa-unlock fa-fw"></i><span class="hidden-xs hidden-sm"> Go Premium ! </span></a></li>
46
 
47
  <?php if (in_array("lrgawidget_perm_admin",$globalWidgetPermissions)){ ?>
48
  <li class="pull-right"><a data-toggle="tab" data-target="#lrgawidget_settings_tab" href="#lrgawidget_settings_tab"><i class="fa fa-cog fa-fw"></i></a></li>
@@ -60,19 +72,19 @@
60
  <div class="wizard" data-initialize="wizard" id="lrga-wizard" style="background-color: #FFF;">
61
  <div class="steps-container">
62
  <ul class="steps">
63
- <li class="active" data-name="lrga-createApp" data-step="1"><span class="badge">1</span>Create Google APP <span class="chevron"></span></li>
64
- <li data-step="2" data-name="lrga-getCode"><span class="badge">2</span>Authorize APP <span class="chevron"></span></li>
65
- <li data-step="3" data-name="lrga-profile"><span class="badge">3</span>Select Analytics Profile <span class="chevron"></span></li>
66
  </ul>
67
  </div>
68
 
69
 
70
  <div class="actions">
71
  <button type="button" class="btn btn-danger" data-lrgawidget-reset="reset" style="display: none;">
72
- <i class="fa fa-refresh fa-fw"></i> Reset all data and start over
73
  </button>
74
  <button type="button" class="btn btn-primary" data-reload="lrgawidget_go_express" style="display: none;">
75
- <i class="fa fa-arrow-circle-o-left fa-fw"></i> <i class="fa fa-magic fa-fw"></i> Go Back to Express Setup
76
  </button>
77
  </div>
78
 
@@ -85,13 +97,19 @@
85
  <div class="box">
86
  <div class="box-header with-border">
87
  <i class="fa fa-magic fa-fw"></i>
88
- <h3 class="box-title">Express Setup</h3>
89
  </div>
90
  <div class="box-body">
91
- <p>Click on "<b>Get Access Code</b>" button below, and a pop-up window will open, asking you to allow "<b>Lara, The Google Analytics Widget</b>" to <b>View your Google Analytics data</b>
92
- . Click <b>Allow</b>, then copy and paste the access code here, and click <b>Submit</b>.
93
- <br><br>If you were asked to login, be sure to use the same email account that is linked to your <b>Google Analytics</b>.
94
- <br><br><a class="btn btn-primary" href="javascript:gauthWindow('https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=789117741534-frb075bn85jk68ufpjg56s08hf85r007.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=https://www.googleapis.com/auth/analytics.readonly&access_type=offline&approval_prompt=force');" >Get Access Code</a>
 
 
 
 
 
 
95
 
96
  </p>
97
 
@@ -100,14 +118,14 @@
100
  <input name="client_id" type="hidden" value="789117741534-frb075bn85jk68ufpjg56s08hf85r007.apps.googleusercontent.com">
101
  <input name="client_secret" type="hidden" value="ZkJpBFuNFwv65e36C6mwnihQ">
102
  <div class="form-group">
103
- <label> Access Code</label>
104
  <div class="input-group">
105
  <div class="input-group-addon">
106
  <i class="fa fa-user fa-fw"></i>
107
  </div>
108
  <input class="form-control" name="code" required="" type="text">
109
  <span class="input-group-btn">
110
- <button type="submit" class="btn btn-primary btn-flat" >Submit</button>
111
  </span>
112
  </div><!-- /.input group -->
113
  </div>
@@ -122,12 +140,12 @@
122
  <div class="box">
123
  <div class="box-header with-border">
124
  <i class="fa fa-gears fa-fw"></i>
125
- <h3 class="box-title">Advanced Setup</h3>
126
  </div>
127
  <div class="box-body">
128
- <p>By clicking on "<b>Start Advanced Setup</b>" button below, The setup wizard will guide you through creating and/or configuring your own Google Application.
129
- If you want a quick start, or just trying the widget, use the <b>Express Setup</b> on the left.
130
- <br><br><a class="btn btn-primary btn-block" href="#" data-reload="lrgawidget_go_advanced">Start Advanced Setup</a>
131
  </div>
132
  </div>
133
  </div>
@@ -139,7 +157,7 @@
139
  <form id="lrgawidget-credentials" name="lrgawidget-credentials" role="form">
140
  <input name="action" type="hidden" value="getAuthURL">
141
  <div class="form-group">
142
- <label>Client ID</label>
143
  <div class="input-group">
144
  <div class="input-group-addon">
145
  <i class="fa fa-user fa-fw"></i>
@@ -147,7 +165,7 @@
147
  </div><!-- /.input group -->
148
  </div>
149
  <div class="form-group">
150
- <label>Client Secret</label>
151
  <div class="input-group">
152
  <div class="input-group-addon">
153
  <i class="fa fa-lock fa-fw"></i>
@@ -155,26 +173,27 @@
155
  </div><!-- /.input group -->
156
  </div>
157
  <div>
158
- <button class="btn btn-primary" type="submit">Submit</button>
159
  </div>
160
  </form>
161
  </div>
162
  <div class="col-md-6">
163
- <h2 id="enable-oauth-20-api-access">Create Google APP</h2>
164
- <p>To use the <b>Google Analytics</b> widget, you'll need to create a <b>Google App</b> as follows :</p>
165
 
166
  <ol>
167
- <li>Open the <a target="_blank" href="//console.developers.google.com/apis/credentials?project=_">Google Developers Console</a>.</li>
168
- <li>Click on <b>Select a project</b> drop-down, and choose <b>Create a new project</b>.</li>
169
- <li>Enter "<b>Lara</b>" as the <b>Project name</b>, then click <b>Create</b>.</li>
170
- <li>Select <b>Create credentials</b> and choose <b>OAuth client ID</b>.</li>
171
- <li>Click on <b>Configure consent screen</b> and enter "<b>Lara, The Google Analytics Widget</b>" as the <b>Product Name</b>, then click <b>Save</b>.</li>
172
- <li>Under <b>Application type</b>, select <b>Other</b>, enter "<b>Lara</b>" then click <b>Create</b>.</li>
173
- <li>Take note of the <b>client ID</b> & <b>client secret</b> then click "<b>Ok</b>".</li>
174
- <li>Open "<b>Google Developers Console</b>" menu, by clicking on " <i class="fa fa-bars"></i> " and select "<b>API Manager</b>".</li>
175
- <li>Click "<b>Analytics API</b>", then click <b>Enable API</b>.
 
176
  </ol>
177
- <p>When done, paste the <b>client ID</b> & <b>client secret</b> here and click <b>Submit</b>.</p>
178
 
179
  </div>
180
  </div>
@@ -188,7 +207,7 @@
188
  <input name="client_id" type="hidden" value="">
189
  <input name="client_secret" type="hidden" value="">
190
  <div class="form-group">
191
- <label>Access Code</label>
192
  <div class="input-group">
193
  <div class="input-group-addon">
194
  <i class="fa fa-user fa-fw"></i>
@@ -196,18 +215,22 @@
196
  </div><!-- /.input group -->
197
  </div>
198
  <div>
199
- <button class="btn btn-primary" type="submit">Submit</button>
200
  </div>
201
  </form>
202
  </div>
203
  <div class="col-md-6">
204
- <h2 id="enable-oauth-20-api-access">Authorize App</h2>
205
- <p>Click on "<b>Get Access Code</b>" button below, and a pop-up window will open, asking you to allow the <u>app you just created</u> to <b>View your Google Analytics data</b>
206
- . <br><br>Be sure to use the same email account that is linked to your <b>Google Analytics</b>.
207
- <br><br>Click <b>Allow</b>, then copy and paste the access code here, and click <b>Submit</b>.
 
 
 
 
208
  </p>
209
 
210
- <a class="btn btn-primary" href="#" id="code-btn">Get Access Code</a>
211
  </div>
212
  </div>
213
  </div>
@@ -219,17 +242,17 @@
219
  <input name="action" type="hidden" value="setProfileID">
220
  <input name="profile_timezone" type="hidden" value="">
221
  <div class="form-group">
222
- <label>Account</label>
223
  <select class="form-control" style="width: 100%;" id="lrgawidget-accounts" name="account_id">
224
  </select>
225
  </div>
226
  <div class="form-group">
227
- <label>Property</label>
228
  <select class="form-control" style="width: 100%;" id="lrgawidget-properties" name="property_id">
229
  </select>
230
  </div>
231
  <div class="form-group">
232
- <label>View</label>
233
  <select class="form-control" style="width: 100%;" id="lrgawidget-profiles" name="profile_id">
234
  </select>
235
  </div>
@@ -241,36 +264,49 @@ if ($enable_universal_tracking !== "off"){
241
  }
242
  ?>
243
  <div class="callout" style="padding: 5px;">
244
- <input name="enable_universal_tracking" <?php echo $is_traching_enabled ?> type="checkbox" style="margin: 0px;" value="on"> Add "<b>Google Universal Analytics</b>" tracking code to all pages.
245
  </div>
246
  <div>
247
- <button class="btn btn-primary" type="submit" id="lrgawidget-save-settings">Save</button>
248
  </div>
249
  </form>
250
  </div>
251
  <div class="col-md-6">
252
  <div>
253
- <h2 >Profile Details</h2>
254
- <label>Account Name :</label> <i id="lrgawidget-accname"></i>
255
- <br><label>Property Name :</label> <i id="lrgawidget-propname"></i>
256
- <br><label>Property WebsiteUrl :</label> <i id="lrgawidget-propurl"></i>
257
- <br><label>View Name :</label> <i id="lrgawidget-vname"></i>
258
- <br><label>View Type :</label> <i id="lrgawidget-vtype"></i>
259
- <br><label>View TimeZone :</label> <i id="lrgawidget-vtimezone"></i> <i id="lrgawidget-timezone-show-error" class="icon fa fa-warning" style="display:none; color: #f39c12;margin-left: 5px;cursor: pointer;"></i>
260
  <div style="display:none; margin-top: 15px;" id="lrgawidget-timezone-error">
261
  <div class="alert alert-warning">
262
- <i class="icon fa fa-warning"></i>The selected view is using a different timezone than your <b>WordPress</b> timezone, which <u>may</u> cause inaccurate dates/values.
263
  <div style="margin-left: 25px;margin-top: 10px;">
264
- View timezone : <b id="lrgawidget-tz-error-vtimezone"></b>
265
  <br> WordPress timezone : <b id="lrgawidget-tz-error-stimezone"></b>
266
  </div>
267
  </div>
268
  </div>
269
-
270
  </div>
271
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  </div>
273
-
274
  </div>
275
  </div>
276
  </div>
@@ -292,7 +328,7 @@ if ($enable_universal_tracking !== "off"){
292
  <div class="tab-content" id="lrgawidget_permissions_list">
293
  </div>
294
  <div>
295
- <button class="btn btn-primary pull-right" type="submit"><i class="fa fa-save fa-fw"></i> Save</button>
296
  </div>
297
  </form>
298
  </div>
@@ -313,49 +349,49 @@ if ($enable_universal_tracking !== "off"){
313
  <div class="row">
314
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_sessions" data-lrgawidget-plot="sessions">
315
  <div class="description-block border-right">
316
- <span class="description-text">Sessions</span>
317
  <h5 class="description-header"></h5>
318
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_sessions"></div>
319
  </div><!-- /.description-block -->
320
  </div><!-- /.col -->
321
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_users" data-lrgawidget-plot="users">
322
  <div class="description-block border-right">
323
- <span class="description-text">Users</span>
324
  <h5 class="description-header"></h5>
325
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_users"></div>
326
  </div><!-- /.description-block -->
327
  </div><!-- /.col -->
328
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_pageviews" data-lrgawidget-plot="pageviews">
329
  <div class="description-block border-right">
330
- <span class="description-text">Pageviews</span>
331
  <h5 class="description-header"></h5>
332
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_pageviews"></div>
333
  </div><!-- /.description-block -->
334
  </div><!-- /.col -->
335
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_pageviewsPerSession" data-lrgawidget-plot="pageviewsPerSession">
336
  <div class="description-block border-right">
337
- <span class="description-text">Pages / Session</span>
338
  <h5 class="description-header"></h5>
339
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_pageviewsPerSession"></div>
340
  </div><!-- /.description-block -->
341
  </div>
342
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_avgSessionDuration" data-lrgawidget-plot="avgSessionDuration">
343
  <div class="description-block border-right">
344
- <span class="description-text">Avg. Session Duration</span>
345
  <h5 class="description-header"></h5>
346
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_avgSessionDuration"></div>
347
  </div><!-- /.description-block -->
348
  </div>
349
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_bounceRate" data-lrgawidget-plot="bounceRate">
350
  <div class="description-block border-right">
351
- <span class="description-text">Bounce Rate</span>
352
  <h5 class="description-header"></h5>
353
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_bounceRate"></div>
354
  </div><!-- /.description-block -->
355
  </div>
356
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_percentNewSessions" data-lrgawidget-plot="percentNewSessions">
357
  <div class="description-block">
358
- <span class="description-text">% New Sessions</span>
359
  <h5 class="description-header"></h5>
360
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_percentNewSessions"></div>
361
  </div><!-- /.description-block -->
@@ -371,7 +407,7 @@ if ($enable_universal_tracking !== "off"){
371
  <div class="col-md-6">
372
  <div>
373
  <table id="lrgawidget_pages_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" >
374
- <thead><tr><th>ID</th><th>Pages</th><th>Pageviews</th><th>Percentage</th></tr></thead>
375
  <tbody></tbody>
376
  </table>
377
  </div>
@@ -384,13 +420,56 @@ if ($enable_universal_tracking !== "off"){
384
  </div>
385
  <?php } ?>
386
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
387
  <?php if (in_array("lrgawidget_perm_browsers",$globalWidgetPermissions)){ ?>
388
  <div class="tab-pane" id="lrgawidget_browsers_tab">
389
  <div class="row">
390
  <div class="col-md-6">
391
  <div>
392
  <table id="lrgawidget_browsers_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" style="cursor:pointer">
393
- <thead><tr><th>ID</th><th>Browser</th><th>Sessions</th><th>Percentage</th></tr></thead>
394
  <tbody></tbody>
395
  </table>
396
  </div>
@@ -410,7 +489,7 @@ if ($enable_universal_tracking !== "off"){
410
  <div class="col-md-6">
411
  <div>
412
  <table id="lrgawidget_languages_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" >
413
- <thead><tr><th>ID</th><th>Language</th><th>Sessions</th><th>Percentage</th></tr></thead>
414
  <tbody></tbody>
415
  </table>
416
  </div>
@@ -430,7 +509,7 @@ if ($enable_universal_tracking !== "off"){
430
  <div class="col-md-6">
431
  <div>
432
  <table id="lrgawidget_os_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" style="cursor:pointer">
433
- <thead><tr><th>ID</th><th>Operating System</th><th>Sessions</th><th>Percentage</th></tr></thead>
434
  <tbody></tbody>
435
  </table>
436
  </div>
@@ -449,7 +528,7 @@ if ($enable_universal_tracking !== "off"){
449
  <div class="col-md-6">
450
  <div>
451
  <table id="lrgawidget_devices_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" style="cursor:pointer">
452
- <thead><tr><th>ID</th><th>Device Type</th><th>Sessions</th><th>Percentage</th></tr></thead>
453
  <tbody></tbody>
454
  </table>
455
  </div>
@@ -468,7 +547,7 @@ if ($enable_universal_tracking !== "off"){
468
  <div class="col-md-6">
469
  <div>
470
  <table id="lrgawidget_screenres_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" >
471
- <thead><tr><th>ID</th><th>Screen Resolution</th><th>Sessions</th><th>Percentage</th></tr></thead>
472
  <tbody></tbody>
473
  </table>
474
  </div>
@@ -480,6 +559,50 @@ if ($enable_universal_tracking !== "off"){
480
  </div>
481
  </div>
482
  <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
  <style>
484
 
485
  #lrgawidget_gopro_tab .lrga_gpro_clr1 { color: #eaeaea }
@@ -591,10 +714,6 @@ if ($enable_universal_tracking !== "off"){
591
  color: #FDDC00;
592
  }
593
 
594
- #lrgawidget_gopro_tab button#rating i:first-child {
595
- margin-right: 0px !important;
596
- }
597
-
598
  #lrgawidget_gopro_tab .lrga_gpro_features i{
599
  margin-bottom:10px;
600
 
@@ -608,8 +727,8 @@ if ($enable_universal_tracking !== "off"){
608
  <div class="row">
609
  <div class="col-md-12">
610
  <div class="lrga_gpro_header">
611
- <p class='lrga_gpro_headerh'><i class="fa fa-unlock fa-fw"></i> Go Premium !</p>
612
- <p>Buy the Premium version and get access to these amazing features</p>
613
  </div>
614
  </div>
615
  </div>
@@ -618,24 +737,24 @@ if ($enable_universal_tracking !== "off"){
618
 
619
  <div class="col-md-12 lrga_gpro_featured">
620
  <ul class="fa-ul" style="margin-top: 5px;margin-bottom: 5px;">
621
- <li><i class="fa-li fa fa-sitemap fa-lg fa-fw"></i><b>Multisite Multi-Network enabled : </b>Every blog/site in your network can have its own analytics tracking code and dashboard widget.</li>
622
- <li><i class="fa-li fa fa-key fa-lg fa-fw"></i><b>Permissions : </b>Easily control which data is viwed by your blog admins and users (also compatible with Multisite Multi-Network).</li>
623
  </ul>
624
  </div>
625
 
626
  <div class="col-md-6">
627
  <ul class="fa-ul">
628
- <li><i class="fa-li fa fa-search fa-lg fa-fw"></i>Keywords ( provided by Google Search Console).</li>
629
- <li><i class="fa-li fa fa-clock-o fa-lg fa-fw"></i>Real Time site visitors </li>
630
- <li><i class="fa-li fa fa-external-link-square fa-lg fa-fw"></i>Traffic sources.</li>
631
- <li><i class="fa-li fa fa-globe fa-lg fa-fw"></i>Visitors' Countries.</li>
632
  </ul>
633
  </div>
634
  <div class="col-md-6">
635
  <ul class="fa-ul">
636
- <li><i class="fa-li fa fa-list-alt fa-lg fa-fw"></i>Browsers versions (IE 6, IE 7 .. etc.).</li>
637
- <li><i class="fa-li fa fa-desktop fa-lg fa-fw"></i>Operating Systems versions (Windows 7, Windows 8 .. etc.).</li>
638
- <li><i class="fa-li fa fa-mobile fa-lg fa-fw"></i>Device Types and brands (Samsung, Apple .. etc.).</li>
639
  </ul>
640
  </div>
641
  </div>
@@ -643,23 +762,23 @@ if ($enable_universal_tracking !== "off"){
643
  <div class="col-md-6 text-center">
644
  <div class="lrga_gpro_feature lrga_gpro_boxtopb">
645
  <span class="fa-stack fa-2x"><i class="fa fa-circle fa-stack-2x lrga_gpro_clr3"></i> <i class="fa fa-circle-thin lrga_gpro_clr1"></i> <i class="fa fa-calendar fa-stack-1x "></i></span>
646
- <h4>Check any Date Range, not just the last 30 days</h4>
647
  </div>
648
  </div>
649
  <div class="col-md-6 text-center">
650
  <div class="lrga_gpro_feature lrga_gpro_boxtopb">
651
  <span class="fa-stack fa-2x"><i class="fa fa-circle fa-stack-2x lrga_gpro_clr3"></i> <i class="fa fa-circle-thin lrga_gpro_clr1"></i> <i class="fa fa-refresh fa-stack-1x "></i></span>
652
- <h4>12 Months of Free Updates and Support</h4>
653
  </div>
654
  </div>
655
  </div><br>
656
  <div class="row">
657
  <div class="col-md-12">
658
  <div class="lrga_gpro_demo lrga_gpro_boxtopb">
659
- <p class="lrga_gpro_clr6">Check the<strong> Demo</strong> to see exactly how the premium version looks like, and what you will get from it without leaving your wordpress dashboard &nbsp;
660
  <div>
661
  <a class="lrgawidget_view_demo" href="https://wpdemo.whmcsadmintheme.com/demo.php?utm_source=InApp&utm_medium=Launch_Demo" title="Fully working Demo .. When done, press ESC to close this window.">
662
- <button class="btn btn-warning" type="button"><i aria-hidden="true" class="fa fa-chevron-right"></i> <strong>Launch Demo</strong></button>
663
  </a>
664
  </div>
665
  </p>
@@ -669,10 +788,10 @@ if ($enable_universal_tracking !== "off"){
669
  <div class="row" style="margin-bottom:15px;">
670
  <div class="col-md-12 text-center">
671
  <a href="https://clients.xtraorbit.com/cart.php?a=add&pid=3&utm_source=InApp&utm_medium=Buy_Now" target="_blank">
672
- <button class="btn btn-danger" type="button"><i aria-hidden="true" class="fa fa-shopping-cart"></i> <strong>Buy Now</strong></button>
673
  </a>
674
  <a href="https://www.xtraorbit.com/wordpress-google-analytics-dashboard-widget/?utm_source=InApp&utm_medium=Premium_Features" target="_blank">
675
- <button class="btn lrga_gpro_btn_dark" type="button"><i aria-hidden="true" class="fa fa-external-link"></i> <strong>View all premuim features details</strong></button>
676
  </a>
677
  <img style="margin-top:35px;" alt="" class=" img-responsive center-block" src="<?php echo lrgawidget_plugin_dist_dir.'/img/xo_payments.png'; ?>"></div>
678
  </div>
@@ -681,11 +800,11 @@ if ($enable_universal_tracking !== "off"){
681
  <div class="row">
682
  <div class="col-lg-12 text-center">
683
  <div class="lrga_gpro_who">
684
- <h4><strong>Who we are & What we do</strong></h4><br><img alt="" class=" img-responsive center-block" src="<?php echo lrgawidget_plugin_dist_dir.'/img/xtraorbit_logo.png'; ?>"><br>
685
- <p><b>XtraOrbit</b> has been providing a wide range of services <b>since 2002</b>, including <b>Web Hosting</b>, <b>Domain Names</b> & <b>Web Development</b>.</p>
686
- <p>We mix creativity with imagination, responsibility with passion, and resourcefulness with fun. That's what we do everyday within our company.</p>
687
  <a href="https://www.xtraorbit.com/?utm_source=InApp&utm_medium=Check_Us" target="_blank">
688
- <button class="btn lrga_gpro_btn_dark" type="button"><i aria-hidden="true" class="fa fa-external-link"></i> <strong>Come, check us out!</strong></button>
689
  </a>
690
  <br><br>
691
  </div>
@@ -695,20 +814,20 @@ if ($enable_universal_tracking !== "off"){
695
  <div class="col-lg-6 text-center">
696
  <div class="lrga_gpro_support">
697
  <span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x lrga_gpro_clr3"></i> <i class="fa fa-circle-thin fa-stack-2x lrga_gpro_clr4"></i> <i class="fa fa-thumbs-up fa-stack-1x lrga_gpro_clr5"></i></span>
698
- <h4><strong>Rate Us</strong></h4>
699
- <p>If you have a free moment, and want to help us spread the word and boost our motivation, please do us a BIG favour and give us 5-Star rating on wordpress .. Thanks in advance :)</p>
700
  <a href="https://wordpress.org/support/plugin/lara-google-analytics/reviews/" target="_blank">
701
- <button class="btn btn-default" id="rating" type="button">Yes, You deserve it <div><i aria-hidden="true" class="fa fa-star"></i> <i aria-hidden="true" class="fa fa-star"></i> <i aria-hidden="true" class="fa fa-star"></i> <i aria-hidden="true" class="fa fa-star"></i> <i aria-hidden="true" class="fa fa-star"></i></div></button>
702
  </a>
703
  </div>
704
  </div>
705
  <div class="col-lg-6 text-center">
706
  <div class="lrga_gpro_support">
707
  <span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x lrga_gpro_clr3"></i> <i class="fa fa-circle-thin fa-stack-2x lrga_gpro_clr4"></i> <i class="fa fa-question-circle fa-stack-1x lrga_gpro_clr5"></i></span>
708
- <h4><strong>Help & Support</strong></h4><small></small>
709
- <p>If you are facing any issues, need support or have a new feature request, visit the official plugin's Support Forum, where you will be able to submit a support ticket.</p>
710
  <a href="https://wordpress.org/support/plugin/lara-google-analytics/" target="_blank">
711
- <button class="btn btn-default" type="button"><i aria-hidden="true" class="fa fa-question-circle lrga_gpro_clr4"></i> Support Center</button>
712
  </a>
713
  </div>
714
  </div>
@@ -729,5 +848,77 @@ if ($enable_universal_tracking !== "off"){
729
  <?php if (!empty($actLrgaTabs[0])){ ?>
730
  <script type="text/javascript">
731
  var actLrgaTabs = '<?php echo $actLrgaTabs[0]; ?>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
732
  </script>
733
  <?php } ?>
4
  <div class="lrga_bs lrgawidget"><!-- /.id -->
5
  <div class="box box-primary" id="lrgawidget">
6
  <div class="box-header with-border">
7
+ <h3 class="box-title"><i class="fa fa-bar-chart"></i> <?php _e('Google Analytics', 'lara-google-analytics'); ?></h3>
8
  <div class="box-tools pull-right">
9
  <span id="lrgawidget_loading"></span>
10
  <span id="lrgawidget_mode" class="label label-success"></span>
20
  <ul class="nav nav-tabs">
21
  <?php if (in_array("lrgawidget_perm_admin",$globalWidgetPermissions)){ ?>
22
 
 
23
  <?php } if (in_array("lrgawidget_perm_sessions",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_sessions_tab"; ?>
24
+ <li><a data-toggle="tab" data-target="#lrgawidget_sessions_tab" href="#lrgawidget_sessions_tab"><i class="fa fa-users fa-fw"></i><span class="hidden-xs hidden-sm"> <?php _e('Sessions', 'lara-google-analytics'); ?></span></a></li>
25
 
26
  <?php } if (in_array("lrgawidget_perm_pages",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_pages_tab"; ?>
27
+ <li><a data-toggle="tab" data-target="#lrgawidget_pages_tab" href="#lrgawidget_pages_tab"><i class="fa fa-file-o fa-fw"></i><span class="hidden-xs hidden-sm"> <?php _e('Pages', 'lara-google-analytics'); ?></span></a></li>
28
+
29
+ <?php } if (in_array("lrgawidget_perm_realtime",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_realtime_tab"; ?>
30
+ <li><a data-toggle="tab" data-target="#lrgawidget_realtime_tab" href="#lrgawidget_realtime_tab"><i class="fa fa-clock-o fa-fw"></i><span class="hidden-xs hidden-sm"> <?php _e('Real Time', 'lara-google-analytics'); ?></span></a></li>
31
+
32
+ <?php } if (in_array("lrgawidget_perm_countries",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_countries_tab"; ?>
33
+ <li><a data-toggle="tab" data-target="#lrgawidget_countries_tab" href="#lrgawidget_countries_tab"><i class="fa fa-globe fa-fw"></i><span class="hidden-xs hidden-sm"> <?php _e('Countries', 'lara-google-analytics'); ?></span></a></li>
34
 
35
  <?php } if (in_array("lrgawidget_perm_browsers",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_browsers_tab"; ?>
36
+ <li><a data-toggle="tab" data-target="#lrgawidget_browsers_tab" href="#lrgawidget_browsers_tab"><i class="fa fa-list-alt fa-fw"></i><span class="hidden-xs hidden-sm"> <?php _e('Browsers', 'lara-google-analytics'); ?></span></a></li>
37
 
38
  <?php } if (in_array("lrgawidget_perm_languages",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_languages_tab"; ?>
39
+ <li><a data-toggle="tab" data-target="#lrgawidget_languages_tab" href="#lrgawidget_languages_tab"><i class="fa fa-font fa-fw"></i><span class="hidden-xs hidden-sm"> <?php _e('Languages', 'lara-google-analytics'); ?></span></a></li>
40
 
41
  <?php } if (in_array("lrgawidget_perm_os",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_os_tab"; ?>
42
+ <li><a data-toggle="tab" data-target="#lrgawidget_os_tab" href="#lrgawidget_os_tab"><i class="fa fa-desktop fa-fw"></i><span class="hidden-xs hidden-sm"> <?php _e('Operating Systems', 'lara-google-analytics'); ?></span></a></li>
43
 
44
  <?php } if (in_array("lrgawidget_perm_devices",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_devices_tab"; ?>
45
+ <li><a data-toggle="tab" data-target="#lrgawidget_devices_tab" href="#lrgawidget_devices_tab"><i class="fa fa-tablet fa-fw"></i><span class="hidden-xs hidden-sm"> <?php _e('Devices', 'lara-google-analytics'); ?></span></a></li>
46
 
47
  <?php } if (in_array("lrgawidget_perm_screenres",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_screenres_tab"; ?>
48
+ <li><a data-toggle="tab" data-target="#lrgawidget_screenres_tab" href="#lrgawidget_screenres_tab"><i class="fa fa-arrows-alt fa-fw"></i><span class="hidden-xs hidden-sm"> <?php _e('Screen Resolution', 'lara-google-analytics'); ?></span></a></li>
49
+
50
+ <?php } if (in_array("lrgawidget_perm_keywords",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_keywords_tab"; ?>
51
+ <li><a data-toggle="tab" data-target="#lrgawidget_keywords_tab" href="#lrgawidget_keywords_tab"><i class="fa fa-search fa-fw"></i><span class="hidden-xs hidden-sm"> <?php _e('Keywords', 'lara-google-analytics'); ?></span></a></li>
52
+
53
+ <?php } if (in_array("lrgawidget_perm_sources",$globalWidgetPermissions)){ $actLrgaTabs[] = "lrgawidget_sources_tab"; ?>
54
+ <li><a data-toggle="tab" data-target="#lrgawidget_sources_tab" href="#lrgawidget_sources_tab"><i class="fa fa-external-link-square fa-fw"></i><span class="hidden-xs hidden-sm"> <?php _e('Source', 'lara-google-analytics'); ?></span></a></li>
55
+
56
  <?php } ?>
57
+ <li><a data-toggle="tab" data-target="#lrgawidget_gopro_tab" href="#lrgawidget_gopro_tab"><i class="fa fa-unlock fa-fw"></i><span class="hidden-xs hidden-sm"> <?php _e('Go Premium !', 'lara-google-analytics'); ?> </span></a></li>
58
 
59
  <?php if (in_array("lrgawidget_perm_admin",$globalWidgetPermissions)){ ?>
60
  <li class="pull-right"><a data-toggle="tab" data-target="#lrgawidget_settings_tab" href="#lrgawidget_settings_tab"><i class="fa fa-cog fa-fw"></i></a></li>
72
  <div class="wizard" data-initialize="wizard" id="lrga-wizard" style="background-color: #FFF;">
73
  <div class="steps-container">
74
  <ul class="steps">
75
+ <li class="active" data-name="lrga-createApp" data-step="1"><span class="badge"><?php _e('1', 'lara-google-analytics'); ?></span><?php _e('Create Google APP', 'lara-google-analytics'); ?> <span class="chevron"></span></li>
76
+ <li data-step="2" data-name="lrga-getCode"><span class="badge"><?php _e('2', 'lara-google-analytics'); ?></span><?php _e('Authorize APP', 'lara-google-analytics'); ?> <span class="chevron"></span></li>
77
+ <li data-step="3" data-name="lrga-profile"><span class="badge"><?php _e('3', 'lara-google-analytics'); ?></span><?php _e('Select Analytics Profile', 'lara-google-analytics'); ?> <span class="chevron"></span></li>
78
  </ul>
79
  </div>
80
 
81
 
82
  <div class="actions">
83
  <button type="button" class="btn btn-danger" data-lrgawidget-reset="reset" style="display: none;">
84
+ <i class="fa fa-refresh fa-fw"></i> <?php _e('Reset all data and start over', 'lara-google-analytics'); ?>
85
  </button>
86
  <button type="button" class="btn btn-primary" data-reload="lrgawidget_go_express" style="display: none;">
87
+ <i class="fa fa-arrow-circle-o-left fa-fw"></i> <i class="fa fa-magic fa-fw"></i> <?php _e('Go Back to Express Setup', 'lara-google-analytics'); ?>
88
  </button>
89
  </div>
90
 
97
  <div class="box">
98
  <div class="box-header with-border">
99
  <i class="fa fa-magic fa-fw"></i>
100
+ <h3 class="box-title"><?php _e('Express Setup', 'lara-google-analytics'); ?></h3>
101
  </div>
102
  <div class="box-body">
103
+ <p><?php _e('Click on <b>Get Access Code</b> button below, and a pop-up window will open, asking you to allow <b>Lara, The Google Analytics Widget</b> to access the following:', 'lara-google-analytics'); ?>
104
+ <ul>
105
+ <li>- <b><?php _e('View your Google Analytics data', 'lara-google-analytics'); ?></b></li>
106
+ <li>- <b><?php _e('View Search Console data for your verified sites', 'lara-google-analytics'); ?></b></li>
107
+ </ul>
108
+ <?php _e('Click <b>Allow</b>, then copy and paste the access code here, and click <b>Submit</b>.', 'lara-google-analytics'); ?>
109
+ <br><br><?php _e('If you were asked to login, be sure to use the same email account that is linked to your <b>Google Analytics</b>.', 'lara-google-analytics'); ?>
110
+ <br><?php _e('If you are using the <b>premium</b> version of the plugin, that email account should also be linked to your <b>Google Search Console</b>.', 'lara-google-analytics'); ?>
111
+
112
+ <br><br><a class="btn btn-primary" href="javascript:gauthWindow('https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=789117741534-frb075bn85jk68ufpjg56s08hf85r007.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=https://www.googleapis.com/auth/analytics.readonly&access_type=offline&approval_prompt=force');" ><?php _e('Get Access Code', 'lara-google-analytics'); ?></a>
113
 
114
  </p>
115
 
118
  <input name="client_id" type="hidden" value="789117741534-frb075bn85jk68ufpjg56s08hf85r007.apps.googleusercontent.com">
119
  <input name="client_secret" type="hidden" value="ZkJpBFuNFwv65e36C6mwnihQ">
120
  <div class="form-group">
121
+ <label> <?php _e('Access Code', 'lara-google-analytics'); ?></label>
122
  <div class="input-group">
123
  <div class="input-group-addon">
124
  <i class="fa fa-user fa-fw"></i>
125
  </div>
126
  <input class="form-control" name="code" required="" type="text">
127
  <span class="input-group-btn">
128
+ <button type="submit" class="btn btn-primary btn-flat" ><?php _e('Submit', 'lara-google-analytics'); ?></button>
129
  </span>
130
  </div><!-- /.input group -->
131
  </div>
140
  <div class="box">
141
  <div class="box-header with-border">
142
  <i class="fa fa-gears fa-fw"></i>
143
+ <h3 class="box-title"><?php _e('Advanced Setup', 'lara-google-analytics'); ?></h3>
144
  </div>
145
  <div class="box-body">
146
+ <p><?php _e('By clicking on <b>Start Advanced Setup</b> button below, The setup wizard will guide you through creating and/or configuring your own Google Application.', 'lara-google-analytics'); ?>
147
+ <?php _e('If you want a quick start, or just trying the widget, use the <b>Express Setup</b> on the left.', 'lara-google-analytics'); ?>
148
+ <br><br><a class="btn btn-primary btn-block" href="#" data-reload="lrgawidget_go_advanced"><?php _e('Start Advanced Setup', 'lara-google-analytics'); ?></a>
149
  </div>
150
  </div>
151
  </div>
157
  <form id="lrgawidget-credentials" name="lrgawidget-credentials" role="form">
158
  <input name="action" type="hidden" value="getAuthURL">
159
  <div class="form-group">
160
+ <label><?php _e('Client ID', 'lara-google-analytics'); ?></label>
161
  <div class="input-group">
162
  <div class="input-group-addon">
163
  <i class="fa fa-user fa-fw"></i>
165
  </div><!-- /.input group -->
166
  </div>
167
  <div class="form-group">
168
+ <label><?php _e('Client Secret', 'lara-google-analytics'); ?></label>
169
  <div class="input-group">
170
  <div class="input-group-addon">
171
  <i class="fa fa-lock fa-fw"></i>
173
  </div><!-- /.input group -->
174
  </div>
175
  <div>
176
+ <button class="btn btn-primary" type="submit"><?php _e('Submit', 'lara-google-analytics'); ?></button>
177
  </div>
178
  </form>
179
  </div>
180
  <div class="col-md-6">
181
+ <h2 id="enable-oauth-20-api-access"><?php _e('Create Google APP', 'lara-google-analytics'); ?></h2>
182
+ <p><?php _e('To use the <b>Google Analytics</b> widget, you will need to create a <b>Google App</b> as follows :', 'lara-google-analytics'); ?></p>
183
 
184
  <ol>
185
+ <li><?php _e('Open the <a target="_blank" href="//console.developers.google.com/apis/credentials?project=_">Google Developers Console</a>.', 'lara-google-analytics'); ?></li>
186
+ <li><?php _e('Click on <b>Select a project</b> drop-down, and choose <b>Create a new project</b>.', 'lara-google-analytics'); ?></li>
187
+ <li><?php _e('Enter <b>Lara</b> as the <b>Project name</b>, then click <b>Create</b>.', 'lara-google-analytics'); ?></li>
188
+ <li><?php _e('Select <b>Create credentials</b> and choose <b>OAuth client ID</b>.', 'lara-google-analytics'); ?></li>
189
+ <li><?php _e('Click on <b>Configure consent screen</b> and enter <b>Lara, The Google Analytics Widget</b> as the <b>Product Name</b>, then click <b>Save</b>.', 'lara-google-analytics'); ?></li>
190
+ <li><?php _e('Under <b>Application type</b>, select <b>Other</b>, enter <b>Lara</b> then click <b>Create</b>.', 'lara-google-analytics'); ?></li>
191
+ <li><?php _e('Take note of the <b>client ID</b> & <b>client secret</b> then click <b>Ok</b>.', 'lara-google-analytics'); ?></li>
192
+ <li><?php _e('Open <b>Google Developers Console</b> menu, by clicking on " <i class="fa fa-bars"></i> " and select <b>API Manager</b>.', 'lara-google-analytics'); ?></li>
193
+ <li><?php _e('Click <b>Analytics API</b>, then click <b>Enable API</b>.', 'lara-google-analytics'); ?>
194
+ <li><?php _e('Search for <b>Google Search Console API</b>, then click <b>Enable API</b>.', 'lara-google-analytics'); ?>
195
  </ol>
196
+ <p><?php _e('When done, paste the <b>client ID</b> & <b>client secret</b> here and click <b>Submit</b>.', 'lara-google-analytics'); ?></p>
197
 
198
  </div>
199
  </div>
207
  <input name="client_id" type="hidden" value="">
208
  <input name="client_secret" type="hidden" value="">
209
  <div class="form-group">
210
+ <label><?php _e('Access Code', 'lara-google-analytics'); ?></label>
211
  <div class="input-group">
212
  <div class="input-group-addon">
213
  <i class="fa fa-user fa-fw"></i>
215
  </div><!-- /.input group -->
216
  </div>
217
  <div>
218
+ <button class="btn btn-primary" type="submit"><?php _e('Submit', 'lara-google-analytics'); ?></button>
219
  </div>
220
  </form>
221
  </div>
222
  <div class="col-md-6">
223
+ <h2 id="enable-oauth-20-api-access"><?php _e('Authorize App', 'lara-google-analytics'); ?></h2>
224
+ <p><?php _e('Click on <b>Get Access Code</b> button below, and a pop-up window will open, asking you to allow the <u>app you just created</u> to :', 'lara-google-analytics'); ?>
225
+ <ul>
226
+ <li><b><?php _e('View your Google Analytics data', 'lara-google-analytics'); ?></b></li>
227
+ <li><b><?php _e('View Search Console data for your verified sites', 'lara-google-analytics'); ?></b></li>
228
+ </ul>
229
+ <br><?php _e('Be sure to use the same email account that is linked to your <b>Google Analytics</b> and <b>Google Search Console</b> (formerly, Google Webmaster tools).', 'lara-google-analytics'); ?>
230
+ <br><br><?php _e('Click <b>Allow</b>, then copy and paste the access code here, and click <b>Submit</b>.', 'lara-google-analytics'); ?>
231
  </p>
232
 
233
+ <a class="btn btn-primary" href="#" id="code-btn"><?php _e('Get Access Code', 'lara-google-analytics'); ?></a>
234
  </div>
235
  </div>
236
  </div>
242
  <input name="action" type="hidden" value="setProfileID">
243
  <input name="profile_timezone" type="hidden" value="">
244
  <div class="form-group">
245
+ <label><?php _e('Account', 'lara-google-analytics'); ?></label>
246
  <select class="form-control" style="width: 100%;" id="lrgawidget-accounts" name="account_id">
247
  </select>
248
  </div>
249
  <div class="form-group">
250
+ <label><?php _e('Property', 'lara-google-analytics'); ?></label>
251
  <select class="form-control" style="width: 100%;" id="lrgawidget-properties" name="property_id">
252
  </select>
253
  </div>
254
  <div class="form-group">
255
+ <label><?php _e('View', 'lara-google-analytics'); ?></label>
256
  <select class="form-control" style="width: 100%;" id="lrgawidget-profiles" name="profile_id">
257
  </select>
258
  </div>
264
  }
265
  ?>
266
  <div class="callout" style="padding: 5px;">
267
+ <input name="enable_universal_tracking" <?php echo $is_traching_enabled ?> type="checkbox" style="margin: 0px;" value="on"> <?php _e('Add <b>Google Universal Analytics</b> tracking code to all pages.', 'lara-google-analytics'); ?>
268
  </div>
269
  <div>
270
+ <button class="btn btn-primary" type="submit" id="lrgawidget-save-settings"><?php _e('Save', 'lara-google-analytics'); ?></button>
271
  </div>
272
  </form>
273
  </div>
274
  <div class="col-md-6">
275
  <div>
276
+ <h2 ><?php _e('Profile Details', 'lara-google-analytics'); ?></h2>
277
+ <label><?php _e('Account Name', 'lara-google-analytics'); ?> :</label> <i id="lrgawidget-accname"></i>
278
+ <br><label><?php _e('Property Name', 'lara-google-analytics'); ?> :</label> <i id="lrgawidget-propname"></i>
279
+ <br><label><?php _e('Property WebsiteUrl', 'lara-google-analytics'); ?> :</label> <i id="lrgawidget-propurl"></i>
280
+ <br><label><?php _e('View Name', 'lara-google-analytics'); ?> :</label> <i id="lrgawidget-vname"></i>
281
+ <br><label><?php _e('View Type', 'lara-google-analytics'); ?> :</label> <i id="lrgawidget-vtype"></i>
282
+ <br><label><?php _e('View Time Zone', 'lara-google-analytics'); ?> :</label> <i id="lrgawidget-vtimezone"></i> <i id="lrgawidget-timezone-show-error" class="icon fa fa-warning" style="display:none; color: #f39c12;margin-left: 5px;cursor: pointer;"></i>
283
  <div style="display:none; margin-top: 15px;" id="lrgawidget-timezone-error">
284
  <div class="alert alert-warning">
285
+ <i class="icon fa fa-warning"></i><?php _e('The selected view is using a different timezone than your <b>WordPress</b> timezone, which <u>may</u> cause inaccurate dates/values.', 'lara-google-analytics'); ?>
286
  <div style="margin-left: 25px;margin-top: 10px;">
287
+ <?php _e('View Time Zone', 'lara-google-analytics'); ?> : <b id="lrgawidget-tz-error-vtimezone"></b>
288
  <br> WordPress timezone : <b id="lrgawidget-tz-error-stimezone"></b>
289
  </div>
290
  </div>
291
  </div>
 
292
  </div>
293
+ <div class="hidden" id="lrgawidget-scpurl-message">
294
+ <h2><?php _e('Search Console Property', 'lara-google-analytics'); ?></h2>
295
+ <label><?php _e('Property Url', 'lara-google-analytics'); ?> :</label> <i id="lrgawidget-scpurl"></i>
296
+ <div class="hidden" id="lrgawidget-scpurl-error">
297
+ <div class="alert alert-warning">
298
+ <i class="icon fa fa-warning"></i><?php _e('Please choose a valid <b>Search Console Property URL</b>, or the widget will not be able to get keywords data for your website.', 'lara-google-analytics'); ?>
299
+ <br><br>
300
+ <ol>
301
+ <li> <?php _e('If you cannot find your website, please go to <a href="https://www.google.com/webmasters/tools/" target="_blank">Google Search Console</a> and click on <b>Add a property</b>, to add your website.', 'lara-google-analytics'); ?></li>
302
+ <li> <?php _e('After adding your website to <b>Google Search Console</b> and verifying ownership, clich <b>Reload</b>, to reload the <b>Search Console Property URL</b> menu.', 'lara-google-analytics'); ?></li>
303
+ </ol>
304
+ <span class="pull-right"><a class="btn btn-primary" href="#" data-reload="lrgawidget_reload_tab"><?php _e('Reload', 'lara-google-analytics'); ?></a></span>
305
+ </div>
306
+ </div>
307
+
308
+ </div>
309
  </div>
 
310
  </div>
311
  </div>
312
  </div>
328
  <div class="tab-content" id="lrgawidget_permissions_list">
329
  </div>
330
  <div>
331
+ <button class="btn btn-primary pull-right" type="submit"><i class="fa fa-save fa-fw"></i> <?php _e('Save', 'lara-google-analytics'); ?></button>
332
  </div>
333
  </form>
334
  </div>
349
  <div class="row">
350
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_sessions" data-lrgawidget-plot="sessions">
351
  <div class="description-block border-right">
352
+ <span class="description-text"><?php _e('Sessions', 'lara-google-analytics'); ?></span>
353
  <h5 class="description-header"></h5>
354
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_sessions"></div>
355
  </div><!-- /.description-block -->
356
  </div><!-- /.col -->
357
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_users" data-lrgawidget-plot="users">
358
  <div class="description-block border-right">
359
+ <span class="description-text"><?php _e('Users', 'lara-google-analytics'); ?></span>
360
  <h5 class="description-header"></h5>
361
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_users"></div>
362
  </div><!-- /.description-block -->
363
  </div><!-- /.col -->
364
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_pageviews" data-lrgawidget-plot="pageviews">
365
  <div class="description-block border-right">
366
+ <span class="description-text"><?php _e('Pageviews', 'lara-google-analytics'); ?></span>
367
  <h5 class="description-header"></h5>
368
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_pageviews"></div>
369
  </div><!-- /.description-block -->
370
  </div><!-- /.col -->
371
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_pageviewsPerSession" data-lrgawidget-plot="pageviewsPerSession">
372
  <div class="description-block border-right">
373
+ <span class="description-text"><?php _e('Pages / Session', 'lara-google-analytics'); ?></span>
374
  <h5 class="description-header"></h5>
375
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_pageviewsPerSession"></div>
376
  </div><!-- /.description-block -->
377
  </div>
378
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_avgSessionDuration" data-lrgawidget-plot="avgSessionDuration">
379
  <div class="description-block border-right">
380
+ <span class="description-text"><?php _e('Avg. Session Duration', 'lara-google-analytics'); ?></span>
381
  <h5 class="description-header"></h5>
382
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_avgSessionDuration"></div>
383
  </div><!-- /.description-block -->
384
  </div>
385
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_bounceRate" data-lrgawidget-plot="bounceRate">
386
  <div class="description-block border-right">
387
+ <span class="description-text"><?php _e('Bounce Rate', 'lara-google-analytics'); ?></span>
388
  <h5 class="description-header"></h5>
389
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_bounceRate"></div>
390
  </div><!-- /.description-block -->
391
  </div>
392
  <div class="col-sm-3 col-xs-6 lrgawidget_seven-cols" id="lrgawidget_sb_percentNewSessions" data-lrgawidget-plot="percentNewSessions">
393
  <div class="description-block">
394
+ <span class="description-text"><?php _e('% New Sessions', 'lara-google-analytics'); ?></span>
395
  <h5 class="description-header"></h5>
396
  <div class="lrgawidget_inlinesparkline" id="lrgawidget_spline_percentNewSessions"></div>
397
  </div><!-- /.description-block -->
407
  <div class="col-md-6">
408
  <div>
409
  <table id="lrgawidget_pages_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" >
410
+ <thead><tr><th><?php _e('ID', 'lara-google-analytics'); ?></th><th><?php _e('Page', 'lara-google-analytics'); ?></th><th><?php _e('Pageviews', 'lara-google-analytics'); ?></th><th><?php _e('Percentage', 'lara-google-analytics'); ?></th></tr></thead>
411
  <tbody></tbody>
412
  </table>
413
  </div>
420
  </div>
421
  <?php } ?>
422
 
423
+ <?php if (in_array("lrgawidget_perm_realtime",$globalWidgetPermissions)){ ?>
424
+ <div class="tab-pane" id="lrgawidget_realtime_tab">
425
+ <div class="row" >
426
+ <div class="col-md-6">
427
+ <div id="lrgawidget_realtime_activenow">
428
+ <div class="lrgawidget_realtime_rn"><?php _e('Right now', 'lara-google-analytics'); ?></div>
429
+ <div id="lrgawidget_rttotal"><i class="fa fa-spinner fa-spin"></i></div>
430
+ <div class="lrgawidget_realtime_an"><?php _e('active users on site', 'lara-google-analytics'); ?></div>
431
+ </div>
432
+ <div id="lrgawidget_realtime_dimensions"></div>
433
+ </div>
434
+ <div class="col-md-6 hidden-xs hidden-sm" >
435
+ <div>
436
+ <div><h2><b><?php _e('Top 10 Pages', 'lara-google-analytics'); ?></b></h2></div>
437
+ <table id="lrgawidget_realtime_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" >
438
+ <thead><tr><th><?php _e('ID', 'lara-google-analytics'); ?></th><th><?php _e('Page', 'lara-google-analytics'); ?></th><th><?php _e('Pageviews', 'lara-google-analytics'); ?></th><th><?php _e('Percentage', 'lara-google-analytics'); ?></th></tr></thead>
439
+ <tbody></tbody>
440
+ </table>
441
+ </div>
442
+ </div>
443
+ </div>
444
+ </div>
445
+ <?php } ?>
446
+
447
+ <?php if (in_array("lrgawidget_perm_countries",$globalWidgetPermissions)){ ?>
448
+ <div class="tab-pane" id="lrgawidget_countries_tab">
449
+ <div class="row">
450
+ <div class="col-md-6">
451
+ <div>
452
+ <table id="lrgawidget_countries_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%">
453
+ <thead><tr><th><?php _e('Country', 'lara-google-analytics'); ?></th><th><?php _e('Sessions', 'lara-google-analytics'); ?></th><th><?php _e('Percentage', 'lara-google-analytics'); ?></th></tr></thead>
454
+ <tbody>
455
+ </tbody>
456
+ </table>
457
+ </div>
458
+ </div>
459
+ <div class="col-md-6 hidden-xs hidden-sm" >
460
+ <div id='lrgawidget_countries_chartDiv' style="height: 350px; width: 100%;"></div>
461
+ </div>
462
+ </div>
463
+ </div>
464
+ <?php } ?>
465
+
466
  <?php if (in_array("lrgawidget_perm_browsers",$globalWidgetPermissions)){ ?>
467
  <div class="tab-pane" id="lrgawidget_browsers_tab">
468
  <div class="row">
469
  <div class="col-md-6">
470
  <div>
471
  <table id="lrgawidget_browsers_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" style="cursor:pointer">
472
+ <thead><tr><th><?php _e('ID', 'lara-google-analytics'); ?></th><th><?php _e('Browser', 'lara-google-analytics'); ?></th><th><?php _e('Sessions', 'lara-google-analytics'); ?></th><th><?php _e('Percentage', 'lara-google-analytics'); ?></th></tr></thead>
473
  <tbody></tbody>
474
  </table>
475
  </div>
489
  <div class="col-md-6">
490
  <div>
491
  <table id="lrgawidget_languages_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" >
492
+ <thead><tr><th><?php _e('ID', 'lara-google-analytics'); ?></th><th><?php _e('Language', 'lara-google-analytics'); ?></th><th><?php _e('Sessions', 'lara-google-analytics'); ?></th><th><?php _e('Percentage', 'lara-google-analytics'); ?></th></tr></thead>
493
  <tbody></tbody>
494
  </table>
495
  </div>
509
  <div class="col-md-6">
510
  <div>
511
  <table id="lrgawidget_os_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" style="cursor:pointer">
512
+ <thead><tr><th><?php _e('ID', 'lara-google-analytics'); ?></th><th><?php _e('Operating System', 'lara-google-analytics'); ?></th><th><?php _e('Sessions', 'lara-google-analytics'); ?></th><th><?php _e('Percentage', 'lara-google-analytics'); ?></th></tr></thead>
513
  <tbody></tbody>
514
  </table>
515
  </div>
528
  <div class="col-md-6">
529
  <div>
530
  <table id="lrgawidget_devices_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" style="cursor:pointer">
531
+ <thead><tr><th><?php _e('ID', 'lara-google-analytics'); ?></th><th><?php _e('Device Type', 'lara-google-analytics'); ?></th><th><?php _e('Sessions', 'lara-google-analytics'); ?></th><th><?php _e('Percentage', 'lara-google-analytics'); ?></th></tr></thead>
532
  <tbody></tbody>
533
  </table>
534
  </div>
547
  <div class="col-md-6">
548
  <div>
549
  <table id="lrgawidget_screenres_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" >
550
+ <thead><tr><th><?php _e('ID', 'lara-google-analytics'); ?></th><th><?php _e('Screen Resolution', 'lara-google-analytics'); ?></th><th><?php _e('Sessions', 'lara-google-analytics'); ?></th><th><?php _e('Percentage', 'lara-google-analytics'); ?></th></tr></thead>
551
  <tbody></tbody>
552
  </table>
553
  </div>
559
  </div>
560
  </div>
561
  <?php } ?>
562
+
563
+ <?php if (in_array("lrgawidget_perm_keywords",$globalWidgetPermissions)){ ?>
564
+ <div class="tab-pane" id="lrgawidget_keywords_tab">
565
+ <div class="row" >
566
+ <div class="col-md-6">
567
+ <div>
568
+ <table id="lrgawidget_keywords_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" >
569
+ <thead><tr><th><?php _e('ID', 'lara-google-analytics'); ?></th><th><?php _e('Keyword', 'lara-google-analytics'); ?></th><th><?php _e('Clicks', 'lara-google-analytics'); ?></th><th><?php _e('Impressions', 'lara-google-analytics'); ?></th><th><?php _e('CTR', 'lara-google-analytics'); ?></th><th><?php _e('Position', 'lara-google-analytics'); ?></th></tr></thead>
570
+ <tbody></tbody>
571
+ </table>
572
+ </div>
573
+
574
+ <div class="callout" style="margin: 5px 0 0 0; padding: 5px;">
575
+ * <?php _e('<b>Position</b> is the average ranking of your website URLs for that query or keyword, on Google search results.', 'lara-google-analytics'); ?>
576
+ </div>
577
+
578
+ </div>
579
+ <div class="col-md-6 hidden-xs hidden-sm" >
580
+ <canvas id="lrgawidget_keywords_chartDiv" width="350px" height="350px"></canvas>
581
+ <div id='lrgawidget_keywords_legendDiv'></div>
582
+ <div class="pull-right"><img src="<?php echo lrgawidget_plugin_dist_dir.'/img/google-search-console.png'; ?>"></div>
583
+ </div>
584
+ </div>
585
+ </div>
586
+ <?php } ?>
587
+
588
+ <?php if (in_array("lrgawidget_perm_sources",$globalWidgetPermissions)){ ?>
589
+ <div class="tab-pane" id="lrgawidget_sources_tab">
590
+ <div class="row" >
591
+ <div class="col-md-6">
592
+ <div>
593
+ <table id="lrgawidget_sources_dataTable" class="table table-bordered table-hover" cellspacing="0" width="100%" >
594
+ <thead><tr><th><?php _e('ID', 'lara-google-analytics'); ?></th><th><?php _e('Source', 'lara-google-analytics'); ?></th><th><?php _e('Sessions', 'lara-google-analytics'); ?></th><th><?php _e('Percentage', 'lara-google-analytics'); ?></th></tr></thead>
595
+ <tbody></tbody>
596
+ </table>
597
+ </div>
598
+ </div>
599
+ <div class="col-md-6 hidden-xs hidden-sm" >
600
+ <canvas id="lrgawidget_sources_chartDiv" width="350px" height="350px"></canvas>
601
+ <div id='lrgawidget_sources_legendDiv'></div>
602
+ </div>
603
+ </div>
604
+ </div>
605
+ <?php } ?>
606
  <style>
607
 
608
  #lrgawidget_gopro_tab .lrga_gpro_clr1 { color: #eaeaea }
714
  color: #FDDC00;
715
  }
716
 
 
 
 
 
717
  #lrgawidget_gopro_tab .lrga_gpro_features i{
718
  margin-bottom:10px;
719
 
727
  <div class="row">
728
  <div class="col-md-12">
729
  <div class="lrga_gpro_header">
730
+ <p class='lrga_gpro_headerh'><i class="fa fa-unlock fa-fw"></i> <?php _e('Go Premium !', 'lara-google-analytics'); ?></p>
731
+ <p><?php _e('Buy the Premium version and get access to these amazing features', 'lara-google-analytics'); ?></p>
732
  </div>
733
  </div>
734
  </div>
737
 
738
  <div class="col-md-12 lrga_gpro_featured">
739
  <ul class="fa-ul" style="margin-top: 5px;margin-bottom: 5px;">
740
+ <li><i class="fa-li fa fa-sitemap fa-lg fa-fw"></i><b><?php _e('Multisite Multi-Network enabled : </b>Every blog/site in your network can has its own analytics tracking code and dashboard widget.', 'lara-google-analytics'); ?></li>
741
+ <li><i class="fa-li fa fa-key fa-lg fa-fw"></i><b><?php _e('Permissions : </b>Easily control which data is viwed by your blog admins and users (also compatible with Multisite Multi-Network).', 'lara-google-analytics'); ?></li>
742
  </ul>
743
  </div>
744
 
745
  <div class="col-md-6">
746
  <ul class="fa-ul">
747
+ <li><i class="fa-li fa fa-search fa-lg fa-fw"></i><?php _e('Keywords ( provided by Google Search Console).', 'lara-google-analytics'); ?></li>
748
+ <li><i class="fa-li fa fa-clock-o fa-lg fa-fw"></i><?php _e('Real Time site visitors', 'lara-google-analytics'); ?> </li>
749
+ <li><i class="fa-li fa fa-external-link-square fa-lg fa-fw"></i><?php _e('Traffic sources.', 'lara-google-analytics'); ?></li>
750
+ <li><i class="fa-li fa fa-globe fa-lg fa-fw"></i><?php _e('Visitors Countries', 'lara-google-analytics'); ?>.</li>
751
  </ul>
752
  </div>
753
  <div class="col-md-6">
754
  <ul class="fa-ul">
755
+ <li><i class="fa-li fa fa-list-alt fa-lg fa-fw"></i><?php _e('Browsers versions (IE 6, IE 7 .. etc.).', 'lara-google-analytics'); ?></li>
756
+ <li><i class="fa-li fa fa-desktop fa-lg fa-fw"></i><?php _e('Operating Systems versions (Windows 7, Windows 8 .. etc.).', 'lara-google-analytics'); ?></li>
757
+ <li><i class="fa-li fa fa-mobile fa-lg fa-fw"></i><?php _e('Device Types and brands (Samsung, Apple .. etc.).', 'lara-google-analytics'); ?></li>
758
  </ul>
759
  </div>
760
  </div>
762
  <div class="col-md-6 text-center">
763
  <div class="lrga_gpro_feature lrga_gpro_boxtopb">
764
  <span class="fa-stack fa-2x"><i class="fa fa-circle fa-stack-2x lrga_gpro_clr3"></i> <i class="fa fa-circle-thin lrga_gpro_clr1"></i> <i class="fa fa-calendar fa-stack-1x "></i></span>
765
+ <h4><?php _e('Check any Date Range, not just the last 30 days', 'lara-google-analytics'); ?></h4>
766
  </div>
767
  </div>
768
  <div class="col-md-6 text-center">
769
  <div class="lrga_gpro_feature lrga_gpro_boxtopb">
770
  <span class="fa-stack fa-2x"><i class="fa fa-circle fa-stack-2x lrga_gpro_clr3"></i> <i class="fa fa-circle-thin lrga_gpro_clr1"></i> <i class="fa fa-refresh fa-stack-1x "></i></span>
771
+ <h4><?php _e('12 Months of Free Updates and Support', 'lara-google-analytics'); ?></h4>
772
  </div>
773
  </div>
774
  </div><br>
775
  <div class="row">
776
  <div class="col-md-12">
777
  <div class="lrga_gpro_demo lrga_gpro_boxtopb">
778
+ <p class="lrga_gpro_clr6"><?php _e('Check the<strong> Demo</strong> to see exactly how the premium version looks like, and what you will get from it without leaving your wordpress dashboard', 'lara-google-analytics'); ?> &nbsp;
779
  <div>
780
  <a class="lrgawidget_view_demo" href="https://wpdemo.whmcsadmintheme.com/demo.php?utm_source=InApp&utm_medium=Launch_Demo" title="Fully working Demo .. When done, press ESC to close this window.">
781
+ <button class="btn btn-warning" type="button"><i aria-hidden="true" class="fa fa-chevron-right"></i> <strong><?php _e('Launch Demo', 'lara-google-analytics'); ?></strong></button>
782
  </a>
783
  </div>
784
  </p>
788
  <div class="row" style="margin-bottom:15px;">
789
  <div class="col-md-12 text-center">
790
  <a href="https://clients.xtraorbit.com/cart.php?a=add&pid=3&utm_source=InApp&utm_medium=Buy_Now" target="_blank">
791
+ <button class="btn btn-danger" type="button"><i aria-hidden="true" class="fa fa-shopping-cart"></i> <strong><?php _e('Buy Now', 'lara-google-analytics'); ?></strong></button>
792
  </a>
793
  <a href="https://www.xtraorbit.com/wordpress-google-analytics-dashboard-widget/?utm_source=InApp&utm_medium=Premium_Features" target="_blank">
794
+ <button class="btn lrga_gpro_btn_dark" type="button"><i aria-hidden="true" class="fa fa-external-link"></i> <strong><?php _e('View all premuim features details', 'lara-google-analytics'); ?></strong></button>
795
  </a>
796
  <img style="margin-top:35px;" alt="" class=" img-responsive center-block" src="<?php echo lrgawidget_plugin_dist_dir.'/img/xo_payments.png'; ?>"></div>
797
  </div>
800
  <div class="row">
801
  <div class="col-lg-12 text-center">
802
  <div class="lrga_gpro_who">
803
+ <h4><strong><?php _e('Who we are & What we do', 'lara-google-analytics'); ?></strong></h4><br><img alt="" class=" img-responsive center-block" src="<?php echo lrgawidget_plugin_dist_dir.'/img/xtraorbit_logo.png'; ?>"><br>
804
+ <p><?php _e('<b>XtraOrbit</b> has been providing a wide range of services <b>since 2002</b>, including <b>Web Hosting</b>, <b>Domain Names</b> & <b>Web Development</b>.', 'lara-google-analytics'); ?></p>
805
+ <p><?php _e('We mix creativity with imagination, responsibility with passion, and resourcefulness with fun. That is what we do everyday within our company.', 'lara-google-analytics'); ?></p>
806
  <a href="https://www.xtraorbit.com/?utm_source=InApp&utm_medium=Check_Us" target="_blank">
807
+ <button class="btn lrga_gpro_btn_dark" type="button"><i aria-hidden="true" class="fa fa-external-link"></i> <strong><?php _e('Come, check us out!', 'lara-google-analytics'); ?></strong></button>
808
  </a>
809
  <br><br>
810
  </div>
814
  <div class="col-lg-6 text-center">
815
  <div class="lrga_gpro_support">
816
  <span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x lrga_gpro_clr3"></i> <i class="fa fa-circle-thin fa-stack-2x lrga_gpro_clr4"></i> <i class="fa fa-thumbs-up fa-stack-1x lrga_gpro_clr5"></i></span>
817
+ <h4><strong><?php _e('Rate Us', 'lara-google-analytics'); ?></strong></h4>
818
+ <p><?php _e('If you have a free moment, and want to help us spread the word and boost our motivation, please do us a BIG favour and give us 5 Stars rating on wordpress .. The more reviews we get, the more cool features we will add to the plugin :)', 'lara-google-analytics'); ?></p>
819
  <a href="https://wordpress.org/support/plugin/lara-google-analytics/reviews/" target="_blank">
820
+ <button class="btn btn-default" id="rating" type="button"><?php _e('Let\'s do it, You deserve it', 'lara-google-analytics'); ?> <div><i aria-hidden="true" class="fa fa-star"></i> <i aria-hidden="true" class="fa fa-star"></i> <i aria-hidden="true" class="fa fa-star"></i> <i aria-hidden="true" class="fa fa-star"></i> <i aria-hidden="true" class="fa fa-star"></i></div></button>
821
  </a>
822
  </div>
823
  </div>
824
  <div class="col-lg-6 text-center">
825
  <div class="lrga_gpro_support">
826
  <span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x lrga_gpro_clr3"></i> <i class="fa fa-circle-thin fa-stack-2x lrga_gpro_clr4"></i> <i class="fa fa-question-circle fa-stack-1x lrga_gpro_clr5"></i></span>
827
+ <h4><strong><?php _e('Help & Support', 'lara-google-analytics'); ?></strong></h4><small></small>
828
+ <p><?php _e('If you are facing any issues, need support or have a new feature request, visit the official plugin support forum, where you will be able to submit a support ticket.', 'lara-google-analytics'); ?></p>
829
  <a href="https://wordpress.org/support/plugin/lara-google-analytics/" target="_blank">
830
+ <button class="btn btn-default" type="button"><i aria-hidden="true" class="fa fa-question-circle lrga_gpro_clr4"></i> <?php _e('Support Center', 'lara-google-analytics'); ?></button>
831
  </a>
832
  </div>
833
  </div>
848
  <?php if (!empty($actLrgaTabs[0])){ ?>
849
  <script type="text/javascript">
850
  var actLrgaTabs = '<?php echo $actLrgaTabs[0]; ?>';
851
+ var lrdataTableLang = { "sEmptyTable": <?php echo '"'.__('No data available in table', 'lara-google-analytics').'"'; ?>,
852
+ "sInfo": <?php echo '"'.__('Showing _START_ to _END_ of _TOTAL_ entries', 'lara-google-analytics').'"'; ?>,
853
+ "sInfoEmpty": <?php echo '"'.__('Showing 0 to 0 of 0 entries', 'lara-google-analytics').'"'; ?>,
854
+ "sInfoFiltered": <?php echo '"'.__('(filtered from _MAX_ total entries)', 'lara-google-analytics').'"'; ?>,
855
+ "sInfoPostFix": "",
856
+ "sInfoThousands": ",",
857
+ "sLengthMenu": <?php echo '"'.__('Show _MENU_ entries', 'lara-google-analytics').'"'; ?>,
858
+ "sLoadingRecords": <?php echo '"'.__('Loading...', 'lara-google-analytics').'"'; ?>,
859
+ "sProcessing": <?php echo '"'.__('Processing...', 'lara-google-analytics').'"'; ?>,
860
+ "sSearch": <?php echo '"'.__('Search:', 'lara-google-analytics').'"'; ?>,
861
+ "sZeroRecords": <?php echo '"'.__('No matching records found', 'lara-google-analytics').'"'; ?>,
862
+ "oPaginate": {
863
+ "sFirst": <?php echo '"'.__('First', 'lara-google-analytics').'"'; ?>,
864
+ "sLast": <?php echo '"'.__('Last', 'lara-google-analytics').'"'; ?>,
865
+ "sNext": <?php echo '"'.__('Next', 'lara-google-analytics').'"'; ?>,
866
+ "sPrevious": <?php echo '"'.__('Previous', 'lara-google-analytics').'"'; ?>
867
+ },
868
+ "oAria": {
869
+ "sSortAscending": <?php echo '"'.__(': activate to sort column ascending', 'lara-google-analytics').'"'; ?>,
870
+ "sSortDescending": <?php echo '"'.__(': activate to sort column descending', 'lara-google-analytics').'"'; ?>
871
+ }
872
+ };
873
+ var lrwidgetenLang = { resetmsg : <?php echo '"'.__('All saved authentication data will be removed. Do you want to continue ?!', 'lara-google-analytics').'"'; ?>,
874
+ setuprequired : <?php echo '"'.__('Initial Setup Required! - Please contact an administratior to complete the widget setup.', 'lara-google-analytics').'"'; ?>,
875
+ selectproperty : <?php echo '"'.__('Select Property URL', 'lara-google-analytics').'"'; ?>,
876
+ emptygaconsole : <?php echo '"'.__('No data available in table. <span class=\'pull-left\'><ul><li>Did you <a href=\'https://support.google.com/webmasters/answer/34592?hl=en\' target=\'_blank\'>add your website to Google Search Console</a> ?</li><li>After adding your website to Google Search Console, did you save it as the <b>Search Console Property URL</b> in the widget <b>Settings</b> tab ?</li><li>If you have added your website recently, keywords may take some time to appear.</li></ul></span>', 'lara-google-analytics').'"'; ?>,
877
+ lastsevendays : <?php echo '"'.__('Last 7 Days', 'lara-google-analytics').'"'; ?>,
878
+ lastthirtydays : <?php echo '"'.__('Last 30 Days', 'lara-google-analytics').'"'; ?>,
879
+ thismonth : <?php echo '"'.__('This Month', 'lara-google-analytics').'"'; ?>,
880
+ lastmonth : <?php echo '"'.__('Last Month', 'lara-google-analytics').'"'; ?>,
881
+ cached : <?php echo '"'.__('cached', 'lara-google-analytics').'"'; ?>,
882
+ realtime : <?php echo '"'.__('Real Time', 'lara-google-analytics').'"'; ?>,
883
+ inactive : <?php echo '"'.__('inactive', 'lara-google-analytics').'"'; ?>,
884
+ total : <?php echo '"'.__('Total', 'lara-google-analytics').'"'; ?>,
885
+ noactiveusers : <?php echo '"'.__('No active users', 'lara-google-analytics').'"'; ?>
886
+ };
887
+
888
+ var lrwidgetDateLang = { "format": "MM/DD/YYYY",
889
+ "separator": " - ",
890
+ "applyLabel": <?php echo '"'.__('Apply', 'lara-google-analytics').'"'; ?>,
891
+ "cancelLabel": <?php echo '"'.__('Cancel', 'lara-google-analytics').'"'; ?>,
892
+ "fromLabel": <?php echo '"'.__('From', 'lara-google-analytics').'"'; ?>,
893
+ "toLabel": <?php echo '"'.__('To', 'lara-google-analytics').'"'; ?>,
894
+ "customRangeLabel": <?php echo '"'.__('Custom Range', 'lara-google-analytics').'"'; ?>,
895
+ "weekLabel": <?php echo '"'.__('W', 'lara-google-analytics').'"'; ?>,
896
+ "daysOfWeek": [
897
+ <?php echo '"'.__('Su', 'lara-google-analytics').'"'; ?>,
898
+ <?php echo '"'.__('Mo', 'lara-google-analytics').'"'; ?>,
899
+ <?php echo '"'.__('Tu', 'lara-google-analytics').'"'; ?>,
900
+ <?php echo '"'.__('We', 'lara-google-analytics').'"'; ?>,
901
+ <?php echo '"'.__('Th', 'lara-google-analytics').'"'; ?>,
902
+ <?php echo '"'.__('Fr', 'lara-google-analytics').'"'; ?>,
903
+ <?php echo '"'.__('Sa', 'lara-google-analytics').'"'; ?>
904
+ ],
905
+ "monthNames": [
906
+ <?php echo '"'.__('January', 'lara-google-analytics').'"'; ?>,
907
+ <?php echo '"'.__('February', 'lara-google-analytics').'"'; ?>,
908
+ <?php echo '"'.__('March', 'lara-google-analytics').'"'; ?>,
909
+ <?php echo '"'.__('April', 'lara-google-analytics').'"'; ?>,
910
+ <?php echo '"'.__('May', 'lara-google-analytics').'"'; ?>,
911
+ <?php echo '"'.__('June', 'lara-google-analytics').'"'; ?>,
912
+ <?php echo '"'.__('July', 'lara-google-analytics').'"'; ?>,
913
+ <?php echo '"'.__('August', 'lara-google-analytics').'"'; ?>,
914
+ <?php echo '"'.__('September', 'lara-google-analytics').'"'; ?>,
915
+ <?php echo '"'.__('October', 'lara-google-analytics').'"'; ?>,
916
+ <?php echo '"'.__('November', 'lara-google-analytics').'"'; ?>,
917
+ <?php echo '"'.__('December', 'lara-google-analytics').'"'; ?>
918
+ ],
919
+ "firstDay": 1
920
+ };
921
+
922
+
923
  </script>
924
  <?php } ?>