Google Analytics for WordPress by MonsterInsights - Version 5.4.1

Version Description

Release Date: April 21th, 2015

  • Bugfixes:
    • Fixes a bug where GA API was being pinged too often.
    • Fixes a bug where users were unable to authenticate with Google Analytics. It might take a while for authentication to work again, as the API key within the plugin has to be within its quota limits again. Were very sorry for the inconvenience. Note that for Premium users everything still works.
Download this release

Release Info

Developer omarreiss
Plugin Icon 128x128 Google Analytics for WordPress by MonsterInsights
Version 5.4.1
Comparing to
See all releases

Code changes from version 5.4 to 5.4.1

Files changed (68) hide show
  1. admin/class-admin-form.php +1 -1
  2. admin/class-admin-menu.php +2 -4
  3. admin/class-admin-settings-fields.php +0 -184
  4. admin/class-admin-settings-registrar.php +0 -629
  5. admin/class-admin.php +255 -67
  6. admin/class-google-analytics.php +3 -1
  7. admin/dashboards/class-admin-dashboards.php +1 -1
  8. admin/pages/dashboard.php +1 -1
  9. admin/pages/settings-api.php +0 -123
  10. admin/pages/settings.php +165 -0
  11. admin/views/custom-dimensions-upsell.php +0 -21
  12. assets/css/yoast_ga_styles.css +0 -4
  13. assets/css/yoast_ga_styles.min.css +1 -1
  14. assets/js/yoast_ga_admin.js +0 -21
  15. assets/js/yoast_ga_admin.min.js +1 -1
  16. googleanalytics.php +4 -5
  17. includes/class-options.php +27 -1
  18. includes/{class-options-utils.php → class-settings.php} +5 -17
  19. languages/google-analytics-for-wordpress-da_DK.mo +0 -0
  20. languages/google-analytics-for-wordpress-de_DE.mo +0 -0
  21. languages/google-analytics-for-wordpress-en_GB.mo +0 -0
  22. languages/google-analytics-for-wordpress-es_ES.mo +0 -0
  23. languages/google-analytics-for-wordpress-es_MX.mo +0 -0
  24. languages/google-analytics-for-wordpress-fr_FR.mo +0 -0
  25. languages/google-analytics-for-wordpress-he_IL.mo +0 -0
  26. languages/google-analytics-for-wordpress-it_IT.mo +0 -0
  27. languages/google-analytics-for-wordpress-nb_NO.mo +0 -0
  28. languages/google-analytics-for-wordpress-nl_NL.mo +0 -0
  29. languages/google-analytics-for-wordpress-pl_PL.mo +0 -0
  30. languages/google-analytics-for-wordpress-pt_BR.mo +0 -0
  31. languages/google-analytics-for-wordpress-ru_RU.mo +0 -0
  32. languages/google-analytics-for-wordpress-sv_SE.mo +0 -0
  33. languages/google-analytics-for-wordpress-tr_TR.mo +0 -0
  34. languages/google-analytics-for-wordpress.pot +268 -283
  35. readme.txt +12 -4
  36. vendor/autoload.php +1 -1
  37. vendor/autoload_52.php +1 -1
  38. vendor/composer/autoload_classmap.php +1 -3
  39. vendor/composer/autoload_real.php +4 -4
  40. vendor/composer/autoload_real_52.php +3 -3
  41. vendor/composer/installed.json +5 -5
  42. vendor/xrstf/composer-php52/.hg/00changelog.i +0 -0
  43. vendor/xrstf/composer-php52/.hg/branch +0 -1
  44. vendor/xrstf/composer-php52/.hg/cache/branch2-served +0 -4
  45. vendor/xrstf/composer-php52/.hg/cache/rbc-names-v1 +0 -0
  46. vendor/xrstf/composer-php52/.hg/cache/rbc-revs-v1 +0 -0
  47. vendor/xrstf/composer-php52/.hg/dirstate +0 -0
  48. vendor/xrstf/composer-php52/.hg/hgrc +0 -14
  49. vendor/xrstf/composer-php52/.hg/requires +0 -4
  50. vendor/xrstf/composer-php52/.hg/store/00changelog.i +0 -0
  51. vendor/xrstf/composer-php52/.hg/store/00manifest.i +0 -0
  52. vendor/xrstf/composer-php52/.hg/store/data/_l_i_c_e_n_s_e.i +0 -0
  53. vendor/xrstf/composer-php52/.hg/store/data/_r_e_a_d_m_e.md.i +0 -0
  54. vendor/xrstf/composer-php52/.hg/store/data/composer.json.i +0 -0
  55. vendor/xrstf/composer-php52/.hg/store/data/lib/xrstf/_composer52/_autoload_generator.php.i +0 -0
  56. vendor/xrstf/composer-php52/.hg/store/data/lib/xrstf/_composer52/_class_loader.php.i +0 -0
  57. vendor/xrstf/composer-php52/.hg/store/data/lib/xrstf/_composer52/_generator.php.i +0 -0
  58. vendor/xrstf/composer-php52/.hg/store/data/~2ehgtags.i +0 -0
  59. vendor/xrstf/composer-php52/.hg/store/fncache +0 -7
  60. vendor/xrstf/composer-php52/.hg/store/phaseroots +0 -0
  61. vendor/xrstf/composer-php52/.hg/store/undo +0 -0
  62. vendor/xrstf/composer-php52/.hg/store/undo.backupfiles +0 -0
  63. vendor/xrstf/composer-php52/.hg/store/undo.phaseroots +0 -0
  64. vendor/xrstf/composer-php52/.hg/undo.bookmarks +0 -0
  65. vendor/xrstf/composer-php52/.hg/undo.branch +0 -1
  66. vendor/xrstf/composer-php52/.hg/undo.desc +0 -3
  67. vendor/xrstf/composer-php52/.hg/undo.dirstate +0 -0
  68. vendor/xrstf/composer-php52/.hg_archival.txt +5 -0
admin/class-admin-form.php CHANGED
@@ -270,7 +270,7 @@ class Yoast_GA_Admin_Form {
270
  * @return string
271
  */
272
  private static function label( $id, $title, $type ) {
273
- return '<label class="ga-form ga-form-' . $type . '-label ga-form-label-left" id="yoast-ga-form-label-' . $type . '-' . self::$form_namespace . '-' . $id . '">' . $title . ':</label>';
274
  }
275
 
276
  /**
270
  * @return string
271
  */
272
  private static function label( $id, $title, $type ) {
273
+ return '<label for="' . 'yoast-ga-form-' . $type . '-' . self::$form_namespace . '-' . $id . '" class="ga-form ga-form-' . $type . '-label ga-form-label-left" id="yoast-ga-form-label-' . $type . '-' . self::$form_namespace . '-' . $id . '">' . $title . ':</label>';
274
  }
275
 
276
  /**
admin/class-admin-menu.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @package GoogleAnalytics\AdminMenu
4
  */
5
 
6
  /**
@@ -44,7 +44,7 @@ class Yoast_GA_Admin_Menu {
44
  add_action( 'network_admin_menu', array( $this, 'create_admin_menu' ), 5 );
45
  }
46
 
47
- $this->dashboards_disabled = Yoast_GA_Options_Utils::get_instance()->dashboards_disabled();
48
  $this->parent_slug = ( ( $this->dashboards_disabled ) ? 'yst_ga_settings' : 'yst_ga_dashboard' );
49
  }
50
 
@@ -164,7 +164,6 @@ class Yoast_GA_Admin_Menu {
164
  private function add_submenu_page( $submenu_page ) {
165
  $page = add_submenu_page( $submenu_page['parent_slug'], $submenu_page['page_title'], $submenu_page['menu_title'], $submenu_page['capability'], $submenu_page['menu_slug'], $submenu_page['submenu_function'] );
166
  $is_dashboard = ( 'yst_ga_dashboard' === $submenu_page['menu_slug'] );
167
-
168
  $this->add_assets( $page, $is_dashboard );
169
  }
170
 
@@ -176,7 +175,6 @@ class Yoast_GA_Admin_Menu {
176
  */
177
  private function add_assets( $page, $is_dashboard ) {
178
  add_action( 'admin_print_styles-' . $page, array( 'Yoast_GA_Admin_Assets', 'enqueue_styles' ) );
179
-
180
  add_action( 'admin_print_styles-' . $page, array( 'Yoast_GA_Admin_Assets', 'enqueue_settings_styles' ) );
181
  add_action( 'admin_print_scripts-' . $page, array( 'Yoast_GA_Admin_Assets', 'enqueue_scripts' ) );
182
  if ( ! $is_dashboard && filter_input( INPUT_GET, 'page' ) === 'yst_ga_dashboard' ) {
1
  <?php
2
  /**
3
+ * @package GoogleAnalytics\Admin
4
  */
5
 
6
  /**
44
  add_action( 'network_admin_menu', array( $this, 'create_admin_menu' ), 5 );
45
  }
46
 
47
+ $this->dashboards_disabled = Yoast_GA_Settings::get_instance()->dashboards_disabled();
48
  $this->parent_slug = ( ( $this->dashboards_disabled ) ? 'yst_ga_settings' : 'yst_ga_dashboard' );
49
  }
50
 
164
  private function add_submenu_page( $submenu_page ) {
165
  $page = add_submenu_page( $submenu_page['parent_slug'], $submenu_page['page_title'], $submenu_page['menu_title'], $submenu_page['capability'], $submenu_page['menu_slug'], $submenu_page['submenu_function'] );
166
  $is_dashboard = ( 'yst_ga_dashboard' === $submenu_page['menu_slug'] );
 
167
  $this->add_assets( $page, $is_dashboard );
168
  }
169
 
175
  */
176
  private function add_assets( $page, $is_dashboard ) {
177
  add_action( 'admin_print_styles-' . $page, array( 'Yoast_GA_Admin_Assets', 'enqueue_styles' ) );
 
178
  add_action( 'admin_print_styles-' . $page, array( 'Yoast_GA_Admin_Assets', 'enqueue_settings_styles' ) );
179
  add_action( 'admin_print_scripts-' . $page, array( 'Yoast_GA_Admin_Assets', 'enqueue_scripts' ) );
180
  if ( ! $is_dashboard && filter_input( INPUT_GET, 'page' ) === 'yst_ga_dashboard' ) {
admin/class-admin-settings-fields.php DELETED
@@ -1,184 +0,0 @@
1
- <?php
2
- /**
3
- * @package GoogleAnalytics\AdminSettingsFields
4
- */
5
-
6
- /**
7
- * Class Yoast_GA_Admin_Settings_Fields
8
- */
9
- class Yoast_GA_Admin_Settings_Fields {
10
-
11
- /**
12
- * @var array
13
- */
14
- private static $options = array();
15
-
16
- /**
17
- * Render a text field
18
- *
19
- * @param array $args Add arguments for the text field
20
- */
21
- public static function yst_ga_text_field( $args ) {
22
- self::set_options();
23
- self::before_input( $args );
24
-
25
- echo '<input type="text" name="yst_ga[ga_general][' . $args['key'] . ']" id="' . $args['label_for'] . '" value="' . esc_attr( self::$options[ $args['key'] ] ) . '" class="ga-form-text">';
26
- }
27
-
28
- /**
29
- * Render a text field
30
- *
31
- * @param array $args Add arguments for the text field
32
- */
33
- public static function yst_ga_textarea_field( $args ) {
34
- self::set_options();
35
- self::before_input( $args );
36
-
37
- $value = self::$options[ $args['key'] ];
38
- if ( $args['key'] !== 'custom_code' ) {
39
- $value = esc_attr( $value );
40
- }
41
-
42
- echo '<textarea name="yst_ga[ga_general][' . $args['key'] . ']" id="' . $args['label_for'] . '" rows="5" cols="60">' . $value . '</textarea>';
43
- }
44
-
45
- /**
46
- * Render a text field
47
- *
48
- * @param array $args Add arguments for the text field
49
- */
50
- public static function yst_ga_checkbox_field( $args ) {
51
- self::set_options();
52
- self::before_input( $args );
53
-
54
- echo '<input type="checkbox" name="yst_ga[ga_general][' . $args['key'] . ']" id="' . $args['label_for'] . '" value="1" ' . checked( self::$options[ $args['key'] ], 1, false ) . '>';
55
- }
56
-
57
- /**
58
- * Render a select field
59
- *
60
- * @param array $args Add arguments for the text field
61
- */
62
- public static function yst_ga_select_field( $args ) {
63
- self::set_options();
64
-
65
- $options = null;
66
- $class = null;
67
- $name_addition = null;
68
-
69
- if ( isset( $args['class'] ) ) {
70
- $class = ' class="' . $args['class'] . '"';
71
- }
72
-
73
- if ( ! isset( $args['attributes'] ) ) {
74
- $args['attributes'] = null;
75
- }
76
-
77
- if ( $args['key'] === 'ignore_users' ) {
78
- $name_addition = '[]';
79
- }
80
-
81
- foreach ( $args['options'] as $option ) {
82
- if ( is_array( self::$options[ $args['key'] ] ) ) {
83
- if ( in_array( $option['id'], self::$options[ $args['key'] ] ) ) {
84
- $options .= '<option value="' . esc_attr( $option['id'] ) . '" selected="selected">' . esc_attr( $option['name'] ) . '</option>';
85
- continue;
86
- }
87
-
88
- $options .= '<option value="' . esc_attr( $option['id'] ) . '">' . esc_attr( $option['name'] ) . '</option>';
89
- continue;
90
- }
91
-
92
- $options .= '<option value="' . esc_attr( $option['id'] ) . '" ' . selected( $option['id'], self::$options[ $args['key'] ], false ) . '>' . esc_attr( $option['name'] ) . '</option>';
93
- }
94
-
95
- echo self::show_help( 'id-' . $args['key'], $args['help'] ) . '<select id="' . $args['label_for'] . '" name="yst_ga[ga_general][' . $args['key'] . ']' . $name_addition . '"' . $class . $args['attributes'] . '>' . $options . '</select>';
96
- }
97
-
98
- /**
99
- * Render a select field
100
- *
101
- * @param array $args Add arguments for the text field
102
- */
103
- public static function yst_ga_select_profile_field( $args ) {
104
- self::set_options();
105
-
106
- $options = null;
107
- $class = null;
108
-
109
- if ( isset( $args['class'] ) ) {
110
- $class = ' class="' . $args['class'] . '"';
111
- }
112
-
113
- if ( ! isset( $args['attributes'] ) ) {
114
- $args['attributes'] = null;
115
- }
116
-
117
- foreach ( $args['options'] as $option ) {
118
- foreach ( $option['items'] as $optgroup ) {
119
- $options .= '<optgroup label="' . esc_attr( $optgroup['name'] ) . '">';
120
-
121
- foreach ( $optgroup['items'] as $item ) {
122
- $options .= '<option value="' . esc_attr( $item['id'] ) . '" ' . selected( $item['id'], self::$options[ $args['key'] ], false ) . '>' . esc_attr( $item['name'] ) . '</option>';
123
- }
124
-
125
- $options .= '</optgroup>';
126
- }
127
- }
128
-
129
- echo self::show_help( 'id-' . $args['key'], $args['help'] ) . '<select id="' . $args['label_for'] . '" name="yst_ga[ga_general][' . $args['key'] . ']"' . $class . $args['attributes'] . ' data-placeholder="' . __( 'Select a profile', 'google-analytics-for-wordpress' ) . '" ><option></option>' . $options . '</select>';
130
- }
131
-
132
-
133
- /**
134
- * Cache the options in this class, so check if they're set
135
- */
136
- private static function set_options() {
137
- if ( self::$options === array() ) {
138
- $options = get_option( 'yst_ga' );
139
-
140
- if ( ! isset( $options['ga_general'] ) ) {
141
- self::$options = Yoast_GA_Options::instance()->default_ga_values();
142
- }
143
- else {
144
- self::$options = $options['ga_general'];
145
- }
146
-
147
- unset( self::$options['ga_general'] );
148
- }
149
- }
150
-
151
- /**
152
- * Show a question mark with help
153
- *
154
- * @param string $id
155
- * @param string $description
156
- *
157
- * @return string
158
- */
159
- private static function show_help( $id, $description ) {
160
- if ( is_null( $description ) ) {
161
- return '';
162
- }
163
-
164
- $help = '<img src="' . plugins_url( 'assets/img/question-mark.png', GAWP_FILE ) . '" class="alignleft yoast_help" id="' . esc_attr( $id . 'help' ) . '" alt="' . esc_attr( $description ) . '" />';
165
-
166
- return $help;
167
- }
168
-
169
- /**
170
- * Render the help button and set the option value
171
- *
172
- * @param array $args Arguments for the input
173
- */
174
- private static function before_input( $args ) {
175
- if ( ! isset( self::$options[ $args['key'] ] ) ) {
176
- self::$options[ $args['key'] ] = '';
177
- }
178
-
179
- if ( isset( $args['help'] ) ) {
180
- echo self::show_help( $args['key'], $args['help'] );
181
- }
182
- }
183
-
184
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/class-admin-settings-registrar.php DELETED
@@ -1,629 +0,0 @@
1
- <?php
2
- /**
3
- * @package GoogleAnalytics\AdminSettingsFieldsRegistrar
4
- */
5
-
6
- /**
7
- * This class is for options/settings in the admin forms
8
- */
9
- class Yoast_GA_Admin_Settings_Registrar {
10
-
11
- /**
12
- * The slug of this settings page, used in the Settings API
13
- *
14
- * @var string
15
- */
16
- protected $settings_api_page = 'yst_ga_settings_api';
17
-
18
- /**
19
- * Current section of the form fields
20
- *
21
- * @var string
22
- */
23
- private $current_section;
24
-
25
- /**
26
- * @var array
27
- */
28
- private $default_options = array(
29
- 'tracking_code' => array(),
30
- 'user_roles' => array(),
31
- 'track_download_types' => array(),
32
- 'track_full_url' => array(),
33
- 'analytics_profile' => array(),
34
- );
35
-
36
- /**
37
- * Amount of errors on validation
38
- *
39
- * @var integer
40
- */
41
- private $errors = 0;
42
-
43
- /**
44
- * Construct the new admin settings api forms
45
- */
46
- public function __construct() {
47
- add_action( 'admin_notices', array( $this, 'yst_ga_settings_errors' ) );
48
- add_action( 'admin_init', array( $this, 'init_default_options' ) );
49
- add_action( 'admin_init', array( $this, 'yst_ga_settings_init_ua_code' ) );
50
- add_action( 'admin_init', array( $this, 'yst_ga_settings_init_general' ) );
51
- add_action( 'admin_init', array( $this, 'yst_ga_settings_init_universal' ) );
52
- add_action( 'admin_init', array( $this, 'yst_ga_settings_init_advanced' ) );
53
- add_action( 'admin_init', array( $this, 'yst_ga_settings_init_debug' ) );
54
-
55
- if ( filter_input( INPUT_GET, 'settings-updated' ) && filter_input( INPUT_GET, 'yst_ga_settings' ) ) {
56
- add_action( 'admin_init', array( $this, 'update_ga_tracking_from_profile' ) );
57
- add_action( 'in_admin_footer', array( $this, 'go_to_current_tab' ) );
58
- }
59
- }
60
-
61
- /**
62
- * Show the settings errors
63
- */
64
- public function yst_ga_settings_errors() {
65
- settings_errors( 'yst_ga_settings' );
66
- }
67
-
68
- /**
69
- * Update the UA tracking code if we have a profile selected in the dropdown in the settings field
70
- */
71
- public function update_ga_tracking_from_profile() {
72
- $tracking_code = get_option( 'yst_ga' );
73
- if ( $tracking_code['ga_general']['analytics_profile'] !== '' && ( $tracking_code['ga_general']['manual_ua_code'] === '0' || $tracking_code['ga_general']['manual_ua_code'] === 0 ) ) {
74
- $tracking_code['ga_general']['analytics_profile_code'] = $this->get_ua_code_from_profile( $tracking_code['ga_general']['analytics_profile'] );
75
-
76
- unset( $tracking_code['ga_general']['ga_general'] ); // cleanup old keys
77
- update_option( 'yst_ga', $tracking_code );
78
- }
79
- }
80
-
81
- /**
82
- * Go to the current tab after a save, if we have one
83
- */
84
- public function go_to_current_tab() {
85
- $tab_option = get_option( 'yst_ga' );
86
-
87
- if ( isset ( $tab_option['ga_general']['return_tab'] ) ) {
88
- echo '<script type="text/javascript">jQuery(document).ready(function(){jQuery("#' . esc_js( $tab_option['ga_general']['return_tab'] ) . '-tab").click();});</script>';
89
- }
90
- }
91
-
92
- /**
93
- * Init the UA code block
94
- */
95
- public function yst_ga_settings_init_ua_code() {
96
- $section_name = 'ua_code';
97
-
98
- register_setting( $this->settings_api_page . '_' . $section_name, 'yst_ga' );
99
-
100
- $this->create_section( $section_name );
101
-
102
- if ( ! empty( $this->default_options['analytics_profile'] ) && count( $this->default_options['analytics_profile'] ) >= 1 ) {
103
- $this->add_field(
104
- 'analytics_profile',
105
- __( 'Google Analytics profile', 'google-analytics-for-wordpress' ),
106
- 'select_profile',
107
- array(
108
- 'help' => __( 'Select an analytics profile from your Google account to use for the tracking on this website.', 'google-analytics-for-wordpress' ),
109
- 'attributes' => ' class="chosen"',
110
- 'options' => $this->default_options['analytics_profile'],
111
- )
112
- );
113
- }
114
-
115
- $this->add_field(
116
- 'manual_ua_code',
117
- __( 'Use a manual UA code', 'google-analytics-for-wordpress' ),
118
- 'checkbox',
119
- array(
120
- 'help' => __( 'You can use the manual UA code field to enter your UA code manually, instead of using the Google Authenticator.', 'google-analytics-for-wordpress' ),
121
- )
122
- );
123
-
124
- $this->add_field(
125
- 'manual_ua_code_field',
126
- __( 'Enter your UA code here', 'google-analytics-for-wordpress' ),
127
- 'text',
128
- array(
129
- 'help' => __( 'Enter the UA code (e.g.: UA-1234567-89) here, you can find the correct UA code in your Google Analytics dashboard.', 'google-analytics-for-wordpress' ),
130
- )
131
- );
132
-
133
- $this->close_section( $section_name );
134
- }
135
-
136
- /**
137
- * Init the general tab
138
- */
139
- public function yst_ga_settings_init_general() {
140
- $section_name = 'general';
141
-
142
- register_setting( $this->settings_api_page . '_' . $section_name, 'yst_ga' );
143
-
144
- $this->create_section( $section_name );
145
-
146
- $this->add_field(
147
- 'track_outbound',
148
- __( 'Track outbound click and downloads', 'google-analytics-for-wordpress' ),
149
- 'checkbox',
150
- array(
151
- 'help' => __( 'Clicks and downloads will be tracked as events, you can find these under Content &#xBB; Event Tracking in your Google Analytics reports.', 'google-analytics-for-wordpress' ),
152
- )
153
- );
154
-
155
- $this->add_field(
156
- 'anonymous_data',
157
- __( 'Allow tracking of anonymous data', 'google-analytics-for-wordpress' ),
158
- 'checkbox',
159
- array(
160
- 'help' => __( 'By allowing us to track anonymous data we can better help you, because we know with which WordPress configurations, themes and plugins we should test. No personal data will be submitted.', 'google-analytics-for-wordpress' ),
161
- )
162
- );
163
-
164
- $this->add_field(
165
- 'anonymize_ips',
166
- __( 'Anonymize IPs', 'google-analytics-for-wordpress' ),
167
- 'checkbox',
168
- array(
169
- 'help' => sprintf( __( 'This adds %1$s, telling Google Analytics to anonymize the information sent by the tracker objects by removing the last octet of the IP address prior to its storage.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApi_gat?csw=1#_gat._anonymizeIp" target="_blank"><code>_anonymizeIp</code></a>' ),
170
- )
171
- );
172
-
173
- $this->add_field(
174
- 'ignore_users',
175
- __( 'Ignore users', 'google-analytics-for-wordpress' ),
176
- 'select',
177
- array(
178
- 'help' => __( 'Users of the role you select will be ignored, so if you select Editor, all Editors will be ignored.', 'google-analytics-for-wordpress' ),
179
- 'attributes' => ' multiple="true" style="width: 365px;" class="chosen"',
180
- 'options' => $this->default_options['user_roles'],
181
- )
182
- );
183
-
184
- $this->add_field(
185
- 'dashboards_disabled',
186
- __( 'Disable analytics dashboard', 'google-analytics-for-wordpress' ),
187
- 'checkbox',
188
- array(
189
- 'help' => __( 'This will completely disable the dashboard and stop the plugin from fetching the latest analytics data.', 'google-analytics-for-wordpress' ),
190
- )
191
- );
192
-
193
- $this->close_section( $section_name );
194
- }
195
-
196
- /**
197
- * Init the universal tab
198
- */
199
- public function yst_ga_settings_init_universal() {
200
- $section_name = 'universal';
201
-
202
- register_setting( $this->settings_api_page . '_' . $section_name, 'yst_ga' );
203
-
204
- $this->create_section( $section_name );
205
-
206
- $this->add_field(
207
- 'enable_universal',
208
- __( 'Enable universal', 'google-analytics-for-wordpress' ),
209
- 'checkbox',
210
- array(
211
- 'help' => sprintf( __( 'First enable Universal tracking in your Google Analytics account. Please read %1$sthis guide%2$s to learn how to do that.', 'google-analytics-for-wordpress' ), '<a href="http://kb.yoast.com/article/125-universal-analytics#utm_medium=kb-link&utm_source=gawp-config&utm_campaign=wpgaplugin" target="_blank">', '</a>' ),
212
- )
213
- );
214
-
215
- $this->add_field(
216
- 'demographics',
217
- __( 'Enable Demographics and Interest Reports', 'google-analytics-for-wordpress' ),
218
- 'checkbox',
219
- array(
220
- 'help' => sprintf( __( 'You have to enable the Demographics in Google Analytics before you can see the tracking data. We have a knowledge base article in our %1$sknowledge base%2$s about this feature.', 'google-analytics-for-wordpress' ), '<a href="http://kb.yoast.com/article/154-enable-demographics-and-interests-report-in-google-analytics/#utm_medium=kb-link&amp;utm_source=gawp-config&amp;utm_campaign=wpgaplugin" target="_blank">', '</a>' ),
221
- )
222
- );
223
-
224
- $this->add_field(
225
- 'enhanced_link_attribution',
226
- __( 'Enhanced Link Attribution', 'google-analytics-for-wordpress' ),
227
- 'checkbox',
228
- array(
229
- 'help' => sprintf( __( 'Add %1$sEnhanced Link Attribution%2$s to your tracking code.', 'google-analytics-for-wordpress' ), '<a href="https://support.google.com/analytics/answer/2558867" target="_blank">', ' </a>' )
230
- )
231
- );
232
-
233
- $this->close_section( $section_name );
234
- }
235
-
236
- /**
237
- * Init the advanced tab
238
- */
239
- public function yst_ga_settings_init_advanced() {
240
- $section_name = 'advanced';
241
-
242
- register_setting( $this->settings_api_page . '_' . $section_name, 'yst_ga' );
243
-
244
- $this->create_section( $section_name );
245
-
246
- $this->add_field(
247
- 'track_download_as',
248
- __( 'Track downloads as', 'google-analytics-for-wordpress' ),
249
- 'select',
250
- array(
251
- 'help' => __( 'Not recommended, as this would skew your statistics, but it does make it possible to track downloads as goals.', 'google-analytics-for-wordpress' ),
252
- 'options' => $this->default_options['track_download_types'],
253
- 'attributes' => ' class="chosen"',
254
- )
255
- );
256
-
257
- $this->add_field(
258
- 'extensions_of_files',
259
- __( 'Extensions of files to track as downloads', 'google-analytics-for-wordpress' ),
260
- 'text',
261
- array(
262
- 'help' => __( 'Please separate extensions using commas', 'google-analytics-for-wordpress' ),
263
- )
264
- );
265
-
266
- $this->add_field(
267
- 'track_full_url',
268
- __( 'Track full URL of outbound clicks or just the domain', 'google-analytics-for-wordpress' ),
269
- 'select',
270
- array(
271
- 'help' => __( 'How should we track your outbound clicks?', 'google-analytics-for-wordpress' ),
272
- 'options' => $this->default_options['track_full_url'],
273
- 'attributes' => ' class="chosen"',
274
- )
275
- );
276
-
277
- $this->add_field(
278
- 'subdomain_tracking',
279
- __( 'Subdomain tracking', 'google-analytics-for-wordpress' ),
280
- 'text',
281
- array(
282
- 'help' => sprintf( __( 'This allows you to set the domain that\'s set by %1$s for tracking subdomains.<br/>If empty, this will not be set.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiDomainDirectory#_gat.GA_Tracker_._setDomainName" target="_blank"><code>_setDomainName</code></a>' ),
283
- )
284
- );
285
-
286
- $this->add_field(
287
- 'track_internal_as_outbound',
288
- __( 'Set path for internal links to track as outbound links', 'google-analytics-for-wordpress' ),
289
- 'text',
290
- array(
291
- 'help' => sprintf( __( 'If you want to track all internal links that begin with %1$s, enter %1$s in the box above. If you have multiple prefixes you can separate them with comma\'s: %2$s', 'google-analytics-for-wordpress' ), '<code>/out/</code>', '<code>/out/,/recommends/</code>' ),
292
- )
293
- );
294
-
295
- $this->add_field(
296
- 'track_internal_as_label',
297
- __( 'Label for those links', 'google-analytics-for-wordpress' ),
298
- 'text',
299
- array(
300
- 'help' => __( 'The label to use for these links, this will be added to where the click came from, so if the label is "aff", the label for a click from the content of an article becomes "outbound-article-aff".', 'google-analytics-for-wordpress' ),
301
- )
302
- );
303
-
304
- $this->add_field(
305
- 'tag_links_in_rss',
306
- __( 'Tag links in RSS feed with campaign variables', 'google-analytics-for-wordpress' ),
307
- 'checkbox',
308
- array(
309
- 'help' => __( 'Do not use this feature if you use FeedBurner, as FeedBurner can do this automatically and better than this plugin can. Check <a href="https://support.google.com/feedburner/answer/165769?hl=en&amp;ref_topic=13075" target="_blank">this help page</a> for info on how to enable this feature in FeedBurner.', 'google-analytics-for-wordpress' ),
310
- )
311
- );
312
-
313
- $this->add_field(
314
- 'allow_anchor',
315
- __( 'Tag links in RSS feed with campaign variables', 'google-analytics-for-wordpress' ),
316
- 'checkbox',
317
- array(
318
- 'help' => sprintf( __( 'This adds a %1$s call to your tracking code, and makes RSS link tagging use a %2$s as well.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiCampaignTracking?csw=1#_gat.GA_Tracker_._setAllowAnchor" target="_blank"><code>_setAllowAnchor</code></a>', '<code>#</code>' ),
319
- )
320
- );
321
-
322
- $this->add_field(
323
- 'add_allow_linker',
324
- __( 'Add <code>_setAllowLinker</code>', 'google-analytics-for-wordpress' ),
325
- 'checkbox',
326
- array(
327
- 'help' => sprintf( __( 'This adds a %1$s call to your tracking code, allowing you to use %2$s and related functions.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiDomainDirectory?csw=1#_gat.GA_Tracker_._setAllowLinker" target="_blank"><code>_setAllowLinker</code></a>', ' <code>_link</code>' ),
328
- )
329
- );
330
-
331
- $this->add_field(
332
- 'custom_code',
333
- __( 'Custom code', 'google-analytics-for-wordpress' ),
334
- 'textarea',
335
- array(
336
- 'help' => sprintf( __( 'Not for the average user: this allows you to add a line of code, to be added before the %1$s call.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#_gat.GA_Tracker_._trackPageview" target="_blank"><code>_trackPageview</code></a>' ),
337
- )
338
- );
339
-
340
- $this->close_section( $section_name );
341
- }
342
-
343
- /**
344
- * Init the debug tab
345
- */
346
- public function yst_ga_settings_init_debug() {
347
- $section_name = 'debug';
348
-
349
- register_setting( $this->settings_api_page . '_' . $section_name, 'yst_ga', array( $this, 'validate_options_ua_code' ) );
350
-
351
- $this->create_section( $section_name );
352
-
353
- $this->add_field(
354
- 'debug_mode',
355
- __( 'Enable debug mode', 'google-analytics-for-wordpress' ),
356
- 'checkbox',
357
- array(
358
- 'help' => __( 'Not recommended, as this would skew your statistics, but it does make it possible to track downloads as goals.', 'google-analytics-for-wordpress' ),
359
- )
360
- );
361
-
362
- $this->close_section( $section_name );
363
- }
364
-
365
- /**
366
- * Validate the UA code options
367
- *
368
- * @param array $new_settings
369
- *
370
- * @return array
371
- */
372
- public function validate_options_ua_code( $new_settings ) {
373
- foreach ( $new_settings['ga_general'] as $key => $value ) {
374
- switch ( $key ) {
375
- case 'manual_ua_code':
376
- if ( $new_settings['ga_general']['manual_ua_code'] === '1' ) {
377
- $new_settings['ga_general']['manual_ua_code_field'] = trim( $new_settings['ga_general']['manual_ua_code_field'] );
378
- $new_settings['ga_general']['manual_ua_code_field'] = str_replace( '–', '-', $new_settings['ga_general']['manual_ua_code_field'] );
379
-
380
- if ( ! $this->validate_manual_ua_code( $new_settings['ga_general']['manual_ua_code_field'] ) ) {
381
- unset( $new_settings['ga_general']['manual_ua_code_field'] );
382
-
383
- $this->errors ++;
384
- }
385
- }
386
- break;
387
- case 'analytics_profile':
388
- if ( ! empty( $new_settings['ga_general']['analytics_profile'] ) ) {
389
- $new_settings['ga_general']['analytics_profile'] = trim( $new_settings['ga_general']['analytics_profile'] );
390
-
391
- if ( ! $this->validate_profile_id( $new_settings['ga_general']['analytics_profile'] ) ) {
392
- unset( $new_settings['ga_general']['analytics_profile'] );
393
-
394
- $this->errors ++;
395
- }
396
- }
397
- break;
398
- }
399
- }
400
-
401
- if ( ! isset( $new_settings['ga_general']['ignore_users'] ) ) {
402
- $new_settings['ga_general']['ignore_users'] = array();
403
- }
404
-
405
- if ( ! isset( $new_settings['ga_general']['enable_universal'] ) ) {
406
- $new_settings['ga_general']['enable_universal'] = 0;
407
- }
408
-
409
- if ( $this->errors === 0 && get_settings_errors( 'yst_ga_settings' ) === array() ) {
410
- add_settings_error(
411
- 'yst_ga_settings',
412
- 'yst_ga_settings',
413
- __( 'The Google Analytics settings are saved successfully.', 'google-analytics-for-wordpress' ),
414
- 'updated'
415
- );
416
- }
417
-
418
- return $new_settings;
419
- }
420
-
421
- /**
422
- * Set the default options, for now, it is in the admin class (Needs to be hooked at admin_init)
423
- */
424
- public function init_default_options() {
425
- $this->default_options = array(
426
- 'tracking_code' => Yoast_GA_Options::instance()->get_tracking_code(),
427
- 'user_roles' => $this->get_userroles(),
428
- 'track_download_types' => $this->track_download_types(),
429
- 'track_full_url' => $this->get_track_full_url(),
430
- 'analytics_profile' => $this->get_profiles(),
431
- );
432
- }
433
-
434
- /**
435
- * Transform the Profile ID into an helpful UA code
436
- *
437
- * @param int $profile_id The profile ID from Google Analytics
438
- *
439
- * @return null|string
440
- */
441
- public function get_ua_code_from_profile( $profile_id ) {
442
- $profiles = $this->get_profiles();
443
- $ua_code = null;
444
-
445
- foreach ( $profiles as $account ) {
446
- foreach ( $account['items'] as $profile ) {
447
- foreach ( $profile['items'] as $subprofile ) {
448
- if ( isset( $subprofile['id'] ) && $subprofile['id'] === $profile_id ) {
449
- return $subprofile['ua_code'];
450
- }
451
- }
452
- }
453
- }
454
-
455
- return $ua_code;
456
- }
457
-
458
- /**
459
- * Get the user roles of this WordPress blog
460
- *
461
- * @return array
462
- */
463
- protected function get_userroles() {
464
- global $wp_roles;
465
-
466
- $all_roles = $wp_roles->roles;
467
- $roles = array();
468
-
469
- /**
470
- * Filter: 'editable_roles' - Allows filtering of the roles shown within the plugin (and elsewhere in WP as it's a WP filter)
471
- *
472
- * @api array $all_roles
473
- */
474
- $editable_roles = apply_filters( 'editable_roles', $all_roles );
475
-
476
- foreach ( $editable_roles as $id => $name ) {
477
- $roles[] = array(
478
- 'id' => $id,
479
- 'name' => translate_user_role( $name['name'] ),
480
- );
481
- }
482
-
483
- return $roles;
484
- }
485
-
486
- /**
487
- * Get types of how we can track downloads
488
- *
489
- * @return array
490
- */
491
- protected function track_download_types() {
492
- return array(
493
- 0 => array( 'id' => 'event', 'name' => __( 'Event', 'google-analytics-for-wordpress' ) ),
494
- 1 => array( 'id' => 'pageview', 'name' => __( 'Pageview', 'google-analytics-for-wordpress' ) ),
495
- );
496
- }
497
-
498
- /**
499
- * Get options for the track full url or links setting
500
- *
501
- * @return array
502
- */
503
- protected function get_track_full_url() {
504
- return array(
505
- 0 => array( 'id' => 'domain', 'name' => __( 'Just the domain', 'google-analytics-for-wordpress' ) ),
506
- 1 => array( 'id' => 'full_links', 'name' => __( 'Full links', 'google-analytics-for-wordpress' ) ),
507
- );
508
- }
509
-
510
-
511
- /**
512
- * Create a new settings section
513
- *
514
- * @param string $tab The tab name that should be added
515
- */
516
- protected function create_section( $tab ) {
517
- $this->current_section = $tab;
518
-
519
- add_settings_section(
520
- 'yst_ga_settings_api_' . $tab,
521
- '',
522
- '',
523
- $this->settings_api_page . '_' . $tab
524
- );
525
- }
526
-
527
- /**
528
- * Add a extra fields while closing the section
529
- *
530
- * @param string $tab
531
- */
532
- protected function close_section( $tab ) {
533
- /**
534
- * Filter: 'yst-ga-settings-fields-[TAB_NAME]' - Create an extra input field.
535
- *
536
- * @api array Array with extra fields for this tab
537
- */
538
- $extra_fields = apply_filters( 'yst-ga-settings-fields-' . $tab, array() );
539
-
540
- if ( ! empty( $extra_fields ) && is_array( $extra_fields ) ) {
541
- foreach ( $extra_fields as $field ) {
542
- $this->add_field( $field['id'], $field['title'], $field['type'], $field['args'] );
543
- }
544
- }
545
- }
546
-
547
- /**
548
- * Add a settings field
549
- *
550
- * @param string $id ID of the field and key name in the options
551
- * @param string $title Title of this field
552
- * @param string $type Type of the field e.g. text, select etc.
553
- * @param array $args Extra arguments for the field that will be rendered
554
- */
555
- protected function add_field( $id, $title, $type, $args ) {
556
- if ( ! isset( $args['key'] ) ) {
557
- $args['key'] = $id;
558
- }
559
-
560
- if ( ! isset( $args['label_for'] ) ) {
561
- $args['label_for'] = 'ga_form_' . $args['key'];
562
- }
563
-
564
- add_settings_field(
565
- 'yst_ga_' . $id,
566
- $title,
567
- array( 'Yoast_GA_Admin_Settings_Fields', 'yst_ga_' . $type . '_field' ),
568
- $this->settings_api_page . '_' . $this->current_section,
569
- $this->settings_api_page . '_' . $this->current_section,
570
- $args
571
- );
572
- }
573
-
574
- /**
575
- * Validate the manual UA code
576
- *
577
- * @param string $ua_code The UA code that we have to check
578
- *
579
- * @return bool
580
- */
581
- private function validate_manual_ua_code( $ua_code ) {
582
- if ( ! preg_match( '|^UA-\d{4,}-\d+$|', $ua_code ) ) {
583
- add_settings_error(
584
- 'yst_ga_settings',
585
- 'yst_ga_settings',
586
- __( 'The UA code needs to follow UA-XXXXXXXX-X format.', 'google-analytics-for-wordpress' ),
587
- 'error'
588
- );
589
-
590
- return false;
591
- }
592
-
593
- return true;
594
- }
595
-
596
- /**
597
- * Validate the profile ID in the selectbox
598
- *
599
- * @param int $profile_id Check the profile id
600
- *
601
- * @return bool
602
- */
603
- private function validate_profile_id( $profile_id ) {
604
- if ( ! is_numeric( $profile_id ) ) {
605
- add_settings_error(
606
- 'yst_ga_settings',
607
- 'yst_ga_settings',
608
- __( 'The profile ID needs to be numeric.', 'google-analytics-for-wordpress' ),
609
- 'error'
610
- );
611
-
612
- return false;
613
- }
614
-
615
- return true;
616
- }
617
-
618
- /**
619
- * Get the Google Analytics profiles which are in this google account
620
- *
621
- * @return array
622
- */
623
- private function get_profiles() {
624
- $return = Yoast_Google_Analytics::get_instance()->get_profiles();
625
-
626
- return $return;
627
- }
628
-
629
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/class-admin.php CHANGED
@@ -4,40 +4,20 @@
4
  */
5
 
6
  /**
7
- * This class is for the backend
8
  */
9
- class Yoast_GA_Admin {
10
 
11
  /**
12
- * Store the API instance
13
- *
14
- * @var resource
15
  */
16
  public $api;
17
 
18
  /**
19
- * Store the options
20
- *
21
- * @var array
22
- */
23
- private $options;
24
-
25
- /**
26
- * @var string
27
- */
28
- private $plugin_path;
29
-
30
- /**
31
- * @var string
32
- */
33
- private $plugin_url;
34
-
35
- /**
36
- * Construct the admin class
37
  */
38
  public function __construct() {
39
- $this->plugin_path = GAWP_DIR . '/';
40
- $this->plugin_url = GAWP_URL;
41
 
42
  add_action( 'plugins_loaded', array( $this, 'init_ga' ) );
43
  add_action( 'admin_init', array( $this, 'init_settings' ) );
@@ -47,36 +27,39 @@ class Yoast_GA_Admin {
47
  * Init function when the plugin is loaded
48
  */
49
  public function init_ga() {
50
- new Yoast_GA_Admin_Menu( $this );
51
 
52
- new Yoast_GA_Admin_Settings_Registrar();
53
 
54
  add_filter( 'plugin_action_links_' . plugin_basename( GAWP_FILE ), array( $this, 'add_action_links' ) );
 
55
  }
56
 
57
  /**
58
  * Init function for the settings of GA
59
  */
60
  public function init_settings() {
61
- $options_instance = Yoast_GA_Options::instance();
62
- $this->options = $options_instance->get_options();
63
-
64
  $this->api = Yoast_Api_Libs::load_api_libraries( array( 'google', 'googleanalytics' ) );
65
  $dashboards = Yoast_GA_Dashboards::get_instance();
66
 
67
  // Listener for reconnecting with google analytics
68
  $this->google_analytics_listener();
69
 
70
- if ( is_null( $options_instance->get_tracking_code() ) && $this->show_admin_warning() ) {
71
  add_action( 'admin_notices', array( 'Yoast_Google_Analytics_Notice', 'config_warning' ) );
72
  }
73
 
74
  // Check if something has went wrong with GA-api calls
75
- $has_tracking_code = ( ! is_null( $options_instance->get_tracking_code() ) && empty( $this->options['manual_ua_code_field'] ) );
76
  if ( $has_tracking_code && $this->show_admin_dashboard_warning() ) {
77
  Yoast_Google_Analytics::get_instance()->check_for_ga_issues();
78
  }
79
 
 
 
 
 
 
80
  /**
81
  * Show the notifications if we have one
82
  */
@@ -86,6 +69,71 @@ class Yoast_GA_Admin {
86
  $dashboards->init_dashboards( $this->get_current_profile() );
87
  }
88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  /**
90
  * Run a this deactivation hook on deactivation of GA. When this happens we'll
91
  * remove the options for the profiles and the refresh token.
@@ -95,6 +143,69 @@ class Yoast_GA_Admin {
95
  self::analytics_api_clean_up();
96
  }
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  /**
99
  * Are we allowed to show a warning message? returns true if it's allowed
100
  *
@@ -113,6 +224,30 @@ class Yoast_GA_Admin {
113
  return ( current_user_can( 'manage_options' ) && isset( $_GET['page'] ) && $_GET['page'] === 'yst_ga_dashboard' );
114
  }
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  /**
117
  * Add a link to the settings page to the plugins list
118
  *
@@ -132,27 +267,17 @@ class Yoast_GA_Admin {
132
  return $links;
133
  }
134
 
135
- /**
136
- * Register the custom dimensions tab
137
- */
138
- public function register_custom_dimensions_tab() {
139
- echo '<a class="nav-tab" id="yst_ga_custom_dimensions-tab" href="#top#yst_ga_custom_dimensions">' . __( 'Custom Dimensions', 'google-analytics-for-wordpress' ) . '</a>';
140
- }
141
-
142
  /**
143
  * Adds some promo text for the premium plugin on the custom dimensions tab.
144
  */
145
- public function premium_promo_tab() {
146
- echo $this->premium_promo( true );
147
- }
148
-
149
- /**
150
- * Adds some promo text for the premium plugin on the custom dimensions tab.
151
- *
152
- * @param bool $add_tab_div Add the div wrapper to make it a tab
153
- */
154
- public function premium_promo( $add_tab_div = false ) {
155
- require_once( $this->plugin_path . 'admin/views/custom-dimensions-upsell.php' );
156
  }
157
 
158
  /**
@@ -185,8 +310,7 @@ class Yoast_GA_Admin {
185
  $this->translate_promo();
186
 
187
  if ( ! has_action( 'yst_ga_custom_dimensions_tab-content' ) ) {
188
- add_action( 'yst_ga_custom_tabs-tab', array( $this, 'register_custom_dimensions_tab' ) );
189
- add_action( 'yst_ga_custom_tabs-content', array( $this, 'premium_promo_tab' ) );
190
  }
191
 
192
  if ( ! has_action( 'yst_ga_custom_dimension_add-dashboards-tab' ) ) {
@@ -195,7 +319,7 @@ class Yoast_GA_Admin {
195
 
196
  switch ( filter_input( INPUT_GET, 'page' ) ) {
197
  case 'yst_ga_settings':
198
- require_once( $this->plugin_path . 'admin/pages/settings-api.php' );
199
  break;
200
  case 'yst_ga_extensions':
201
  require_once( $this->plugin_path . 'admin/pages/extensions.php' );
@@ -207,16 +331,24 @@ class Yoast_GA_Admin {
207
  }
208
  }
209
 
 
210
  /**
211
- * Checks if there is a callback or reauth to get token from Google Analytics api
 
 
 
 
 
 
 
 
 
 
 
212
  */
213
  private function google_analytics_listener() {
214
- if ( ! empty( $this->options['google_auth_code'] ) ) {
215
- Yoast_Google_Analytics::get_instance()->authenticate( trim( $this->options['google_auth_code'] ) );
216
- }
217
  $google_auth_code = filter_input( INPUT_POST, 'google_auth_code' );
218
- if ( $google_auth_code && current_user_can( 'manage_options' ) && wp_verify_nonce( 'yoast_ga_nonce', 'save_settings' ) ) {
219
-
220
  self::analytics_api_clean_up();
221
 
222
  Yoast_Google_Analytics::get_instance()->authenticate( trim( $google_auth_code ) );
@@ -234,24 +366,70 @@ class Yoast_GA_Admin {
234
  }
235
 
236
  /**
237
- * Get the UA code from a profile
238
- *
239
- * @param bool $ua_code
240
  *
241
  * @return null
242
  */
243
- public function get_current_profile( $ua_code = false ) {
244
  if ( ! empty( $this->options['analytics_profile'] ) ) {
245
- if ( $ua_code ) {
246
- return $this->options['analytics_profile_code'];
247
- }
248
-
249
  return $this->options['analytics_profile'];
250
  }
251
 
252
  return null;
253
  }
254
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  /**
256
  * Render the admin page head for the GA Plugin
257
  */
@@ -334,6 +512,16 @@ class Yoast_GA_Admin {
334
  return $extensions;
335
  }
336
 
 
 
 
 
 
 
 
 
 
 
337
  /**
338
  * Show the notification that should be set, after showing the notification this function unset the transient
339
  *
4
  */
5
 
6
  /**
7
+ * This class is for the backend, extendable for all child classes
8
  */
9
+ class Yoast_GA_Admin extends Yoast_GA_Options {
10
 
11
  /**
12
+ * @var boolean $api Store the API instance
 
 
13
  */
14
  public $api;
15
 
16
  /**
17
+ * Constructor
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  */
19
  public function __construct() {
20
+ parent::__construct();
 
21
 
22
  add_action( 'plugins_loaded', array( $this, 'init_ga' ) );
23
  add_action( 'admin_init', array( $this, 'init_settings' ) );
27
  * Init function when the plugin is loaded
28
  */
29
  public function init_ga() {
 
30
 
31
+ new Yoast_GA_Admin_Menu( $this );
32
 
33
  add_filter( 'plugin_action_links_' . plugin_basename( GAWP_FILE ), array( $this, 'add_action_links' ) );
34
+
35
  }
36
 
37
  /**
38
  * Init function for the settings of GA
39
  */
40
  public function init_settings() {
41
+ $this->options = $this->get_options();
 
 
42
  $this->api = Yoast_Api_Libs::load_api_libraries( array( 'google', 'googleanalytics' ) );
43
  $dashboards = Yoast_GA_Dashboards::get_instance();
44
 
45
  // Listener for reconnecting with google analytics
46
  $this->google_analytics_listener();
47
 
48
+ if ( is_null( $this->get_tracking_code() ) && $this->show_admin_warning() ) {
49
  add_action( 'admin_notices', array( 'Yoast_Google_Analytics_Notice', 'config_warning' ) );
50
  }
51
 
52
  // Check if something has went wrong with GA-api calls
53
+ $has_tracking_code = ( ! is_null( $this->get_tracking_code() ) && empty( $this->options['manual_ua_code_field'] ) );
54
  if ( $has_tracking_code && $this->show_admin_dashboard_warning() ) {
55
  Yoast_Google_Analytics::get_instance()->check_for_ga_issues();
56
  }
57
 
58
+
59
+ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
60
+ $this->handle_ga_post_request( $dashboards );
61
+ }
62
+
63
  /**
64
  * Show the notifications if we have one
65
  */
69
  $dashboards->init_dashboards( $this->get_current_profile() );
70
  }
71
 
72
+ /**
73
+ * This function saves the settings in the option field and returns a wp success message on success
74
+ *
75
+ * @param array $data
76
+ */
77
+ public function save_settings( $data ) {
78
+
79
+ unset( $data['google_auth_code'] );
80
+
81
+ foreach ( $data as $key => $value ) {
82
+ if ( $key != 'return_tab' ) {
83
+ if ( $key != 'custom_code' && is_string( $value ) ) {
84
+ $value = strip_tags( $value );
85
+ }
86
+ $this->options[ $key ] = $value;
87
+ }
88
+ }
89
+
90
+ // Check checkboxes, on a uncheck they won't be posted to this function
91
+ $defaults = $this->default_ga_values();
92
+ foreach ( $defaults[ $this->option_prefix ] as $option_name => $value ) {
93
+ $this->handle_default_setting( $data, $option_name, $value );
94
+ }
95
+
96
+ if ( ! empty( $this->options['analytics_profile'] ) ) {
97
+ $this->options['analytics_profile_code'] = $this->get_ua_code_from_profile( $this->options['analytics_profile'] );
98
+ }
99
+
100
+ if ( ! empty( $this->options['manual_ua_code_field'] ) ) {
101
+ $this->options['manual_ua_code_field'] = trim( $this->options['manual_ua_code_field'] );
102
+ // en dash to minus, prevents issue with code copied from web with "fancy" dash
103
+ $this->options['manual_ua_code_field'] = str_replace( '–', '-', $this->options['manual_ua_code_field'] );
104
+
105
+ if ( ! preg_match( '|^UA-\d{4,}-\d+$|', $this->options['manual_ua_code_field'] ) ) {
106
+
107
+ $this->add_notification( 'ga_notifications', array(
108
+ 'type' => 'error',
109
+ 'description' => __( 'The UA code needs to follow UA-XXXXXXXX-X format.', 'google-analytics-for-wordpress' ),
110
+ ) );
111
+
112
+ wp_redirect( admin_url( 'admin.php' ) . '?page=yst_ga_settings#top#' . $data['return_tab'], 301 );
113
+ exit;
114
+ }
115
+ }
116
+
117
+ if ( $this->update_option( $this->options ) ) {
118
+ // Success, add a new notification
119
+ $this->add_notification( 'ga_notifications', array(
120
+ 'type' => 'success',
121
+ 'description' => __( 'Settings saved.', 'google-analytics-for-wordpress' ),
122
+ ) );
123
+ }
124
+ else {
125
+ // Fail, add a new notification
126
+ $this->add_notification( 'ga_notifications', array(
127
+ 'type' => 'error',
128
+ 'description' => __( 'There were no changes to save, please try again.', 'google-analytics-for-wordpress' ),
129
+ ) );
130
+ }
131
+
132
+ // redirect
133
+ wp_redirect( admin_url( 'admin.php' ) . '?page=yst_ga_settings#top#' . $data['return_tab'], 301 );
134
+ exit;
135
+ }
136
+
137
  /**
138
  * Run a this deactivation hook on deactivation of GA. When this happens we'll
139
  * remove the options for the profiles and the refresh token.
143
  self::analytics_api_clean_up();
144
  }
145
 
146
+ /**
147
+ * Handle a default setting in GA
148
+ *
149
+ * @param array $data
150
+ * @param string $option_name
151
+ * @param mixed $value
152
+ */
153
+ private function handle_default_setting( $data, $option_name, $value ) {
154
+ if ( ! isset( $data[ $option_name ] ) ) {
155
+ // If no data was passed in, set it to the default.
156
+ if ( $value === 1 ) {
157
+ // Disable the checkbox for now, use value 0
158
+ $this->options[ $option_name ] = 0;
159
+ }
160
+ else {
161
+ $this->options[ $option_name ] = $value;
162
+ }
163
+ }
164
+ }
165
+
166
+ /**
167
+ * Handle the post requests in the admin form of the GA plugin
168
+ *
169
+ * @param Yoast_GA_Dashboards $dashboards
170
+ */
171
+ private function handle_ga_post_request( $dashboards ) {
172
+ if ( ! function_exists( 'wp_verify_nonce' ) ) {
173
+ require_once( ABSPATH . 'wp-includes/pluggable.php' );
174
+ }
175
+
176
+ if ( isset( $_POST['ga-form-settings'] ) && wp_verify_nonce( $_POST['yoast_ga_nonce'], 'save_settings' ) ) {
177
+ if ( ! isset ( $_POST['ignore_users'] ) ) {
178
+ $_POST['ignore_users'] = array();
179
+ }
180
+
181
+ $dashboards_disabled = Yoast_GA_Settings::get_instance()->dashboards_disabled();
182
+
183
+ if ( ( $dashboards_disabled == false && isset( $_POST['dashboards_disabled'] ) ) || $this->ga_profile_changed( $_POST ) ) {
184
+ $dashboards->reset_dashboards_data();
185
+ }
186
+
187
+ // Post submitted and verified with our nonce
188
+ $this->save_settings( $_POST );
189
+ }
190
+ }
191
+
192
+ /**
193
+ * Is there selected an other property in the settings post? Returns true or false.
194
+ *
195
+ * @param array $post
196
+ *
197
+ * @return bool
198
+ */
199
+ private function ga_profile_changed( $post ) {
200
+ if ( isset( $post['analytics_profile'] ) && isset( $this->options['analytics_profile'] ) ) {
201
+ if ( $post['analytics_profile'] != $this->options['analytics_profile'] ) {
202
+ return true;
203
+ }
204
+ }
205
+
206
+ return false;
207
+ }
208
+
209
  /**
210
  * Are we allowed to show a warning message? returns true if it's allowed
211
  *
224
  return ( current_user_can( 'manage_options' ) && isset( $_GET['page'] ) && $_GET['page'] === 'yst_ga_dashboard' );
225
  }
226
 
227
+ /**
228
+ * Transform the Profile ID into an helpful UA code
229
+ *
230
+ * @param integer $profile_id
231
+ *
232
+ * @return null
233
+ */
234
+ private function get_ua_code_from_profile( $profile_id ) {
235
+ $profiles = $this->get_profiles();
236
+ $ua_code = null;
237
+
238
+ foreach ( $profiles as $account ) {
239
+ foreach ( $account['items'] as $profile ) {
240
+ foreach ( $profile['items'] as $subprofile ) {
241
+ if ( isset( $subprofile['id'] ) && $subprofile['id'] === $profile_id ) {
242
+ return $subprofile['ua_code'];
243
+ }
244
+ }
245
+ }
246
+ }
247
+
248
+ return $ua_code;
249
+ }
250
+
251
  /**
252
  * Add a link to the settings page to the plugins list
253
  *
267
  return $links;
268
  }
269
 
 
 
 
 
 
 
 
270
  /**
271
  * Adds some promo text for the premium plugin on the custom dimensions tab.
272
  */
273
+ public function premium_promo() {
274
+ echo '<div class="ga-promote">';
275
+ echo '<p>';
276
+ printf( __( 'If you want to track custom dimensions like page views per author or post type, you should upgrade to the %1$spremium version of Google Analytics by Yoast%2$s.', 'google-analytics-for-wordpress' ), '<a href="https://yoast.com/wordpress/plugins/google-analytics/#utm_medium=text-link&utm_source=gawp-config&utm_campaign=wpgaplugin&utm_content=custom_dimensions_tab">', '</a>' );
277
+ echo ' ';
278
+ _e( 'This will also give you email access to the support team at Yoast, who will provide support on the plugin 24/7.', 'google-analytics-for-wordpress' );
279
+ echo '</p>';
280
+ echo '</div>';
 
 
 
281
  }
282
 
283
  /**
310
  $this->translate_promo();
311
 
312
  if ( ! has_action( 'yst_ga_custom_dimensions_tab-content' ) ) {
313
+ add_action( 'yst_ga_custom_dimensions_tab-content', array( $this, 'premium_promo' ) );
 
314
  }
315
 
316
  if ( ! has_action( 'yst_ga_custom_dimension_add-dashboards-tab' ) ) {
319
 
320
  switch ( filter_input( INPUT_GET, 'page' ) ) {
321
  case 'yst_ga_settings':
322
+ require_once( $this->plugin_path . 'admin/pages/settings.php' );
323
  break;
324
  case 'yst_ga_extensions':
325
  require_once( $this->plugin_path . 'admin/pages/extensions.php' );
331
  }
332
  }
333
 
334
+
335
  /**
336
+ * Get the Google Analytics profiles which are in this google account
337
+ *
338
+ * @return array
339
+ */
340
+ public function get_profiles() {
341
+ $return = Yoast_Google_Analytics::get_instance()->get_profiles();
342
+
343
+ return $return;
344
+ }
345
+
346
+ /**
347
+ * Checks if there is a callback to get token from Google Analytics API
348
  */
349
  private function google_analytics_listener() {
 
 
 
350
  $google_auth_code = filter_input( INPUT_POST, 'google_auth_code' );
351
+ if ( $google_auth_code && current_user_can( 'manage_options' ) && wp_verify_nonce( filter_input( INPUT_POST, 'yoast_ga_nonce' ), 'save_settings' ) ) {
 
352
  self::analytics_api_clean_up();
353
 
354
  Yoast_Google_Analytics::get_instance()->authenticate( trim( $google_auth_code ) );
366
  }
367
 
368
  /**
369
+ * Get the current GA profile
 
 
370
  *
371
  * @return null
372
  */
373
+ private function get_current_profile() {
374
  if ( ! empty( $this->options['analytics_profile'] ) ) {
 
 
 
 
375
  return $this->options['analytics_profile'];
376
  }
377
 
378
  return null;
379
  }
380
 
381
+ /**
382
+ * Get the user roles of this WordPress blog
383
+ *
384
+ * @return array
385
+ */
386
+ public function get_userroles() {
387
+ global $wp_roles;
388
+
389
+ $all_roles = $wp_roles->roles;
390
+ $roles = array();
391
+
392
+ /**
393
+ * Filter: 'editable_roles' - Allows filtering of the roles shown within the plugin (and elsewhere in WP as it's a WP filter)
394
+ *
395
+ * @api array $all_roles
396
+ */
397
+ $editable_roles = apply_filters( 'editable_roles', $all_roles );
398
+
399
+ foreach ( $editable_roles as $id => $name ) {
400
+ $roles[] = array(
401
+ 'id' => $id,
402
+ 'name' => translate_user_role( $name['name'] ),
403
+ );
404
+ }
405
+
406
+ return $roles;
407
+ }
408
+
409
+ /**
410
+ * Get types of how we can track downloads
411
+ *
412
+ * @return array
413
+ */
414
+ public function track_download_types() {
415
+ return array(
416
+ 0 => array( 'id' => 'event', 'name' => __( 'Event', 'google-analytics-for-wordpress' ) ),
417
+ 1 => array( 'id' => 'pageview', 'name' => __( 'Pageview', 'google-analytics-for-wordpress' ) ),
418
+ );
419
+ }
420
+
421
+ /**
422
+ * Get options for the track full url or links setting
423
+ *
424
+ * @return array
425
+ */
426
+ public function get_track_full_url() {
427
+ return array(
428
+ 0 => array( 'id' => 'domain', 'name' => __( 'Just the domain', 'google-analytics-for-wordpress' ) ),
429
+ 1 => array( 'id' => 'full_links', 'name' => __( 'Full links', 'google-analytics-for-wordpress' ) ),
430
+ );
431
+ }
432
+
433
  /**
434
  * Render the admin page head for the GA Plugin
435
  */
512
  return $extensions;
513
  }
514
 
515
+ /**
516
+ * Add a notification to the notification transient
517
+ *
518
+ * @param string $transient_name
519
+ * @param array $settings
520
+ */
521
+ private function add_notification( $transient_name, $settings ) {
522
+ set_transient( $transient_name, $settings, MINUTE_IN_SECONDS );
523
+ }
524
+
525
  /**
526
  * Show the notification that should be set, after showing the notification this function unset the transient
527
  *
admin/class-google-analytics.php CHANGED
@@ -87,12 +87,14 @@ class Yoast_Google_Analytics {
87
  * Wrapper for authenticate the client. If authentication code is send it will get and check an access token.
88
  *
89
  * @param mixed $authentication_code
 
 
90
  */
91
  public function authenticate( $authentication_code = null ) {
92
  // When authentication again we should clean up some stuff
93
  $this->api_cleanup();
94
 
95
- $this->client->authenticate_client( $authentication_code );
96
  }
97
 
98
  /**
87
  * Wrapper for authenticate the client. If authentication code is send it will get and check an access token.
88
  *
89
  * @param mixed $authentication_code
90
+ *
91
+ * @return boolean
92
  */
93
  public function authenticate( $authentication_code = null ) {
94
  // When authentication again we should clean up some stuff
95
  $this->api_cleanup();
96
 
97
+ return $this->client->authenticate_client( $authentication_code );
98
  }
99
 
100
  /**
admin/dashboards/class-admin-dashboards.php CHANGED
@@ -50,7 +50,7 @@ class Yoast_GA_Dashboards {
50
  protected function __construct() {
51
  add_filter( 'ga_extend_dashboards', array( $this, 'extend_dashboards' ), 10, 1 );
52
 
53
- $this->dashboards_disabled = Yoast_GA_Options_Utils::get_instance()->dashboards_disabled();
54
  }
55
 
56
  /**
50
  protected function __construct() {
51
  add_filter( 'ga_extend_dashboards', array( $this, 'extend_dashboards' ), 10, 1 );
52
 
53
+ $this->dashboards_disabled = Yoast_GA_Settings::get_instance()->dashboards_disabled();
54
  }
55
 
56
  /**
admin/pages/dashboard.php CHANGED
@@ -97,7 +97,7 @@ echo $yoast_ga_admin->content_head();
97
  else {
98
  ?>
99
  <div class="ga-form ga-form-input">
100
- <label for="toggle_dimensions" class="ga-form ga-form-checkbox-label ga-form-label-left"><?php echo __( 'Select a dimension', 'google-analytics-for-wordpress' ); ?></label>
101
  </div>
102
  <select data-rel='toggle_dimensions' id="toggle_dimensions" style="width: 350px"></select>
103
 
97
  else {
98
  ?>
99
  <div class="ga-form ga-form-input">
100
+ <label class="ga-form ga-form-checkbox-label ga-form-label-left"><?php echo __( 'Select a dimension', 'google-analytics-for-wordpress' ); ?></label>
101
  </div>
102
  <select data-rel='toggle_dimensions' id="toggle_dimensions" style="width: 350px"></select>
103
 
admin/pages/settings-api.php DELETED
@@ -1,123 +0,0 @@
1
- <?php
2
- /**
3
- * @package GoogleAnalytics\AdminSettingsFieldsView
4
- */
5
-
6
- global $yoast_ga_admin;
7
-
8
- echo $yoast_ga_admin->content_head();
9
- ?>
10
- <h2 id="yoast_ga_title"><?php echo __( 'Google Analytics by Yoast: ', 'google-analytics-for-wordpress' ) . __( 'Settings', 'google-analytics-for-wordpress' ); ?></h2>
11
-
12
- <?php
13
- settings_errors( 'yoast_google_analytics' );
14
- ?>
15
-
16
- <h2 class="nav-tab-wrapper" id="ga-tabs">
17
- <a class="nav-tab" id="yst_ga_general-tab" href="#top#yst_ga_general"><?php _e( 'General', 'google-analytics-for-wordpress' ); ?></a>
18
- <a class="nav-tab" id="yst_ga_universal-tab" href="#top#yst_ga_universal"><?php _e( 'Universal', 'google-analytics-for-wordpress' ); ?></a>
19
- <a class="nav-tab" id="yst_ga_advanced-tab" href="#top#yst_ga_advanced"><?php _e( 'Advanced', 'google-analytics-for-wordpress' ); ?></a>
20
- <?php do_action( 'yst_ga_custom_tabs-tab' ); ?>
21
- <a class="nav-tab" id="yst_ga_debugmode-tab" href="#top#yst_ga_debugmode"><?php _e( 'Debug mode', 'google-analytics-for-wordpress' ); ?></a>
22
- </h2>
23
-
24
- <form method="post" action="<?php echo admin_url( 'options.php' ); ?>" id="yoast-ga-form-settings">
25
- <input type="hidden" name="yst_ga[ga_general][return_tab]" id="return_tab" value="general" />
26
- <div class="tabwrapper">
27
- <div id="yst_ga_general" class="gatab">
28
- <div id="google_ua_code_field" class="ga-promote">
29
- <?php
30
- $ga_class = Yoast_Google_Analytics::get_instance();
31
- $wp_block_google = $ga_class->check_google_access_from_wp();
32
- $check_google_access = $ga_class->check_google_access();
33
- $profiles = $ga_class->get_profiles();
34
-
35
- if ( $wp_block_google === false || $check_google_access === false ) {
36
- echo '<h3>' . __( 'Cannot connect to Google', 'google-analytics-for-wordpress' ) . '</h3>';
37
- if ( $wp_block_google === false && $check_google_access === false ) {
38
- echo '<p>' . __( 'Your server is blocking requests to Google, to fix this, add <code>*.googleapis.com</code> to the <code>WP_ACCESSIBLE_HOSTS</code> constant in your <em>wp-config.php</em> or ask your webhost to do this.', 'google-analytics-for-wordpress' ) . '</p>';
39
- }
40
- else {
41
- echo '<p>' . __( 'Your firewall or webhost is blocking requests to Google, please ask your webhost company to fix this.', 'google-analytics-for-wordpress' ) . '</p>';
42
- }
43
- echo '<p>' . __( 'Until this is fixed, you can only use the manual authentication method and cannot use the dashboards feature.', 'google-analytics-for-wordpress' ) . '</p>';
44
- }
45
- else {
46
- $auth_url = $ga_class->create_auth_url();
47
- add_thickbox();
48
-
49
- echo '<script>yst_thickbox_heading = "' . __( 'Paste your Google authentication code', 'google-analytics-for-wordpress' ) . '";</script>';
50
- echo '<div id="oauth_code" class="ga-form ga-form-input">';
51
- echo '<label class="ga-form ga-form-text-label ga-form-label-left" id="yoast-ga-form-label-text-ga-authwithgoogle">' . __( 'Paste your Google code here', 'google-analytics-for-wordpress' ) . ':';
52
- echo '<input type="text" name="yst_ga[ga_general][google_auth_code]"></label>';
53
- echo '<div class="ga-form ga-form-input"><input type="submit" name="ga-form-settings" value="' . __( 'Save authentication code', 'google-analytics-for-wordpress' ) . '" class="button button-primary ga-form-submit" id="yoast-ga-form-submit-settings" onclick="yst_closepopupwindow();"></div>';
54
- echo '</div>';
55
-
56
- echo '<table class="form-table"><tbody><tr><th scope="row">' . __( 'Authenticate with Google', 'google-analytics-for-wordpress' ) . '</th>';
57
- if ( empty( $profiles ) ) {
58
- echo '<td><a id="yst_ga_authenticate" class="button" onclick="yst_popupwindow(\'' . $auth_url . '\',500,500);">' . __( 'Click here to authenticate with your Google account', 'google-analytics-for-wordpress' ) . '</a></td>';
59
- }
60
- else {
61
- echo '<td><a id="yst_ga_authenticate" class="button" onclick="yst_popupwindow(\'' . $auth_url . '\',500,500);">' . __( 'Re-authenticate with your Google account', 'google-analytics-for-wordpress' ) . '</a></td>';
62
- }
63
- echo'</tr>';
64
- $current_profile = $yoast_ga_admin->get_current_profile( true );
65
- if ( ! empty ( $current_profile ) ) {
66
- echo '<tr><th scope="row">' . __( 'Current UA code', 'google-analytics-for-wordpress' ) . ':</th><td>' . $yoast_ga_admin->get_current_profile( true ) . '</td></tr>';
67
- }
68
- echo '</table>';
69
- }
70
-
71
-
72
- settings_fields( 'yst_ga_settings_api_ua_code' );
73
- do_settings_sections( 'yst_ga_settings_api_ua_code' );
74
- ?>
75
- <p id="manual_ua_code_warning"><strong style="color: red;"><?php _e( 'Warning: If you use a manual UA code, you won\'t be able to use the dashboards.', 'google-analytics-for-wordpress' ); ?></strong></p>
76
- </div>
77
- <?php
78
- settings_fields( 'yst_ga_settings_api_general' );
79
- do_settings_sections( 'yst_ga_settings_api_general' );
80
- ?>
81
- </div>
82
- <div id="yst_ga_universal" class="gatab">
83
- <?php
84
- settings_fields( 'yst_ga_settings_api_universal' );
85
- do_settings_sections( 'yst_ga_settings_api_universal' );
86
- ?>
87
- </div>
88
- <div id="yst_ga_advanced" class="gatab">
89
- <?php
90
- settings_fields( 'yst_ga_settings_api_advanced' );
91
- do_settings_sections( 'yst_ga_settings_api_advanced' );
92
- ?>
93
- </div>
94
- <?php do_action( 'yst_ga_custom_tabs-content' ); ?>
95
- <div id="yst_ga_debugmode" class="gatab">
96
- <?php
97
- echo '<div id="ga-promote">';
98
- echo '<p class="ga-topdescription">' . __( 'If you want to confirm that tracking on your blog is working as it should, enable this option and check the console of your browser. Be absolutely sure to disable debugging afterwards, as it is slower than normal tracking.', 'google-analytics-for-wordpress' ) . '</p>';
99
- echo '<p class="ga-topdescription">' . __( '<strong>Note</strong> the debugging is only loaded for administrators.', 'google-analytics-for-wordpress' ) . '</p>';
100
- echo '</div>';
101
-
102
- settings_fields( 'yst_ga_settings_api_debug' );
103
- do_settings_sections( 'yst_ga_settings_api_debug' );
104
- ?>
105
- </div>
106
- <?php
107
- submit_button();
108
- ?>
109
- </div>
110
- </form>
111
-
112
- <?php
113
- echo $yoast_ga_admin->content_footer();
114
- ?>
115
- <script type="text/javascript">
116
- jQuery(document).ready(
117
- function () {
118
- jQuery('.chosen').chosen({
119
- placeholder_text_multiple: '<?php echo __( 'Select the users to ignore', 'google-analytics-for-wordpress' ); ?>'
120
- });
121
- }
122
- );
123
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/pages/settings.php ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package GoogleAnalytics\Admin
4
+ */
5
+
6
+ global $yoast_ga_admin;
7
+
8
+ echo $yoast_ga_admin->content_head();
9
+ ?>
10
+ <h2 id="yoast_ga_title"><?php echo __( 'Google Analytics by Yoast: ', 'google-analytics-for-wordpress' ) . __( 'Settings', 'google-analytics-for-wordpress' ); ?></h2>
11
+
12
+ <?php
13
+ settings_errors( 'yoast_google_analytics' );
14
+ ?>
15
+
16
+ <h2 class="nav-tab-wrapper" id="ga-tabs">
17
+ <a class="nav-tab" id="general-tab" href="#top#general"><?php _e( 'General', 'google-analytics-for-wordpress' ); ?></a>
18
+ <a class="nav-tab" id="universal-tab" href="#top#universal"><?php _e( 'Universal', 'google-analytics-for-wordpress' ); ?></a>
19
+ <a class="nav-tab" id="advanced-tab" href="#top#advanced"><?php _e( 'Advanced', 'google-analytics-for-wordpress' ); ?></a>
20
+ <a class="nav-tab" id="customdimensions-tab" href="#top#customdimensions"><?php _e( 'Custom Dimensions', 'google-analytics-for-wordpress' ); ?></a>
21
+ <?php do_action( 'yst_ga_custom_tabs-tab' ); ?>
22
+ <a class="nav-tab" id="debugmode-tab" href="#top#debugmode"><?php _e( 'Debug mode', 'google-analytics-for-wordpress' ); ?></a>
23
+ </h2>
24
+
25
+ <?php
26
+ echo Yoast_GA_Admin_Form::create_form( 'settings' );
27
+ ?>
28
+ <input type="hidden" name="return_tab" id="return_tab" value="general" />
29
+ <div class="tabwrapper">
30
+ <div id="general" class="gatab">
31
+ <?php
32
+ echo '<h2>' . __( 'General settings', 'google-analytics-for-wordpress' ) . '</h2>';
33
+
34
+ echo '<div id="ga-promote">';
35
+
36
+ $ga_class = Yoast_Google_Analytics::get_instance();
37
+ $wp_block_google = $ga_class->check_google_access_from_wp();
38
+ $check_google_access = $ga_class->check_google_access();
39
+
40
+ if ( $wp_block_google && $check_google_access ) {
41
+
42
+ $profiles = Yoast_GA_Admin_Form::parse_optgroups( $yoast_ga_admin->get_profiles() );
43
+
44
+ $auth_url = Yoast_Google_Analytics::get_instance()->create_auth_url();
45
+ add_thickbox();
46
+ echo '<script>yst_thickbox_heading = "' . __( 'Paste your Google authentication code', 'google-analytics-for-wordpress' ) . '";</script>';
47
+
48
+ echo "<div id='google_ua_code_field'>";
49
+ if ( count( $profiles ) == 0 ) {
50
+ echo '<div class="ga-form ga-form-input">';
51
+ echo '<label class="ga-form ga-form-text-label ga-form-label-left" id="yoast-ga-form-label-text-ga-authwithgoogle">' . __( 'Google profile', 'google-analytics-for-wordpress' ) . ':</label>';
52
+ echo '<a id="yst_ga_authenticate" class="button" onclick="yst_popupwindow(\'' . $auth_url . '\',500,500);">' . __( 'Authenticate with your Google account', 'google-analytics-for-wordpress' ) . '</a>';
53
+ echo '</div>';
54
+ echo '<div class="ga-form ga-form-input">';
55
+ echo '<label class="ga-form ga-form-text-label ga-form-label-left" id="yoast-ga-form-label-text-ga-authwithgoogle">' . __( 'Current UA-profile', 'google-analytics-for-wordpress' ) . '</label>';
56
+ echo esc_html( $yoast_ga_admin->get_tracking_code() );
57
+ echo '</div>';
58
+ }
59
+ else {
60
+ echo Yoast_GA_Admin_Form::select( __( 'Analytics profile', 'google-analytics-for-wordpress' ), 'analytics_profile', $profiles, null, false, __( 'Select a profile', 'google-analytics-for-wordpress' ) );
61
+
62
+ echo '<div class="ga-form ga-form-input">';
63
+ echo '<label class="ga-form ga-form-text-label ga-form-label-left" id="yoast-ga-form-label-text-ga-authwithgoogle">&nbsp;</label>';
64
+ echo '<a id="yst_ga_authenticate" class="button" onclick="yst_popupwindow(\'' . $auth_url . '\',500,500);">' . __( 'Re-authenticate with your Google account', 'google-analytics-for-wordpress' ) . '</a>';
65
+ echo '</div>';
66
+ }
67
+ echo '</div>';
68
+
69
+ echo '<div id="oauth_code" class="ga-form ga-form-input">';
70
+ echo '<label class="ga-form ga-form-text-label ga-form-label-left" id="yoast-ga-form-label-text-ga-authwithgoogle">' . __( 'Paste your Google code here', 'google-analytics-for-wordpress' ) . ':</label>';
71
+ echo Yoast_GA_Admin_Form::input( 'text', null, 'google_auth_code', null, null );
72
+
73
+ echo '<label class="ga-form ga-form-text-label ga-form-label-left" id="yoast-ga-form-label-text-ga-authwithgoogle-submit">&nbsp;</label>';
74
+ echo '<div class="ga-form ga-form-input"><input type="submit" name="ga-form-settings" value="' . __( 'Save authentication code', 'google-analytics-for-wordpress' ) . '" class="button button-primary ga-form-submit" id="yoast-ga-form-submit-settings" onclick="yst_closepopupwindow();"></div>';
75
+ echo '</div>';
76
+ }
77
+ else {
78
+ echo '<h3>' . __( 'Cannot connect to Google', 'google-analytics-for-wordpress' ) . '</h3>';
79
+ if ( $wp_block_google == false && $check_google_access == false ) {
80
+ echo '<p>' . __( 'Your server is blocking requests to Google, to fix this, add <code>*.googleapis.com</code> to the <code>WP_ACCESSIBLE_HOSTS</code> constant in your <em>wp-config.php</em> or ask your webhost to do this.', 'google-analytics-for-wordpress' ) . '</p>';
81
+ }
82
+ else {
83
+ echo '<p>' . __( 'Your firewall or webhost is blocking requests to Google, please ask your webhost company to fix this.', 'google-analytics-for-wordpress' ) . '</p>';
84
+ }
85
+ echo '<p>' . __( 'Until this is fixed, you can only use the manual authentication method and cannot use the dashboards feature.', 'google-analytics-for-wordpress' ) . '</p>';
86
+ }
87
+
88
+ echo '<label class="ga-form ga-form-checkbox-label ga-form-label-left">';
89
+ echo Yoast_GA_Admin_Form::input( 'checkbox', null, 'manual_ua_code', __( 'Manually enter your UA code', 'google-analytics-for-wordpress' ) );
90
+ echo '</label>';
91
+ echo '<div id="enter_ua">';
92
+ echo Yoast_GA_Admin_Form::input( 'text', null, 'manual_ua_code_field' );
93
+ echo '<p><strong>' . __( 'Warning: If you use a manual UA code, you won\'t be able to use the dashboards.', 'google-analytics-for-wordpress' ) . '</strong></p>';
94
+ echo '</div>';
95
+ echo '<div class="clear"></div></div>';
96
+ ?>
97
+ <div class="clear"><br /></div>
98
+ <?php
99
+ echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Track outbound click and downloads', 'google-analytics-for-wordpress' ), 'track_outbound', null, __( 'Clicks and downloads will be tracked as events, you can find these under Content &#xBB; Event Tracking in your Google Analytics reports.', 'google-analytics-for-wordpress' ) );
100
+ echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Allow tracking of anonymous data', 'google-analytics-for-wordpress' ), 'anonymous_data', null, __( 'By allowing us to track anonymous data we can better help you, because we know with which WordPress configurations, themes and plugins we should test. No personal data will be submitted.', 'google-analytics-for-wordpress' ) );
101
+ echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Anonymize IPs', 'google-analytics-for-wordpress' ), 'anonymize_ips', null, sprintf( __( 'This adds %1$s, telling Google Analytics to anonymize the information sent by the tracker objects by removing the last octet of the IP address prior to its storage.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApi_gat?csw=1#_gat._anonymizeIp" target="_blank"><code>_anonymizeIp</code></a>' ) );
102
+ echo Yoast_GA_Admin_Form::select( __( 'Ignore users', 'google-analytics-for-wordpress' ), 'ignore_users', $yoast_ga_admin->get_userroles(), __( 'Users of the role you select will be ignored, so if you select Editor, all Editors will be ignored.', 'google-analytics-for-wordpress' ), true );
103
+ echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Disable analytics dashboard', 'google-analytics-for-wordpress' ), 'dashboards_disabled', null, __( 'This will completely disable the dashboard and stop the plugin from fetching the latest analytics data.', 'google-analytics-for-wordpress' ) );
104
+ ?>
105
+ </div>
106
+ <div id="universal" class="gatab">
107
+ <?php
108
+ echo '<h2>' . __( 'Universal settings', 'google-analytics-for-wordpress' ) . '</h2>';
109
+ echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Enable Universal tracking', 'google-analytics-for-wordpress' ), 'enable_universal', null, sprintf( __( 'First enable Universal tracking in your Google Analytics account. Please read %1$sthis guide%2$s to learn how to do that.', 'google-analytics-for-wordpress' ), '<a href="http://kb.yoast.com/article/125-universal-analytics#utm_medium=kb-link&utm_source=gawp-config&utm_campaign=wpgaplugin" target="_blank">', '</a>' ) );
110
+ echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Enable Demographics and Interest Reports', 'google-analytics-for-wordpress' ), 'demographics', null, sprintf( __( 'You have to enable the Demographics in Google Analytics before you can see the tracking data. We have a knowledge base article in our %1$sknowledge base%2$s about this feature.', 'google-analytics-for-wordpress' ), '<a href="http://kb.yoast.com/article/154-enable-demographics-and-interests-report-in-google-analytics/#utm_medium=kb-link&amp;utm_source=gawp-config&amp;utm_campaign=wpgaplugin" target="_blank">', '</a>' ) );
111
+ echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Enhanced Link Attribution', 'google-analytics-for-wordpress' ), 'enhanced_link_attribution', null, sprintf( __( 'Add %1$sEnhanced Link Attribution%2$s to your tracking code.', 'google-analytics-for-wordpress' ), '<a href="https://support.google.com/analytics/answer/2558867" target="_blank">', ' </a>' ) );
112
+ ?>
113
+ </div>
114
+ <div id="advanced" class="gatab">
115
+ <?php
116
+ echo '<h2>' . __( 'Advanced settings', 'google-analytics-for-wordpress' ) . '</h2>';
117
+ echo Yoast_GA_Admin_Form::select( __( 'Track downloads as', 'google-analytics-for-wordpress' ), 'track_download_as', $yoast_ga_admin->track_download_types(), __( 'Not recommended, as this would skew your statistics, but it does make it possible to track downloads as goals.', 'google-analytics-for-wordpress' ) );
118
+ echo Yoast_GA_Admin_Form::input( 'text', __( 'Extensions of files to track as downloads', 'google-analytics-for-wordpress' ), 'extensions_of_files', null, 'Please separate extensions using commas' );
119
+ echo Yoast_GA_Admin_Form::select( __( 'Track full URL of outbound clicks or just the domain', 'google-analytics-for-wordpress' ), 'track_full_url', $yoast_ga_admin->get_track_full_url() );
120
+ echo Yoast_GA_Admin_Form::input( 'text', __( 'Subdomain tracking', 'google-analytics-for-wordpress' ), 'subdomain_tracking', null, sprintf( __( 'This allows you to set the domain that\'s set by %1$s for tracking subdomains.<br/>If empty, this will not be set.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiDomainDirectory#_gat.GA_Tracker_._setDomainName" target="_blank"><code>_setDomainName</code></a>' ) );
121
+
122
+ echo Yoast_GA_Admin_Form::input( 'text', __( 'Set path for internal links to track as outbound links', 'google-analytics-for-wordpress' ), 'track_internal_as_outbound', null, sprintf( __( 'If you want to track all internal links that begin with %1$s, enter %1$s in the box above. If you have multiple prefixes you can separate them with comma\'s: %2$s', 'google-analytics-for-wordpress' ), '<code>/out/</code>', '<code>/out/,/recommends/</code>' ) );
123
+ echo Yoast_GA_Admin_Form::input( 'text', __( 'Label for those links', 'google-analytics-for-wordpress' ), 'track_internal_as_label', null, 'The label to use for these links, this will be added to where the click came from, so if the label is "aff", the label for a click from the content of an article becomes "outbound-article-aff".' );
124
+
125
+ echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Tag links in RSS feed with campaign variables', 'google-analytics-for-wordpress' ), 'tag_links_in_rss', null, __( 'Do not use this feature if you use FeedBurner, as FeedBurner can do this automatically and better than this plugin can. Check <a href="https://support.google.com/feedburner/answer/165769?hl=en&amp;ref_topic=13075" target="_blank">this help page</a> for info on how to enable this feature in FeedBurner.', 'google-analytics-for-wordpress' ) );
126
+ echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Allow anchor', 'google-analytics-for-wordpress' ), 'allow_anchor', null, sprintf( __( 'This adds a %1$s call to your tracking code, and makes RSS link tagging use a %2$s as well.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiCampaignTracking?csw=1#_gat.GA_Tracker_._setAllowAnchor" target="_blank"><code>_setAllowAnchor</code></a>', '<code>#</code>' ) );
127
+ echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Add <code>_setAllowLinker</code>', 'google-analytics-for-wordpress' ), 'add_allow_linker', null, sprintf( __( 'This adds a %1$s call to your tracking code, allowing you to use %2$s and related functions.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiDomainDirectory?csw=1#_gat.GA_Tracker_._setAllowLinker" target="_blank"><code>_setAllowLinker</code></a>', ' <code>_link</code>' ) );
128
+ echo Yoast_GA_Admin_Form::textarea( __( 'Custom code', 'google-analytics-for-wordpress' ), 'custom_code', sprintf( __( 'Not for the average user: this allows you to add a line of code, to be added before the %1$s call.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#_gat.GA_Tracker_._trackPageview" target="_blank"><code>_trackPageview</code></a>' ) );
129
+
130
+ do_action( 'yst_ga_advanced-tab' );
131
+ ?>
132
+ </div>
133
+ <div id="customdimensions" class="gatab">
134
+ <?php
135
+ echo '<h2>' . __( 'Custom dimensions', 'google-analytics-for-wordpress' ) . '</h2>';
136
+ do_action( 'yst_ga_custom_dimensions_tab-content' );
137
+ ?>
138
+ </div>
139
+ <?php do_action( 'yst_ga_custom_tabs-content' ); ?>
140
+ <div id="debugmode" class="gatab">
141
+ <?php
142
+ echo '<h2>' . __( 'Debug', 'google-analytics-for-wordpress' ) . '</h2>';
143
+
144
+ echo '<div id="ga-promote">';
145
+ echo '<p class="ga-topdescription">' . __( 'If you want to confirm that tracking on your blog is working as it should, enable this option and check the console of your browser. Be absolutely sure to disable debugging afterwards, as it is slower than normal tracking.', 'google-analytics-for-wordpress' ) . '</p>';
146
+ echo '<p class="ga-topdescription">' . __( '<strong>Note</strong> the debugging is only loaded for administrators.', 'google-analytics-for-wordpress' ) . '</p>';
147
+ echo '</div>';
148
+ echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Enable debug mode', 'google-analytics-for-wordpress' ), 'debug_mode' );
149
+ ?>
150
+ </div>
151
+ </div>
152
+ <?php
153
+ echo Yoast_GA_Admin_Form::end_form( __( 'Save changes', 'google-analytics-for-wordpress' ), 'settings', 'yst_closepopupwindow();' );
154
+ echo $yoast_ga_admin->content_footer();
155
+ ?>
156
+ <script type="text/javascript">
157
+ jQuery(document).ready(
158
+ function () {
159
+ jQuery('#yoast-ga-form-select-settings-analytics_profile').chosen({
160
+ group_search: true
161
+ });
162
+ jQuery('#yoast-ga-form-select-settings-ignore_users').chosen({placeholder_text_multiple: '<?php echo __( 'Select the users to ignore', 'google-analytics-for-wordpress' ); ?>'});
163
+ }
164
+ );
165
+ </script>
admin/views/custom-dimensions-upsell.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
- /**
3
- * @package GoogleAnalytics\AdminUpSellView
4
- */
5
-
6
- ?>
7
- <?php if ( $add_tab_div === true ) : ?>
8
- <div id="yst_ga_custom_dimensions" class="gatab">
9
- <?php endif; ?>
10
- <div class="ga-promote">
11
- <p>
12
- <?php
13
- printf( __( 'If you want to track custom dimensions like page views per author or post type, you should upgrade to the %1$spremium version of Google Analytics by Yoast%2$s.', 'google-analytics-for-wordpress' ), '<a href="https://yoast.com/wordpress/plugins/google-analytics/#utm_medium=text-link&utm_source=gawp-config&utm_campaign=wpgaplugin&utm_content=custom_dimensions_tab">', '</a>' );
14
- echo ' ';
15
- _e( 'This will also give you email access to the support team at Yoast, who will provide support on the plugin 24/7.', 'google-analytics-for-wordpress' );
16
- ?>
17
- </p>
18
- </div>
19
- <?php if ( $add_tab_div === true ) : ?>
20
- </div>
21
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/yoast_ga_styles.css CHANGED
@@ -118,10 +118,6 @@ p.ga-topdescription {
118
  width: 325px;
119
  }
120
 
121
- .chosen-search input[type="text"] {
122
- width: 100% !important;
123
- }
124
-
125
  #yoast-ga-form-settings #oauth_code {
126
  padding: 20px;
127
  }
118
  width: 325px;
119
  }
120
 
 
 
 
 
121
  #yoast-ga-form-settings #oauth_code {
122
  padding: 20px;
123
  }
assets/css/yoast_ga_styles.min.css CHANGED
@@ -1 +1 @@
1
- h2#yoast_ga_title{padding:9px 15px 4px 0;font-size:23px;font-weight:400;line-height:29px}.nav-tab-wrapper{margin-bottom:20px}.gatab{display:none}.gatab.active{display:block;padding:.5em .9em;border:1px solid #ddd;border-radius:0 3px 3px;background-color:#fff}.tabwrapper .gatab{padding:0;border:none;background:0 0}.tabwrapper .gatab h2{padding:9px 15px 4px 0;font-size:23px;font-weight:400}.ga-form-submit{margin-top:20px}.ga-form-label-left{float:left;width:250px;margin:0 0 0 5px;font-size:14px;font-weight:700;cursor:default}.ga-form-input{margin-top:10px}#yoast-ga-wrapper{display:table;width:auto;max-width:1150px}.yoast-ga-content{display:table-cell;min-width:850px;height:500px;margin:0;padding:0;vertical-align:top}.yoast-ga-banners{display:table-cell;width:261px;height:500px;margin:0;padding:20px;vertical-align:top}.ga-form-input{display:table;margin-bottom:20px}.ga-form-table{display:table-cell}.ga-form-description{display:block;float:right;max-width:325px;color:#999}p.ga-topdescription{max-width:600px}#ga-promote,.ga-promote{max-width:600px;padding-left:10px;border:1px solid #ccc;background-color:#fff}.ga-promote{margin-bottom:10px}#ga-promote p,.ga-promote p{margin:0;padding:1em 1em 1em 0}#yoast-ga-form-settings input[type=text]{width:325px}.chosen-search input[type=text]{width:100%!important}#yoast-ga-form-settings #oauth_code{padding:20px}#yoast-ga-form-settings #oauth_code div{margin:0 0 0 5px}#yoast-ga-form-settings #oauth_code input[type=text]{width:275px}.ga-form .chosen-search input[type=text]{width:100%!important}.yoast-ga-content .chosen-container{width:325px!important}#enter_ua{display:none;margin-top:10px;padding-top:10px}#yoast-ga-form-text-settings-ga_general-manual_ua_code_field{margin-top:-30px}select.ga-multiple{width:300px;height:150px!important}.wpseotab .extension{float:left;box-sizing:border-box;width:350px;height:230px;margin:10px 20px 10px 0;border:1px solid #ccc}.wpseotab .extension p{margin:0;padding:10px}.wpseotab .extension h3{box-sizing:border-box;height:110px;margin:0;padding:20px 10px 0 120px;border-bottom:1px solid #ccc;background:left 10px/130px 100px no-repeat #fff}.wpseotab .extension button.installed{border-color:#00a000;background-color:#00a000;cursor:default}.wpseotab .extension .button-primary.activate-link{border-color:#f06000;background-color:#f18500}.extension a{text-decoration:none}.ecommerce h3{background-image:url(../img/eComm_130x100.png)!important}.ga_premium h3{background-image:url(../img/ga-premium-banner.png)!important}#ga-debug-info h3{height:30px;margin-top:10px;padding-left:16px;font-size:14px}.yoast_help{margin:2px 5px 0}#enter_ua div{display:inline-block;margin:0}
1
+ h2#yoast_ga_title{padding:9px 15px 4px 0;font-size:23px;font-weight:400;line-height:29px}.nav-tab-wrapper{margin-bottom:20px}.gatab{display:none}.gatab.active{display:block;padding:.5em .9em;border:1px solid #ddd;border-radius:0 3px 3px;background-color:#fff}.tabwrapper .gatab{padding:0;border:none;background:0 0}.tabwrapper .gatab h2{padding:9px 15px 4px 0;font-size:23px;font-weight:400}.ga-form-submit{margin-top:20px}.ga-form-label-left{float:left;width:250px;margin:0 0 0 5px;font-size:14px;font-weight:700;cursor:default}.ga-form-input{margin-top:10px}#yoast-ga-wrapper{display:table;width:auto;max-width:1150px}.yoast-ga-content{display:table-cell;min-width:850px;height:500px;margin:0;padding:0;vertical-align:top}.yoast-ga-banners{display:table-cell;width:261px;height:500px;margin:0;padding:20px;vertical-align:top}.ga-form-input{display:table;margin-bottom:20px}.ga-form-table{display:table-cell}.ga-form-description{display:block;float:right;max-width:325px;color:#999}p.ga-topdescription{max-width:600px}#ga-promote,.ga-promote{max-width:600px;padding-left:10px;border:1px solid #ccc;background-color:#fff}.ga-promote{margin-bottom:10px}#ga-promote p,.ga-promote p{margin:0;padding:1em 1em 1em 0}#yoast-ga-form-settings input[type=text]{width:325px}#yoast-ga-form-settings #oauth_code{padding:20px}#yoast-ga-form-settings #oauth_code div{margin:0 0 0 5px}#yoast-ga-form-settings #oauth_code input[type=text]{width:275px}.ga-form .chosen-search input[type=text]{width:100%!important}.yoast-ga-content .chosen-container{width:325px!important}#enter_ua{display:none;margin-top:10px;padding-top:10px}#yoast-ga-form-text-settings-ga_general-manual_ua_code_field{margin-top:-30px}select.ga-multiple{width:300px;height:150px!important}.wpseotab .extension{float:left;box-sizing:border-box;width:350px;height:230px;margin:10px 20px 10px 0;border:1px solid #ccc}.wpseotab .extension p{margin:0;padding:10px}.wpseotab .extension h3{box-sizing:border-box;height:110px;margin:0;padding:20px 10px 0 120px;border-bottom:1px solid #ccc;background:left 10px/130px 100px no-repeat #fff}.wpseotab .extension button.installed{border-color:#00a000;background-color:#00a000;cursor:default}.wpseotab .extension .button-primary.activate-link{border-color:#f06000;background-color:#f18500}.extension a{text-decoration:none}.ecommerce h3{background-image:url(../img/eComm_130x100.png)!important}.ga_premium h3{background-image:url(../img/ga-premium-banner.png)!important}#ga-debug-info h3{height:30px;margin-top:10px;padding-left:16px;font-size:14px}.yoast_help{margin:2px 5px 0}#enter_ua div{display:inline-block;margin:0}
assets/js/yoast_ga_admin.js CHANGED
@@ -93,25 +93,4 @@ jQuery(document).ready(function() {
93
  name: 'blue'
94
  }
95
  });
96
-
97
- jQuery('#ga_form_manual_ua_code').click(function() {
98
- handle_settings_form();
99
- });
100
-
101
- handle_settings_form();
102
-
103
- function handle_settings_form() {
104
- if ( jQuery('#ga_form_manual_ua_code').attr("checked") ) {
105
- jQuery('#ga_form_manual_ua_code_field').closest('tr').show(); // Show parent tr
106
- jQuery('#yst_ga_authenticate').closest('tr').hide(); // Show parent tr
107
- jQuery('#manual_ua_code_warning').show();
108
- jQuery('#ga_form_analytics_profile').prop('disabled', true).trigger("chosen:updated");
109
- }
110
- else{
111
- jQuery('#ga_form_manual_ua_code_field').closest('tr').hide(); // Hide parent tr
112
- jQuery('#yst_ga_authenticate').closest('tr').show(); // Hide parent tr
113
- jQuery('#manual_ua_code_warning').hide();
114
- jQuery('#ga_form_analytics_profile').prop('disabled', false).trigger("chosen:updated");
115
- }
116
- }
117
  });
93
  name: 'blue'
94
  }
95
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  });
assets/js/yoast_ga_admin.min.js CHANGED
@@ -1 +1 @@
1
- function yst_popupwindow(a,b,c){"use strict";var d=screen.width/2-b/2,e=screen.height/8;authwindow=window.open(a,"yst_ga_auth_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+b+", height="+c+", top="+e+", left="+d)}function yst_closepopupwindow(){authwindow.close()}function yst_ga_switch_manual(){if(jQuery("#yoast-ga-form-checkbox-settings-manual_ua_code").is(":checked")){var a=!0;jQuery("#enter_ua").show(),jQuery("#oauth_code").hide()}else{var a=!1;jQuery("#enter_ua").hide(),jQuery("#yoast-ga-form-text-settings-manual_ua_code_field").attr("value",""),jQuery("#oauth_code").hide()}jQuery("#yoast-ga-form-select-settings-analytics_profile").prop("disabled",a).trigger("chosen:updated"),jQuery("#yst_ga_authenticate").attr("disabled",a)}var authwindow;jQuery(document).ready(function(){"use strict";function a(){jQuery("#ga_form_manual_ua_code").attr("checked")?(jQuery("#ga_form_manual_ua_code_field").closest("tr").show(),jQuery("#yst_ga_authenticate").closest("tr").hide(),jQuery("#manual_ua_code_warning").show(),jQuery("#ga_form_analytics_profile").prop("disabled",!0).trigger("chosen:updated")):(jQuery("#ga_form_manual_ua_code_field").closest("tr").hide(),jQuery("#yst_ga_authenticate").closest("tr").show(),jQuery("#manual_ua_code_warning").hide(),jQuery("#ga_form_analytics_profile").prop("disabled",!1).trigger("chosen:updated"))}jQuery("#ga-tabs").find("a").click(function(){jQuery("#ga-tabs").find("a").removeClass("nav-tab-active"),jQuery(".gatab").removeClass("active");var a=jQuery(this).attr("id").replace("-tab","");jQuery("#"+a).addClass("active"),jQuery(this).addClass("nav-tab-active"),jQuery("#return_tab").val(a)}),jQuery("a.activate-link").click(function(){jQuery("#extensions.wpseotab").removeClass("active"),jQuery("#extensions-tab").removeClass("nav-tab-active"),jQuery("#licenses.wpseotab").addClass("active"),jQuery("#licenses-tab").addClass("nav-tab-active")});var b=window.location.hash.replace("#top#","");(""===b||"#_=_"===b)&&(b=jQuery(".gatab").attr("id")),jQuery("#"+b).addClass("active"),jQuery("#"+b+"-tab").addClass("nav-tab-active"),jQuery("#yoast-ga-form-checkbox-settings-manual_ua_code").click(yst_ga_switch_manual),yst_ga_switch_manual(),jQuery("#oauth_code").hide(),jQuery("#yst_ga_authenticate").click(function(){jQuery("#oauth_code").show(),Focusable.setFocus(jQuery("#oauth_code"),{hideOnESC:!0}),jQuery("#oauth_code input").focus()}),jQuery(".nav-tab-active").click(),jQuery(".yoast_help").qtip({position:{corner:{target:"topMiddle",tooltip:"bottomLeft"}},show:{when:{event:"mouseover"}},hide:{fixed:!0,when:{event:"mouseout"}},style:{tip:"bottomLeft",name:"blue"}}),jQuery("#ga_form_manual_ua_code").click(function(){a()}),a()});
1
+ function yst_popupwindow(e,t,n){"use strict";var r=screen.width/2-t/2;var i=screen.height/8;authwindow=window.open(e,"yst_ga_auth_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+t+", height="+n+", top="+i+", left="+r)}function yst_closepopupwindow(){authwindow.close()}function yst_ga_switch_manual(){if(jQuery("#yoast-ga-form-checkbox-settings-manual_ua_code").is(":checked")){var e=true;jQuery("#enter_ua").show();jQuery("#oauth_code").hide()}else{var e=false;jQuery("#enter_ua").hide();jQuery("#yoast-ga-form-text-settings-manual_ua_code_field").attr("value","");jQuery("#oauth_code").hide()}jQuery("#yoast-ga-form-select-settings-analytics_profile").prop("disabled",e).trigger("chosen:updated");jQuery("#yst_ga_authenticate").attr("disabled",e)}var authwindow;jQuery(document).ready(function(){"use strict";jQuery("#ga-tabs").find("a").click(function(){jQuery("#ga-tabs").find("a").removeClass("nav-tab-active");jQuery(".gatab").removeClass("active");var e=jQuery(this).attr("id").replace("-tab","");jQuery("#"+e).addClass("active");jQuery(this).addClass("nav-tab-active");jQuery("#return_tab").val(e)});jQuery("a.activate-link").click(function(){jQuery("#extensions.wpseotab").removeClass("active");jQuery("#extensions-tab").removeClass("nav-tab-active");jQuery("#licenses.wpseotab").addClass("active");jQuery("#licenses-tab").addClass("nav-tab-active")});var e=window.location.hash.replace("#top#","");if(e===""||e==="#_=_"){e=jQuery(".gatab").attr("id")}jQuery("#"+e).addClass("active");jQuery("#"+e+"-tab").addClass("nav-tab-active");jQuery("#yoast-ga-form-checkbox-settings-manual_ua_code").click(yst_ga_switch_manual);yst_ga_switch_manual();jQuery("#oauth_code").hide();jQuery("#yst_ga_authenticate").click(function(){jQuery("#oauth_code").show();Focusable.setFocus(jQuery("#oauth_code"),{hideOnESC:true});jQuery("#oauth_code input").focus()});jQuery(".nav-tab-active").click();jQuery(".yoast_help").qtip({position:{corner:{target:"topMiddle",tooltip:"bottomLeft"}},show:{when:{event:"mouseover"}},hide:{fixed:true,when:{event:"mouseout"}},style:{tip:"bottomLeft",name:"blue"}})})
googleanalytics.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  /**
3
- * @package GoogleAnalytics\Main
 
4
  */
5
 
6
  /**
@@ -8,7 +9,7 @@
8
  * Plugin URI: https://yoast.com/wordpress/plugins/google-analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wpgaplugin&utm_content=v504
9
  * Description: This plugin makes it simple to add Google Analytics to your WordPress site, adding lots of features, e.g. error page, search result and automatic outgoing links and download tracking.
10
  * Author: Team Yoast
11
- * Version: 5.4
12
  * Requires at least: 3.8
13
  * Author URI: https://yoast.com/
14
  * License: GPL v3
@@ -34,14 +35,12 @@
34
 
35
  // This plugin was originally based on Rich Boakes' Analytics plugin: http://boakes.org/analytics, but has since been rewritten and refactored multiple times.
36
 
37
- define( 'GAWP_VERSION', '5.4' );
38
 
39
  define( 'GAWP_FILE', __FILE__ );
40
 
41
  define( 'GAWP_PATH', plugin_basename( __FILE__ ) );
42
 
43
- define( 'GAWP_DIR', dirname( __FILE__ ) );
44
-
45
  define( 'GAWP_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
46
 
47
  if ( file_exists( dirname( GAWP_FILE ) . '/vendor/autoload_52.php' ) ) {
1
  <?php
2
  /**
3
+ * @package GoogleAnalytics
4
+ * @subpackage Main
5
  */
6
 
7
  /**
9
  * Plugin URI: https://yoast.com/wordpress/plugins/google-analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wpgaplugin&utm_content=v504
10
  * Description: This plugin makes it simple to add Google Analytics to your WordPress site, adding lots of features, e.g. error page, search result and automatic outgoing links and download tracking.
11
  * Author: Team Yoast
12
+ * Version: 5.4.1
13
  * Requires at least: 3.8
14
  * Author URI: https://yoast.com/
15
  * License: GPL v3
35
 
36
  // This plugin was originally based on Rich Boakes' Analytics plugin: http://boakes.org/analytics, but has since been rewritten and refactored multiple times.
37
 
38
+ define( 'GAWP_VERSION', '5.4.1' );
39
 
40
  define( 'GAWP_FILE', __FILE__ );
41
 
42
  define( 'GAWP_PATH', plugin_basename( __FILE__ ) );
43
 
 
 
44
  define( 'GAWP_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
45
 
46
  if ( file_exists( dirname( GAWP_FILE ) . '/vendor/autoload_52.php' ) ) {
includes/class-options.php CHANGED
@@ -66,6 +66,7 @@ class Yoast_GA_Options {
66
  */
67
  public function __construct() {
68
  $this->options = $this->get_options();
 
69
 
70
  $this->plugin_path = plugin_dir_path( GAWP_FILE );
71
  $this->plugin_url = trailingslashit( plugin_dir_url( GAWP_FILE ) );
@@ -112,6 +113,31 @@ class Yoast_GA_Options {
112
  return $options[ $this->option_prefix ];
113
  }
114
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  /**
116
  * Get the Google Analytics tracking code for this website
117
  *
@@ -191,7 +217,7 @@ class Yoast_GA_Options {
191
  }
192
  }
193
  // 5.2.8+ Add disabled dashboards option
194
- if ( ( ! isset( $this->options['version'] ) || ! isset ( $this->options['dashboards_disabled'] ) || version_compare( $this->options['version'], '5.2.8', '>' ) ) && ! empty( $_POST ) ) {
195
  $this->options['dashboards_disabled'] = 0;
196
  }
197
  // Check is API option already exists - if not add it
66
  */
67
  public function __construct() {
68
  $this->options = $this->get_options();
69
+ $this->options = $this->check_options( $this->options );
70
 
71
  $this->plugin_path = plugin_dir_path( GAWP_FILE );
72
  $this->plugin_url = trailingslashit( plugin_dir_url( GAWP_FILE ) );
113
  return $options[ $this->option_prefix ];
114
  }
115
 
116
+ /**
117
+ * Check if all the options are set, to prevent a notice if debugging is enabled
118
+ * When we have new changes, the settings are saved to the options class
119
+ *
120
+ * @param array $options
121
+ *
122
+ * @return mixed
123
+ */
124
+ public function check_options( $options ) {
125
+
126
+ $changes = 0;
127
+ foreach ( $this->default_ga_values() as $key => $value ) {
128
+ if ( ! isset( $options[ $key ] ) ) {
129
+ $options[ $key ] = $value;
130
+ $changes ++;
131
+ }
132
+ }
133
+
134
+ if ( $changes >= 1 ) {
135
+ $this->update_option( $options );
136
+ }
137
+
138
+ return $options;
139
+ }
140
+
141
  /**
142
  * Get the Google Analytics tracking code for this website
143
  *
217
  }
218
  }
219
  // 5.2.8+ Add disabled dashboards option
220
+ if ( ! isset ( $this->options['dashboards_disabled'] ) || version_compare( $this->options['version'], '5.2.8', '>' ) ) {
221
  $this->options['dashboards_disabled'] = 0;
222
  }
223
  // Check is API option already exists - if not add it
includes/{class-options-utils.php → class-settings.php} RENAMED
@@ -1,15 +1,12 @@
1
  <?php
2
  /**
3
- * @package GoogleAnalytics\OptionsUtils
4
  */
5
 
6
  /**
7
- * Class Yoast_GA_Options_Utils
8
- *
9
- * Old name: Class Yoast_GA_Settings
10
  */
11
-
12
- class Yoast_GA_Options_Utils {
13
 
14
  /**
15
  * Saving instance of it's own in this static var
@@ -41,11 +38,11 @@ class Yoast_GA_Options_Utils {
41
  /**
42
  * Getting instance of this object. If instance doesn't exists it will be created.
43
  *
44
- * @return object|Yoast_GA_Options_Utils
45
  */
46
  public static function get_instance() {
47
  if ( is_null( self::$instance ) ) {
48
- self::$instance = new Yoast_GA_Options_Utils();
49
  }
50
 
51
  return self::$instance;
@@ -60,13 +57,4 @@ class Yoast_GA_Options_Utils {
60
  return $this->options_class->option_value_to_bool( 'dashboards_disabled' );
61
  }
62
 
63
- /**
64
- * Add a notification to the notification transient
65
- *
66
- * @param string $transient_name The transient name
67
- * @param array $settings Set the values for this new transient
68
- */
69
- public function add_notification( $transient_name, $settings ) {
70
- set_transient( $transient_name, $settings, MINUTE_IN_SECONDS );
71
- }
72
  }
1
  <?php
2
  /**
3
+ * @package GoogleAnalytics\Includes
4
  */
5
 
6
  /**
7
+ * Settings class.
 
 
8
  */
9
+ class Yoast_GA_Settings {
 
10
 
11
  /**
12
  * Saving instance of it's own in this static var
38
  /**
39
  * Getting instance of this object. If instance doesn't exists it will be created.
40
  *
41
+ * @return object|Yoast_GA_Settings
42
  */
43
  public static function get_instance() {
44
  if ( is_null( self::$instance ) ) {
45
+ self::$instance = new Yoast_GA_Settings();
46
  }
47
 
48
  return self::$instance;
57
  return $this->options_class->option_value_to_bool( 'dashboards_disabled' );
58
  }
59
 
 
 
 
 
 
 
 
 
 
60
  }
languages/google-analytics-for-wordpress-da_DK.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-de_DE.mo DELETED
Binary file
languages/google-analytics-for-wordpress-en_GB.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-es_ES.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-es_MX.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-fr_FR.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-he_IL.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-it_IT.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-nb_NO.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-nl_NL.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-pl_PL.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-pt_BR.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-ru_RU.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-sv_SE.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-tr_TR.mo CHANGED
Binary file
languages/google-analytics-for-wordpress.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the GPL v3.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Google Analytics by Yoast 5.4\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://github.com/yoast/google-analytics-for-wordpress/issues\n"
8
- "POT-Creation-Date: 2015-04-20 15:00:39+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -25,7 +25,7 @@ msgstr ""
25
  "X-Poedit-Bookmarks: \n"
26
  "X-Textdomain-Support: yes\n"
27
 
28
- #: admin/class-admin-form.php:46
29
  msgid "Save changes"
30
  msgstr ""
31
 
@@ -33,7 +33,7 @@ msgstr ""
33
  msgid "Yoast Google Analytics:"
34
  msgstr ""
35
 
36
- #: admin/class-admin-menu.php:72
37
  msgid "General settings"
38
  msgstr ""
39
 
@@ -41,283 +41,74 @@ msgstr ""
41
  msgid "Analytics"
42
  msgstr ""
43
 
44
- #: admin/class-admin-menu.php:238 admin/pages/dashboard.php:14
45
  msgid "Dashboard"
46
  msgstr ""
47
 
48
- #: admin/class-admin-menu.php:244 admin/class-admin.php:129
49
- #: admin/pages/settings-api.php:10
50
  msgid "Settings"
51
  msgstr ""
52
 
53
- #: admin/class-admin-menu.php:251 admin/pages/extensions.php:14
54
  #: admin/pages/extensions.php:17
55
  msgid "Extensions"
56
  msgstr ""
57
 
58
- #: admin/class-admin-settings-fields.php:129
59
- msgid "Select a profile"
60
- msgstr ""
61
-
62
- #: admin/class-admin-settings-registrar.php:105
63
- msgid "Google Analytics profile"
64
- msgstr ""
65
-
66
- #: admin/class-admin-settings-registrar.php:108
67
- msgid ""
68
- "Select an analytics profile from your Google account to use for the "
69
- "tracking on this website."
70
- msgstr ""
71
-
72
- #: admin/class-admin-settings-registrar.php:117
73
- msgid "Use a manual UA code"
74
- msgstr ""
75
-
76
- #: admin/class-admin-settings-registrar.php:120
77
- msgid ""
78
- "You can use the manual UA code field to enter your UA code manually, "
79
- "instead of using the Google Authenticator."
80
- msgstr ""
81
-
82
- #: admin/class-admin-settings-registrar.php:126
83
- msgid "Enter your UA code here"
84
- msgstr ""
85
-
86
- #: admin/class-admin-settings-registrar.php:129
87
- msgid ""
88
- "Enter the UA code (e.g.: UA-1234567-89) here, you can find the correct UA "
89
- "code in your Google Analytics dashboard."
90
- msgstr ""
91
-
92
- #: admin/class-admin-settings-registrar.php:148
93
- msgid "Track outbound click and downloads"
94
- msgstr ""
95
-
96
- #: admin/class-admin-settings-registrar.php:151
97
- msgid ""
98
- "Clicks and downloads will be tracked as events, you can find these under "
99
- "Content &#xBB; Event Tracking in your Google Analytics reports."
100
- msgstr ""
101
-
102
- #: admin/class-admin-settings-registrar.php:157
103
- msgid "Allow tracking of anonymous data"
104
- msgstr ""
105
-
106
- #: admin/class-admin-settings-registrar.php:160
107
- msgid ""
108
- "By allowing us to track anonymous data we can better help you, because we "
109
- "know with which WordPress configurations, themes and plugins we should "
110
- "test. No personal data will be submitted."
111
- msgstr ""
112
-
113
- #: admin/class-admin-settings-registrar.php:166
114
- msgid "Anonymize IPs"
115
- msgstr ""
116
-
117
- #: admin/class-admin-settings-registrar.php:169
118
- msgid ""
119
- "This adds %1$s, telling Google Analytics to anonymize the information sent "
120
- "by the tracker objects by removing the last octet of the IP address prior "
121
- "to its storage."
122
- msgstr ""
123
-
124
- #: admin/class-admin-settings-registrar.php:175
125
- msgid "Ignore users"
126
- msgstr ""
127
-
128
- #: admin/class-admin-settings-registrar.php:178
129
- msgid ""
130
- "Users of the role you select will be ignored, so if you select Editor, all "
131
- "Editors will be ignored."
132
- msgstr ""
133
-
134
- #: admin/class-admin-settings-registrar.php:186
135
- msgid "Disable analytics dashboard"
136
- msgstr ""
137
-
138
- #: admin/class-admin-settings-registrar.php:189
139
- msgid ""
140
- "This will completely disable the dashboard and stop the plugin from "
141
- "fetching the latest analytics data."
142
- msgstr ""
143
-
144
- #: admin/class-admin-settings-registrar.php:208
145
- msgid "Enable universal"
146
- msgstr ""
147
-
148
- #: admin/class-admin-settings-registrar.php:211
149
- msgid ""
150
- "First enable Universal tracking in your Google Analytics account. Please "
151
- "read %1$sthis guide%2$s to learn how to do that."
152
- msgstr ""
153
-
154
- #: admin/class-admin-settings-registrar.php:217
155
- msgid "Enable Demographics and Interest Reports"
156
- msgstr ""
157
-
158
- #: admin/class-admin-settings-registrar.php:220
159
- msgid ""
160
- "You have to enable the Demographics in Google Analytics before you can see "
161
- "the tracking data. We have a knowledge base article in our %1$sknowledge "
162
- "base%2$s about this feature."
163
- msgstr ""
164
-
165
- #: admin/class-admin-settings-registrar.php:226
166
- msgid "Enhanced Link Attribution"
167
- msgstr ""
168
-
169
- #: admin/class-admin-settings-registrar.php:229
170
- msgid "Add %1$sEnhanced Link Attribution%2$s to your tracking code."
171
- msgstr ""
172
-
173
- #: admin/class-admin-settings-registrar.php:248
174
- msgid "Track downloads as"
175
- msgstr ""
176
-
177
- #: admin/class-admin-settings-registrar.php:251
178
- #: admin/class-admin-settings-registrar.php:358
179
- msgid ""
180
- "Not recommended, as this would skew your statistics, but it does make it "
181
- "possible to track downloads as goals."
182
- msgstr ""
183
-
184
- #: admin/class-admin-settings-registrar.php:259
185
- msgid "Extensions of files to track as downloads"
186
- msgstr ""
187
-
188
- #: admin/class-admin-settings-registrar.php:262
189
- msgid "Please separate extensions using commas"
190
- msgstr ""
191
-
192
- #: admin/class-admin-settings-registrar.php:268
193
- msgid "Track full URL of outbound clicks or just the domain"
194
- msgstr ""
195
-
196
- #: admin/class-admin-settings-registrar.php:271
197
- msgid "How should we track your outbound clicks?"
198
- msgstr ""
199
-
200
- #: admin/class-admin-settings-registrar.php:279
201
- msgid "Subdomain tracking"
202
- msgstr ""
203
-
204
- #: admin/class-admin-settings-registrar.php:282
205
- msgid ""
206
- "This allows you to set the domain that's set by %1$s for tracking "
207
- "subdomains.<br/>If empty, this will not be set."
208
- msgstr ""
209
-
210
- #: admin/class-admin-settings-registrar.php:288
211
- msgid "Set path for internal links to track as outbound links"
212
- msgstr ""
213
-
214
- #: admin/class-admin-settings-registrar.php:291
215
- msgid ""
216
- "If you want to track all internal links that begin with %1$s, enter %1$s in "
217
- "the box above. If you have multiple prefixes you can separate them with "
218
- "comma's: %2$s"
219
- msgstr ""
220
-
221
- #: admin/class-admin-settings-registrar.php:297
222
- msgid "Label for those links"
223
- msgstr ""
224
-
225
- #: admin/class-admin-settings-registrar.php:300
226
- msgid ""
227
- "The label to use for these links, this will be added to where the click "
228
- "came from, so if the label is \"aff\", the label for a click from the "
229
- "content of an article becomes \"outbound-article-aff\"."
230
- msgstr ""
231
-
232
- #: admin/class-admin-settings-registrar.php:306
233
- #: admin/class-admin-settings-registrar.php:315
234
- msgid "Tag links in RSS feed with campaign variables"
235
  msgstr ""
236
 
237
- #: admin/class-admin-settings-registrar.php:309
238
- msgid ""
239
- "Do not use this feature if you use FeedBurner, as FeedBurner can do this "
240
- "automatically and better than this plugin can. Check <a "
241
- "href=\"https://support.google.com/feedburner/answer/165769?hl=en&amp;ref_"
242
- "topic=13075\" target=\"_blank\">this help page</a> for info on how to "
243
- "enable this feature in FeedBurner."
244
  msgstr ""
245
 
246
- #: admin/class-admin-settings-registrar.php:318
247
- msgid ""
248
- "This adds a %1$s call to your tracking code, and makes RSS link tagging use "
249
- "a %2$s as well."
250
  msgstr ""
251
 
252
- #: admin/class-admin-settings-registrar.php:324
253
- msgid "Add <code>_setAllowLinker</code>"
254
  msgstr ""
255
 
256
- #: admin/class-admin-settings-registrar.php:327
257
  msgid ""
258
- "This adds a %1$s call to your tracking code, allowing you to use %2$s and "
259
- "related functions."
260
- msgstr ""
261
-
262
- #: admin/class-admin-settings-registrar.php:333
263
- msgid "Custom code"
264
  msgstr ""
265
 
266
- #: admin/class-admin-settings-registrar.php:336
267
  msgid ""
268
- "Not for the average user: this allows you to add a line of code, to be "
269
- "added before the %1$s call."
270
- msgstr ""
271
-
272
- #: admin/class-admin-settings-registrar.php:355
273
- msgid "Enable debug mode"
274
- msgstr ""
275
-
276
- #: admin/class-admin-settings-registrar.php:413
277
- msgid "The Google Analytics settings are saved successfully."
278
  msgstr ""
279
 
280
- #: admin/class-admin-settings-registrar.php:493
281
  msgid "Event"
282
  msgstr ""
283
 
284
- #: admin/class-admin-settings-registrar.php:494
285
  msgid "Pageview"
286
  msgstr ""
287
 
288
- #: admin/class-admin-settings-registrar.php:505
289
  msgid "Just the domain"
290
  msgstr ""
291
 
292
- #: admin/class-admin-settings-registrar.php:506
293
  msgid "Full links"
294
  msgstr ""
295
 
296
- #: admin/class-admin-settings-registrar.php:582
297
- msgid "The UA code needs to follow UA-XXXXXXXX-X format."
298
- msgstr ""
299
-
300
- #: admin/class-admin-settings-registrar.php:604
301
- msgid "The profile ID needs to be numeric."
302
- msgstr ""
303
-
304
- #: admin/class-admin.php:126
305
- msgid "FAQ"
306
- msgstr ""
307
-
308
- #: admin/class-admin.php:139
309
- msgid "Custom Dimensions"
310
- msgstr ""
311
-
312
- #: admin/class-admin.php:265
313
  msgid "Debug information"
314
  msgstr ""
315
 
316
- #: admin/class-admin.php:314
317
  msgid "Google Analytics by Yoast Premium"
318
  msgstr ""
319
 
320
- #: admin/class-admin.php:315
321
  msgid ""
322
  "The premium version of Google Analytics by Yoast with more features and "
323
  "support."
@@ -327,11 +118,11 @@ msgstr ""
327
  msgid "Google Analytics by Yoast"
328
  msgstr ""
329
 
330
- #: admin/class-admin.php:320
331
  msgid "eCommerce tracking"
332
  msgstr ""
333
 
334
- #: admin/class-admin.php:321
335
  msgid ""
336
  "Track your eCommerce data and transactions with this eCommerce extension "
337
  "for Google Analytics."
@@ -475,7 +266,7 @@ msgid "Last month"
475
  msgstr ""
476
 
477
  #: admin/pages/dashboard.php:14 admin/pages/extensions.php:14
478
- #: admin/pages/settings-api.php:10
479
  msgid "Google Analytics by Yoast: "
480
  msgstr ""
481
 
@@ -530,87 +321,294 @@ msgid ""
530
  "there are no licenses to activate."
531
  msgstr ""
532
 
533
- #: admin/pages/settings-api.php:17
534
  msgid "General"
535
  msgstr ""
536
 
537
- #: admin/pages/settings-api.php:18
538
  msgid "Universal"
539
  msgstr ""
540
 
541
- #: admin/pages/settings-api.php:19
542
  msgid "Advanced"
543
  msgstr ""
544
 
545
- #: admin/pages/settings-api.php:21
 
 
 
 
546
  msgid "Debug mode"
547
  msgstr ""
548
 
549
- #: admin/pages/settings-api.php:36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
550
  msgid "Cannot connect to Google"
551
  msgstr ""
552
 
553
- #: admin/pages/settings-api.php:38
554
  msgid ""
555
  "Your server is blocking requests to Google, to fix this, add "
556
  "<code>*.googleapis.com</code> to the <code>WP_ACCESSIBLE_HOSTS</code> "
557
  "constant in your <em>wp-config.php</em> or ask your webhost to do this."
558
  msgstr ""
559
 
560
- #: admin/pages/settings-api.php:41
561
  msgid ""
562
  "Your firewall or webhost is blocking requests to Google, please ask your "
563
  "webhost company to fix this."
564
  msgstr ""
565
 
566
- #: admin/pages/settings-api.php:43
567
  msgid ""
568
  "Until this is fixed, you can only use the manual authentication method and "
569
  "cannot use the dashboards feature."
570
  msgstr ""
571
 
572
- #: admin/pages/settings-api.php:49
573
- msgid "Paste your Google authentication code"
574
  msgstr ""
575
 
576
- #: admin/pages/settings-api.php:51
577
- msgid "Paste your Google code here"
 
 
578
  msgstr ""
579
 
580
- #: admin/pages/settings-api.php:55
581
- msgid "Save authentication code"
582
  msgstr ""
583
 
584
- #: admin/pages/settings-api.php:58
585
- msgid "Authenticate with Google"
 
 
586
  msgstr ""
587
 
588
- #: admin/pages/settings-api.php:60
589
- msgid "Click here to authenticate with your Google account"
590
  msgstr ""
591
 
592
- #: admin/pages/settings-api.php:63
593
- msgid "Re-authenticate with your Google account"
 
 
 
 
 
 
 
594
  msgstr ""
595
 
596
- #: admin/pages/settings-api.php:72
597
  msgid ""
598
- "Warning: If you use a manual UA code, you won't be able to use the "
599
- "dashboards."
 
600
  msgstr ""
601
 
602
- #: admin/pages/settings-api.php:95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
603
  msgid ""
604
  "If you want to confirm that tracking on your blog is working as it should, "
605
  "enable this option and check the console of your browser. Be absolutely "
606
  "sure to disable debugging afterwards, as it is slower than normal tracking."
607
  msgstr ""
608
 
609
- #: admin/pages/settings-api.php:96
610
  msgid "<strong>Note</strong> the debugging is only loaded for administrators."
611
  msgstr ""
612
 
613
- #: admin/pages/settings-api.php:116
 
 
 
 
614
  msgid "Select the users to ignore"
615
  msgstr ""
616
 
@@ -622,26 +620,13 @@ msgstr ""
622
  msgid "Upgrade to Google Analytics By Yoast Premium »"
623
  msgstr ""
624
 
625
- #: admin/views/custom-dimensions-upsell.php:13
626
- msgid ""
627
- "If you want to track custom dimensions like page views per author or post "
628
- "type, you should upgrade to the %1$spremium version of Google Analytics by "
629
- "Yoast%2$s."
630
- msgstr ""
631
-
632
- #: admin/views/custom-dimensions-upsell.php:15
633
- msgid ""
634
- "This will also give you email access to the support team at Yoast, who will "
635
- "provide support on the plugin 24/7."
636
- msgstr ""
637
-
638
- #: googleanalytics.php:80
639
  msgid ""
640
  "The Standard PHP Library (SPL) extension seem to be unavailable. Please ask "
641
  "your web host to enable it."
642
  msgstr ""
643
 
644
- #: googleanalytics.php:93
645
  msgid ""
646
  "The (standard) PHP filter extension seem to be unavailable. Please ask your "
647
  "web host to enable it."
2
  # This file is distributed under the GPL v3.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Google Analytics by Yoast 5.4.1\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://github.com/yoast/google-analytics-for-wordpress/issues\n"
8
+ "POT-Creation-Date: 2015-04-21 14:26:35+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
25
  "X-Poedit-Bookmarks: \n"
26
  "X-Textdomain-Support: yes\n"
27
 
28
+ #: admin/class-admin-form.php:46 admin/pages/settings.php:153
29
  msgid "Save changes"
30
  msgstr ""
31
 
33
  msgid "Yoast Google Analytics:"
34
  msgstr ""
35
 
36
+ #: admin/class-admin-menu.php:72 admin/pages/settings.php:32
37
  msgid "General settings"
38
  msgstr ""
39
 
41
  msgid "Analytics"
42
  msgstr ""
43
 
44
+ #: admin/class-admin-menu.php:236 admin/pages/dashboard.php:14
45
  msgid "Dashboard"
46
  msgstr ""
47
 
48
+ #: admin/class-admin-menu.php:242 admin/class-admin.php:264
49
+ #: admin/pages/settings.php:10
50
  msgid "Settings"
51
  msgstr ""
52
 
53
+ #: admin/class-admin-menu.php:249 admin/pages/extensions.php:14
54
  #: admin/pages/extensions.php:17
55
  msgid "Extensions"
56
  msgstr ""
57
 
58
+ #: admin/class-admin.php:109
59
+ msgid "The UA code needs to follow UA-XXXXXXXX-X format."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  msgstr ""
61
 
62
+ #: admin/class-admin.php:121
63
+ msgid "Settings saved."
 
 
 
 
 
64
  msgstr ""
65
 
66
+ #: admin/class-admin.php:128
67
+ msgid "There were no changes to save, please try again."
 
 
68
  msgstr ""
69
 
70
+ #: admin/class-admin.php:261
71
+ msgid "FAQ"
72
  msgstr ""
73
 
74
+ #: admin/class-admin.php:276
75
  msgid ""
76
+ "If you want to track custom dimensions like page views per author or post "
77
+ "type, you should upgrade to the %1$spremium version of Google Analytics by "
78
+ "Yoast%2$s."
 
 
 
79
  msgstr ""
80
 
81
+ #: admin/class-admin.php:278
82
  msgid ""
83
+ "This will also give you email access to the support team at Yoast, who will "
84
+ "provide support on the plugin 24/7."
 
 
 
 
 
 
 
 
85
  msgstr ""
86
 
87
+ #: admin/class-admin.php:417
88
  msgid "Event"
89
  msgstr ""
90
 
91
+ #: admin/class-admin.php:418
92
  msgid "Pageview"
93
  msgstr ""
94
 
95
+ #: admin/class-admin.php:429
96
  msgid "Just the domain"
97
  msgstr ""
98
 
99
+ #: admin/class-admin.php:430
100
  msgid "Full links"
101
  msgstr ""
102
 
103
+ #: admin/class-admin.php:450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  msgid "Debug information"
105
  msgstr ""
106
 
107
+ #: admin/class-admin.php:499
108
  msgid "Google Analytics by Yoast Premium"
109
  msgstr ""
110
 
111
+ #: admin/class-admin.php:500
112
  msgid ""
113
  "The premium version of Google Analytics by Yoast with more features and "
114
  "support."
118
  msgid "Google Analytics by Yoast"
119
  msgstr ""
120
 
121
+ #: admin/class-admin.php:505
122
  msgid "eCommerce tracking"
123
  msgstr ""
124
 
125
+ #: admin/class-admin.php:506
126
  msgid ""
127
  "Track your eCommerce data and transactions with this eCommerce extension "
128
  "for Google Analytics."
266
  msgstr ""
267
 
268
  #: admin/pages/dashboard.php:14 admin/pages/extensions.php:14
269
+ #: admin/pages/settings.php:10
270
  msgid "Google Analytics by Yoast: "
271
  msgstr ""
272
 
321
  "there are no licenses to activate."
322
  msgstr ""
323
 
324
+ #: admin/pages/settings.php:17
325
  msgid "General"
326
  msgstr ""
327
 
328
+ #: admin/pages/settings.php:18
329
  msgid "Universal"
330
  msgstr ""
331
 
332
+ #: admin/pages/settings.php:19
333
  msgid "Advanced"
334
  msgstr ""
335
 
336
+ #: admin/pages/settings.php:20
337
+ msgid "Custom Dimensions"
338
+ msgstr ""
339
+
340
+ #: admin/pages/settings.php:22
341
  msgid "Debug mode"
342
  msgstr ""
343
 
344
+ #: admin/pages/settings.php:46
345
+ msgid "Paste your Google authentication code"
346
+ msgstr ""
347
+
348
+ #: admin/pages/settings.php:51
349
+ msgid "Google profile"
350
+ msgstr ""
351
+
352
+ #: admin/pages/settings.php:52
353
+ msgid "Authenticate with your Google account"
354
+ msgstr ""
355
+
356
+ #: admin/pages/settings.php:55
357
+ msgid "Current UA-profile"
358
+ msgstr ""
359
+
360
+ #: admin/pages/settings.php:60
361
+ msgid "Analytics profile"
362
+ msgstr ""
363
+
364
+ #: admin/pages/settings.php:60
365
+ msgid "Select a profile"
366
+ msgstr ""
367
+
368
+ #: admin/pages/settings.php:64
369
+ msgid "Re-authenticate with your Google account"
370
+ msgstr ""
371
+
372
+ #: admin/pages/settings.php:70
373
+ msgid "Paste your Google code here"
374
+ msgstr ""
375
+
376
+ #: admin/pages/settings.php:74
377
+ msgid "Save authentication code"
378
+ msgstr ""
379
+
380
+ #: admin/pages/settings.php:78
381
  msgid "Cannot connect to Google"
382
  msgstr ""
383
 
384
+ #: admin/pages/settings.php:80
385
  msgid ""
386
  "Your server is blocking requests to Google, to fix this, add "
387
  "<code>*.googleapis.com</code> to the <code>WP_ACCESSIBLE_HOSTS</code> "
388
  "constant in your <em>wp-config.php</em> or ask your webhost to do this."
389
  msgstr ""
390
 
391
+ #: admin/pages/settings.php:83
392
  msgid ""
393
  "Your firewall or webhost is blocking requests to Google, please ask your "
394
  "webhost company to fix this."
395
  msgstr ""
396
 
397
+ #: admin/pages/settings.php:85
398
  msgid ""
399
  "Until this is fixed, you can only use the manual authentication method and "
400
  "cannot use the dashboards feature."
401
  msgstr ""
402
 
403
+ #: admin/pages/settings.php:89
404
+ msgid "Manually enter your UA code"
405
  msgstr ""
406
 
407
+ #: admin/pages/settings.php:93
408
+ msgid ""
409
+ "Warning: If you use a manual UA code, you won't be able to use the "
410
+ "dashboards."
411
  msgstr ""
412
 
413
+ #: admin/pages/settings.php:99
414
+ msgid "Track outbound click and downloads"
415
  msgstr ""
416
 
417
+ #: admin/pages/settings.php:99
418
+ msgid ""
419
+ "Clicks and downloads will be tracked as events, you can find these under "
420
+ "Content &#xBB; Event Tracking in your Google Analytics reports."
421
  msgstr ""
422
 
423
+ #: admin/pages/settings.php:100
424
+ msgid "Allow tracking of anonymous data"
425
  msgstr ""
426
 
427
+ #: admin/pages/settings.php:100
428
+ msgid ""
429
+ "By allowing us to track anonymous data we can better help you, because we "
430
+ "know with which WordPress configurations, themes and plugins we should "
431
+ "test. No personal data will be submitted."
432
+ msgstr ""
433
+
434
+ #: admin/pages/settings.php:101
435
+ msgid "Anonymize IPs"
436
  msgstr ""
437
 
438
+ #: admin/pages/settings.php:101
439
  msgid ""
440
+ "This adds %1$s, telling Google Analytics to anonymize the information sent "
441
+ "by the tracker objects by removing the last octet of the IP address prior "
442
+ "to its storage."
443
  msgstr ""
444
 
445
+ #: admin/pages/settings.php:102
446
+ msgid "Ignore users"
447
+ msgstr ""
448
+
449
+ #: admin/pages/settings.php:102
450
+ msgid ""
451
+ "Users of the role you select will be ignored, so if you select Editor, all "
452
+ "Editors will be ignored."
453
+ msgstr ""
454
+
455
+ #: admin/pages/settings.php:103
456
+ msgid "Disable analytics dashboard"
457
+ msgstr ""
458
+
459
+ #: admin/pages/settings.php:103
460
+ msgid ""
461
+ "This will completely disable the dashboard and stop the plugin from "
462
+ "fetching the latest analytics data."
463
+ msgstr ""
464
+
465
+ #: admin/pages/settings.php:108
466
+ msgid "Universal settings"
467
+ msgstr ""
468
+
469
+ #: admin/pages/settings.php:109
470
+ msgid "Enable Universal tracking"
471
+ msgstr ""
472
+
473
+ #: admin/pages/settings.php:109
474
+ msgid ""
475
+ "First enable Universal tracking in your Google Analytics account. Please "
476
+ "read %1$sthis guide%2$s to learn how to do that."
477
+ msgstr ""
478
+
479
+ #: admin/pages/settings.php:110
480
+ msgid "Enable Demographics and Interest Reports"
481
+ msgstr ""
482
+
483
+ #: admin/pages/settings.php:110
484
+ msgid ""
485
+ "You have to enable the Demographics in Google Analytics before you can see "
486
+ "the tracking data. We have a knowledge base article in our %1$sknowledge "
487
+ "base%2$s about this feature."
488
+ msgstr ""
489
+
490
+ #: admin/pages/settings.php:111
491
+ msgid "Enhanced Link Attribution"
492
+ msgstr ""
493
+
494
+ #: admin/pages/settings.php:111
495
+ msgid "Add %1$sEnhanced Link Attribution%2$s to your tracking code."
496
+ msgstr ""
497
+
498
+ #: admin/pages/settings.php:116
499
+ msgid "Advanced settings"
500
+ msgstr ""
501
+
502
+ #: admin/pages/settings.php:117
503
+ msgid "Track downloads as"
504
+ msgstr ""
505
+
506
+ #: admin/pages/settings.php:117
507
+ msgid ""
508
+ "Not recommended, as this would skew your statistics, but it does make it "
509
+ "possible to track downloads as goals."
510
+ msgstr ""
511
+
512
+ #: admin/pages/settings.php:118
513
+ msgid "Extensions of files to track as downloads"
514
+ msgstr ""
515
+
516
+ #: admin/pages/settings.php:119
517
+ msgid "Track full URL of outbound clicks or just the domain"
518
+ msgstr ""
519
+
520
+ #: admin/pages/settings.php:120
521
+ msgid "Subdomain tracking"
522
+ msgstr ""
523
+
524
+ #: admin/pages/settings.php:120
525
+ msgid ""
526
+ "This allows you to set the domain that's set by %1$s for tracking "
527
+ "subdomains.<br/>If empty, this will not be set."
528
+ msgstr ""
529
+
530
+ #: admin/pages/settings.php:122
531
+ msgid "Set path for internal links to track as outbound links"
532
+ msgstr ""
533
+
534
+ #: admin/pages/settings.php:122
535
+ msgid ""
536
+ "If you want to track all internal links that begin with %1$s, enter %1$s in "
537
+ "the box above. If you have multiple prefixes you can separate them with "
538
+ "comma's: %2$s"
539
+ msgstr ""
540
+
541
+ #: admin/pages/settings.php:123
542
+ msgid "Label for those links"
543
+ msgstr ""
544
+
545
+ #: admin/pages/settings.php:125
546
+ msgid "Tag links in RSS feed with campaign variables"
547
+ msgstr ""
548
+
549
+ #: admin/pages/settings.php:125
550
+ msgid ""
551
+ "Do not use this feature if you use FeedBurner, as FeedBurner can do this "
552
+ "automatically and better than this plugin can. Check <a "
553
+ "href=\"https://support.google.com/feedburner/answer/165769?hl=en&amp;ref_"
554
+ "topic=13075\" target=\"_blank\">this help page</a> for info on how to "
555
+ "enable this feature in FeedBurner."
556
+ msgstr ""
557
+
558
+ #: admin/pages/settings.php:126
559
+ msgid "Allow anchor"
560
+ msgstr ""
561
+
562
+ #: admin/pages/settings.php:126
563
+ msgid ""
564
+ "This adds a %1$s call to your tracking code, and makes RSS link tagging use "
565
+ "a %2$s as well."
566
+ msgstr ""
567
+
568
+ #: admin/pages/settings.php:127
569
+ msgid "Add <code>_setAllowLinker</code>"
570
+ msgstr ""
571
+
572
+ #: admin/pages/settings.php:127
573
+ msgid ""
574
+ "This adds a %1$s call to your tracking code, allowing you to use %2$s and "
575
+ "related functions."
576
+ msgstr ""
577
+
578
+ #: admin/pages/settings.php:128
579
+ msgid "Custom code"
580
+ msgstr ""
581
+
582
+ #: admin/pages/settings.php:128
583
+ msgid ""
584
+ "Not for the average user: this allows you to add a line of code, to be "
585
+ "added before the %1$s call."
586
+ msgstr ""
587
+
588
+ #: admin/pages/settings.php:135
589
+ msgid "Custom dimensions"
590
+ msgstr ""
591
+
592
+ #: admin/pages/settings.php:142
593
+ msgid "Debug"
594
+ msgstr ""
595
+
596
+ #: admin/pages/settings.php:145
597
  msgid ""
598
  "If you want to confirm that tracking on your blog is working as it should, "
599
  "enable this option and check the console of your browser. Be absolutely "
600
  "sure to disable debugging afterwards, as it is slower than normal tracking."
601
  msgstr ""
602
 
603
+ #: admin/pages/settings.php:146
604
  msgid "<strong>Note</strong> the debugging is only loaded for administrators."
605
  msgstr ""
606
 
607
+ #: admin/pages/settings.php:148
608
+ msgid "Enable debug mode"
609
+ msgstr ""
610
+
611
+ #: admin/pages/settings.php:162
612
  msgid "Select the users to ignore"
613
  msgstr ""
614
 
620
  msgid "Upgrade to Google Analytics By Yoast Premium »"
621
  msgstr ""
622
 
623
+ #: googleanalytics.php:79
 
 
 
 
 
 
 
 
 
 
 
 
 
624
  msgid ""
625
  "The Standard PHP Library (SPL) extension seem to be unavailable. Please ask "
626
  "your web host to enable it."
627
  msgstr ""
628
 
629
+ #: googleanalytics.php:92
630
  msgid ""
631
  "The (standard) PHP filter extension seem to be unavailable. Please ask your "
632
  "web host to enable it."
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://yoast.com/donate/
4
  Tags: analytics, google analytics, statistics, tracking, stats, google, yoast
5
  Requires at least: 3.8
6
  Tested up to: 4.2
7
- Stable tag: 5.4
8
  License: GPL v3
9
 
10
  Track your WordPress site easily with the latest tracking codes and lots added data for search result pages and error pages.
@@ -51,21 +51,29 @@ This section describes how to install the plugin and get it working.
51
 
52
  == Changelog ==
53
 
 
 
 
 
 
 
 
 
54
  = 5.4 =
55
 
56
  Release Date: April 20th, 2015
57
 
58
- Enhancements:
59
  * Complete technical overhaul of the way settings are being stored. Switched to WP Settings API and added input validation and sanitation for several settings.
60
  * Made the settings more accessible by adding `for` attributes to the labels, connecting them with the corresponding form fields. Props to [Steve Repsher](https://github.com/steverep) for the awesome contribution!
61
  * Made Universal tracking the default for new installs.
62
  * Adds administrators to the default user roles to ignore for tracking.
63
 
64
- Security:
65
  * Fixes several security issues that were discovered during an elaborate security review performed by our friends from [Sucuri](https://sucuri.net/).
66
  * Fixes two other XSS issues. Thanks to [Johannes Schmitt](https://github.com/schmittjoh) from [Scrutinizer CI](https://scrutinizer-ci.com/) and [Jouko Pynnönen](http://klikki.fi) for discovering and responsibly disclosing these issues.
67
 
68
- Bugfixes:
69
  * Fixes an issue where some GA dashboard style sheets and scripts were also loaded outside of the Google Analytics by Yoast dashboard, thereby unnecessarily slowing down the WP admin.
70
  * Fixes a bug where a PHP warning could be raised on the dashboard when no data is available.
71
 
4
  Tags: analytics, google analytics, statistics, tracking, stats, google, yoast
5
  Requires at least: 3.8
6
  Tested up to: 4.2
7
+ Stable tag: 5.4.1
8
  License: GPL v3
9
 
10
  Track your WordPress site easily with the latest tracking codes and lots added data for search result pages and error pages.
51
 
52
  == Changelog ==
53
 
54
+ = 5.4.1 =
55
+
56
+ Release Date: April 21th, 2015
57
+
58
+ * Bugfixes:
59
+ * Fixes a bug where GA API was being pinged too often.
60
+ * Fixes a bug where users were unable to authenticate with Google Analytics. It might take a while for authentication to work again, as the API key within the plugin has to be within its quota limits again. We’re very sorry for the inconvenience. Note that for Premium users everything still works.
61
+
62
  = 5.4 =
63
 
64
  Release Date: April 20th, 2015
65
 
66
+ * Enhancements:
67
  * Complete technical overhaul of the way settings are being stored. Switched to WP Settings API and added input validation and sanitation for several settings.
68
  * Made the settings more accessible by adding `for` attributes to the labels, connecting them with the corresponding form fields. Props to [Steve Repsher](https://github.com/steverep) for the awesome contribution!
69
  * Made Universal tracking the default for new installs.
70
  * Adds administrators to the default user roles to ignore for tracking.
71
 
72
+ * Security:
73
  * Fixes several security issues that were discovered during an elaborate security review performed by our friends from [Sucuri](https://sucuri.net/).
74
  * Fixes two other XSS issues. Thanks to [Johannes Schmitt](https://github.com/schmittjoh) from [Scrutinizer CI](https://scrutinizer-ci.com/) and [Jouko Pynnönen](http://klikki.fi) for discovering and responsibly disclosing these issues.
75
 
76
+ * Bugfixes:
77
  * Fixes an issue where some GA dashboard style sheets and scripts were also loaded outside of the Google Analytics by Yoast dashboard, thereby unnecessarily slowing down the WP admin.
78
  * Fixes a bug where a PHP warning could be raised on the dashboard when no data is available.
79
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitc25dd8530d96371aeae7c93f0fbd7210::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitf2b63589148e3715a86a9937e1ae0563::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInitf47bb2769d4e49c246453941d671b543::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInit44c57bfc9a17638aff391c4cb80c3966::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -12,8 +12,6 @@ return array(
12
  'Yoast_GA_Admin_Assets' => $baseDir . '/admin/class-admin-assets.php',
13
  'Yoast_GA_Admin_Form' => $baseDir . '/admin/class-admin-form.php',
14
  'Yoast_GA_Admin_Menu' => $baseDir . '/admin/class-admin-menu.php',
15
- 'Yoast_GA_Admin_Settings_Fields' => $baseDir . '/admin/class-admin-settings-fields.php',
16
- 'Yoast_GA_Admin_Settings_Registrar' => $baseDir . '/admin/class-admin-settings-registrar.php',
17
  'Yoast_GA_Dashboards' => $baseDir . '/admin/dashboards/class-admin-dashboards.php',
18
  'Yoast_GA_Dashboards_Api_Options' => $baseDir . '/admin/dashboards/class-admin-dashboards-api-options.php',
19
  'Yoast_GA_Dashboards_Collector' => $baseDir . '/admin/dashboards/class-admin-dashboards-collector.php',
@@ -28,7 +26,7 @@ return array(
28
  'Yoast_GA_Frontend' => $baseDir . '/frontend/class-frontend.php',
29
  'Yoast_GA_JS' => $baseDir . '/frontend/class-ga-js.php',
30
  'Yoast_GA_Options' => $baseDir . '/includes/class-options.php',
31
- 'Yoast_GA_Options_Utils' => $baseDir . '/includes/class-options-utils.php',
32
  'Yoast_GA_Tracking' => $baseDir . '/frontend/abstract-class-tracking.php',
33
  'Yoast_GA_Universal' => $baseDir . '/frontend/class-universal.php',
34
  'Yoast_GA_Utils' => $baseDir . '/includes/class-utils.php',
12
  'Yoast_GA_Admin_Assets' => $baseDir . '/admin/class-admin-assets.php',
13
  'Yoast_GA_Admin_Form' => $baseDir . '/admin/class-admin-form.php',
14
  'Yoast_GA_Admin_Menu' => $baseDir . '/admin/class-admin-menu.php',
 
 
15
  'Yoast_GA_Dashboards' => $baseDir . '/admin/dashboards/class-admin-dashboards.php',
16
  'Yoast_GA_Dashboards_Api_Options' => $baseDir . '/admin/dashboards/class-admin-dashboards-api-options.php',
17
  'Yoast_GA_Dashboards_Collector' => $baseDir . '/admin/dashboards/class-admin-dashboards-collector.php',
26
  'Yoast_GA_Frontend' => $baseDir . '/frontend/class-frontend.php',
27
  'Yoast_GA_JS' => $baseDir . '/frontend/class-ga-js.php',
28
  'Yoast_GA_Options' => $baseDir . '/includes/class-options.php',
29
+ 'Yoast_GA_Settings' => $baseDir . '/includes/class-settings.php',
30
  'Yoast_GA_Tracking' => $baseDir . '/frontend/abstract-class-tracking.php',
31
  'Yoast_GA_Universal' => $baseDir . '/frontend/class-universal.php',
32
  'Yoast_GA_Utils' => $baseDir . '/includes/class-utils.php',
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitc25dd8530d96371aeae7c93f0fbd7210
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitc25dd8530d96371aeae7c93f0fbd7210
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitc25dd8530d96371aeae7c93f0fbd7210', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitc25dd8530d96371aeae7c93f0fbd7210', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -44,7 +44,7 @@ class ComposerAutoloaderInitc25dd8530d96371aeae7c93f0fbd7210
44
  }
45
  }
46
 
47
- function composerRequirec25dd8530d96371aeae7c93f0fbd7210($file)
48
  {
49
  require $file;
50
  }
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitf2b63589148e3715a86a9937e1ae0563
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitf2b63589148e3715a86a9937e1ae0563', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitf2b63589148e3715a86a9937e1ae0563', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
44
  }
45
  }
46
 
47
+ function composerRequiref2b63589148e3715a86a9937e1ae0563($file)
48
  {
49
  require $file;
50
  }
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInitf47bb2769d4e49c246453941d671b543 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitf47bb2769d4e49c246453941d671b543 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitf47bb2769d4e49c246453941d671b543', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitf47bb2769d4e49c246453941d671b543', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInit44c57bfc9a17638aff391c4cb80c3966 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit44c57bfc9a17638aff391c4cb80c3966', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit44c57bfc9a17638aff391c4cb80c3966', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
vendor/composer/installed.json CHANGED
@@ -30,7 +30,7 @@
30
  "dev-master": "1.0-dev"
31
  }
32
  },
33
- "installation-source": "source",
34
  "autoload": {
35
  "psr-0": {
36
  "Composer\\Installers\\": "src/"
@@ -118,7 +118,7 @@
118
  "dev-default": "1.x-dev"
119
  }
120
  },
121
- "installation-source": "source",
122
  "autoload": {
123
  "psr-0": {
124
  "xrstf\\Composer52": "lib/"
@@ -147,7 +147,7 @@
147
  },
148
  "time": "2015-02-17 14:41:34",
149
  "type": "library",
150
- "installation-source": "source",
151
  "autoload": {
152
  "classmap": [
153
  "class-api-libs.php"
@@ -187,7 +187,7 @@
187
  },
188
  "time": "2015-04-15 06:48:03",
189
  "type": "library",
190
- "installation-source": "source",
191
  "autoload": {
192
  "classmap": [
193
  "i18n-module.php"
@@ -227,7 +227,7 @@
227
  },
228
  "time": "2015-03-16 11:51:33",
229
  "type": "library",
230
- "installation-source": "source",
231
  "autoload": {
232
  "classmap": [
233
  "class-api-request.php",
30
  "dev-master": "1.0-dev"
31
  }
32
  },
33
+ "installation-source": "dist",
34
  "autoload": {
35
  "psr-0": {
36
  "Composer\\Installers\\": "src/"
118
  "dev-default": "1.x-dev"
119
  }
120
  },
121
+ "installation-source": "dist",
122
  "autoload": {
123
  "psr-0": {
124
  "xrstf\\Composer52": "lib/"
147
  },
148
  "time": "2015-02-17 14:41:34",
149
  "type": "library",
150
+ "installation-source": "dist",
151
  "autoload": {
152
  "classmap": [
153
  "class-api-libs.php"
187
  },
188
  "time": "2015-04-15 06:48:03",
189
  "type": "library",
190
+ "installation-source": "dist",
191
  "autoload": {
192
  "classmap": [
193
  "i18n-module.php"
227
  },
228
  "time": "2015-03-16 11:51:33",
229
  "type": "library",
230
+ "installation-source": "dist",
231
  "autoload": {
232
  "classmap": [
233
  "class-api-request.php",
vendor/xrstf/composer-php52/.hg/00changelog.i DELETED
Binary file
vendor/xrstf/composer-php52/.hg/branch DELETED
@@ -1 +0,0 @@
1
- default
 
vendor/xrstf/composer-php52/.hg/cache/branch2-served DELETED
@@ -1,4 +0,0 @@
1
- 717c00a8bec1b40401384536d2ebaea57c7c35d4 49
2
- 717c00a8bec1b40401384536d2ebaea57c7c35d4 o default
3
- d1e08e2d82fc290b637c6b416899da45ed743e64 o fix-4
4
- 302eef74e7d25bc741f16316c6d332419111ea42 o fix_composer_compatibility
 
 
 
 
vendor/xrstf/composer-php52/.hg/cache/rbc-names-v1 DELETED
Binary file
vendor/xrstf/composer-php52/.hg/cache/rbc-revs-v1 DELETED
Binary file
vendor/xrstf/composer-php52/.hg/dirstate DELETED
Binary file
vendor/xrstf/composer-php52/.hg/hgrc DELETED
@@ -1,14 +0,0 @@
1
- # example repository config (see "hg help config" for more info)
2
- [paths]
3
- default = https://bitbucket.org/xrstf/composer-php52
4
-
5
- # path aliases to other clones of this repo in URLs or filesystem paths
6
- # (see "hg help config.paths" for more info)
7
- #
8
- # default-push = ssh://jdoe@example.net/hg/jdoes-fork
9
- # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
10
- # my-clone = /home/jdoe/jdoes-clone
11
-
12
- [ui]
13
- # name and email (local to this repository, optional), e.g.
14
- # username = Jane Doe <jdoe@example.com>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/xrstf/composer-php52/.hg/requires DELETED
@@ -1,4 +0,0 @@
1
- dotencode
2
- fncache
3
- revlogv1
4
- store
 
 
 
 
vendor/xrstf/composer-php52/.hg/store/00changelog.i DELETED
Binary file
vendor/xrstf/composer-php52/.hg/store/00manifest.i DELETED
Binary file
vendor/xrstf/composer-php52/.hg/store/data/_l_i_c_e_n_s_e.i DELETED
Binary file
vendor/xrstf/composer-php52/.hg/store/data/_r_e_a_d_m_e.md.i DELETED
Binary file
vendor/xrstf/composer-php52/.hg/store/data/composer.json.i DELETED
Binary file
vendor/xrstf/composer-php52/.hg/store/data/lib/xrstf/_composer52/_autoload_generator.php.i DELETED
Binary file
vendor/xrstf/composer-php52/.hg/store/data/lib/xrstf/_composer52/_class_loader.php.i DELETED
Binary file
vendor/xrstf/composer-php52/.hg/store/data/lib/xrstf/_composer52/_generator.php.i DELETED
Binary file
vendor/xrstf/composer-php52/.hg/store/data/~2ehgtags.i DELETED
Binary file
vendor/xrstf/composer-php52/.hg/store/fncache DELETED
@@ -1,7 +0,0 @@
1
- data/lib/xrstf/Composer52/Generator.php.i
2
- data/lib/xrstf/Composer52/ClassLoader.php.i
3
- data/lib/xrstf/Composer52/AutoloadGenerator.php.i
4
- data/.hgtags.i
5
- data/LICENSE.i
6
- data/composer.json.i
7
- data/README.md.i
 
 
 
 
 
 
 
vendor/xrstf/composer-php52/.hg/store/phaseroots DELETED
File without changes
vendor/xrstf/composer-php52/.hg/store/undo DELETED
Binary file
vendor/xrstf/composer-php52/.hg/store/undo.backupfiles DELETED
Binary file
vendor/xrstf/composer-php52/.hg/store/undo.phaseroots DELETED
File without changes
vendor/xrstf/composer-php52/.hg/undo.bookmarks DELETED
File without changes
vendor/xrstf/composer-php52/.hg/undo.branch DELETED
@@ -1 +0,0 @@
1
- default
 
vendor/xrstf/composer-php52/.hg/undo.desc DELETED
@@ -1,3 +0,0 @@
1
- 0
2
- pull
3
- https://bitbucket.org/xrstf/composer-php52
 
 
 
vendor/xrstf/composer-php52/.hg/undo.dirstate DELETED
File without changes
vendor/xrstf/composer-php52/.hg_archival.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ repo: 0d0ceaca3a0500b3f45b41b79c6ac4f396dc4b13
2
+ node: 717c00a8bec1b40401384536d2ebaea57c7c35d4
3
+ branch: default
4
+ latesttag: v1.0.17
5
+ latesttagdistance: 1