GA Google Analytics - Version 20170324

Version Description

To upgrade GA Google Analytics, remove the old version and replace with the new version. Or just click "Update" from the Plugins screen and let WordPress do it for you automatically.

Note: uninstalling the plugin from the WP Plugins screen results in the removal of all settings from the WP database.

For more information, visit the GA Plugin Homepage.

Download this release

Release Info

Developer specialk
Plugin Icon 128x128 GA Google Analytics
Version 20170324
Comparing to
See all releases

Version 20170324

Files changed (5) hide show
  1. ga-google-analytics.php +648 -0
  2. gap-logo.jpg +0 -0
  3. languages/gap.pot +375 -0
  4. readme.txt +295 -0
  5. uninstall.php +10 -0
ga-google-analytics.php ADDED
@@ -0,0 +1,648 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: GA Google Analytics
4
+ Plugin URI: https://perishablepress.com/google-analytics-plugin/
5
+ Description: Adds your Google Analytics Tracking Code to your WordPress site.
6
+ Tags: analytics, ga, google, google analytics, tracking, statistics, stats
7
+ Author: Jeff Starr
8
+ Author URI: https://plugin-planet.com/
9
+ Donate link: https://m0n.co/donate
10
+ Contributors: specialk
11
+ Requires at least: 4.1
12
+ Tested up to: 4.8
13
+ Stable tag: 20170324
14
+ Version: 20170324
15
+ Text Domain: gap
16
+ Domain Path: /languages
17
+ License: GPL v2 or later
18
+ */
19
+
20
+ /*
21
+ This program is free software; you can redistribute it and/or
22
+ modify it under the terms of the GNU General Public License
23
+ as published by the Free Software Foundation; either version 2
24
+ of the License, or (at your option) any later version.
25
+
26
+ This program is distributed in the hope that it will be useful,
27
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
28
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
+ GNU General Public License for more details.
30
+
31
+ Get a copy of the GNU General Public License: http://www.gnu.org/licenses/
32
+ */
33
+
34
+ if (!defined('ABSPATH')) die();
35
+
36
+ $gap_wp_vers = '4.1';
37
+ $gap_version = '20170324';
38
+ $gap_plugin = esc_html__('GA Google Analytics', 'gap');
39
+ $gap_options = get_option('gap_options');
40
+ $gap_path = plugin_basename(__FILE__); // 'ga-google-analytics/ga-google-analytics.php';
41
+ $gap_homeurl = 'https://perishablepress.com/ga-google-analytics/';
42
+
43
+ // i18n
44
+ function gap_i18n_init() {
45
+ load_plugin_textdomain('gap', false, dirname(plugin_basename(__FILE__)) .'/languages/');
46
+ }
47
+ add_action('plugins_loaded', 'gap_i18n_init');
48
+
49
+ // require minimum version of WordPress
50
+ function gap_require_wp_version() {
51
+ global $gap_path, $gap_plugin, $gap_wp_vers;
52
+ $wp_version = get_bloginfo('version');
53
+ if (version_compare($wp_version, $gap_wp_vers, '<')) {
54
+ if (is_plugin_active($gap_path)) {
55
+ deactivate_plugins($gap_path);
56
+ $msg = '<strong>' . $gap_plugin . '</strong> ' . esc_html__('requires WordPress ', 'gap') . $gap_wp_vers . esc_html__(' or higher, and has been deactivated!', 'gap') . '<br />';
57
+ $msg .= esc_html__('Please return to the ', 'gap') . '<a href="' . admin_url() . '">' . esc_html__('WordPress Admin area', 'gap') . '</a> ' . esc_html__('to upgrade WordPress and try again.', 'gap');
58
+ wp_die($msg);
59
+ }
60
+ }
61
+ }
62
+ if (isset($_GET['activate']) && $_GET['activate'] == 'true') {
63
+ add_action('admin_init', 'gap_require_wp_version');
64
+ }
65
+
66
+ // Google Analytics Tracking Code
67
+ function google_analytics_tracking_code() {
68
+
69
+ $options = get_option('gap_options');
70
+
71
+ extract($options);
72
+
73
+ // universal
74
+ $ga_display = "ga('require', 'displayfeatures');";
75
+ $ga_link_uni = "ga('require', 'linkid', 'linkid.js');";
76
+ $ga_anon_uni = "ga('set', 'anonymizeIP', true);";
77
+ $ga_ssl_uni = "ga('set', 'forceSSL', true);";
78
+
79
+ // classic
80
+ $ga_alt = "('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';";
81
+ $ga_src = "('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';";
82
+ $ga_link_gaq = "var pluginUrl = '//www.google-analytics.com/plugins/ga/inpage_linkid.js';\n\t\t\t_gaq.push(['_require', 'inpage_linkid', pluginUrl]);";
83
+ $ga_anon_gaq = "_gaq.push(['_gat._anonymizeIp']);";
84
+ $ga_ssl_gaq = "_gaq.push(['_gat._forceSSL']);";
85
+
86
+ if ($gap_display_ads) $ga_src = $ga_alt;
87
+
88
+ if ($gap_enable && (!is_user_logged_in() || !current_user_can('administrator') || (current_user_can('administrator') && !$disable_admin))) {
89
+ if ($gap_universal) { ?>
90
+
91
+ <script>
92
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
93
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
94
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
95
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
96
+ ga('create', '<?php echo $gap_id; ?>', 'auto'<?php if ($tracker_object) echo ", " . $tracker_object; ?>);
97
+ <?php
98
+ if ($gap_display_ads) echo $ga_display . "\n\t\t\t";
99
+ if ($link_attr) echo $ga_link_uni . "\n\t\t\t";
100
+ if ($gap_anonymize) echo $ga_anon_uni . "\n\t\t\t";
101
+ if ($gap_force_ssl) echo $ga_ssl_uni . "\n\t\t\t";
102
+ if ($gap_custom_code) echo $gap_custom_code . "\n\t\t\t";
103
+ ?>ga('send', 'pageview');
104
+ </script>
105
+
106
+ <?php } else { ?>
107
+
108
+ <script type="text/javascript">
109
+ var _gaq = _gaq || [];
110
+ <?php
111
+ if ($link_attr) echo $ga_link_gaq . "\n\t\t\t";
112
+ if ($gap_anonymize) echo $ga_anon_gaq . "\n\t\t\t";
113
+ if ($gap_force_ssl) echo $ga_ssl_gaq . "\n\t\t\t";
114
+ if ($gap_custom_code) echo $gap_custom_code . "\n\t\t\t";
115
+ ?>_gaq.push(['_setAccount', '<?php echo $gap_id; ?>']);
116
+ _gaq.push(['_trackPageview']);
117
+ (function() {
118
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
119
+ ga.src = <?php echo $ga_src . "\n"; ?>
120
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
121
+ })();
122
+ </script>
123
+
124
+ <?php }
125
+ if ($gap_custom) echo $gap_custom . "\n";
126
+ }
127
+ }
128
+
129
+ // include tracking code in header or footer
130
+ if (isset($gap_options['gap_location']) && $gap_options['gap_location'] == 'header') {
131
+ if (isset($gap_options['admin_area']) && $gap_options['admin_area']) {
132
+ add_action('admin_head', 'google_analytics_tracking_code');
133
+ }
134
+ add_action('wp_head', 'google_analytics_tracking_code');
135
+ } else {
136
+ if (isset($gap_options['admin_area']) && $gap_options['admin_area']) {
137
+ add_action('admin_footer', 'google_analytics_tracking_code');
138
+ }
139
+ add_action('wp_footer', 'google_analytics_tracking_code');
140
+ }
141
+
142
+ // display settings link on plugin page
143
+ function gap_plugin_action_links($links, $file) {
144
+ global $gap_path;
145
+ if ($file == $gap_path) {
146
+ $gap_links = '<a href="' . get_admin_url() . 'options-general.php?page=' . $gap_path . '">' . esc_html__('Settings', 'gap') .'</a>';
147
+ array_unshift($links, $gap_links);
148
+ }
149
+ return $links;
150
+ }
151
+ add_filter ('plugin_action_links', 'gap_plugin_action_links', 10, 2);
152
+
153
+
154
+
155
+ // rate plugin link
156
+ function add_gap_links($links, $file) {
157
+
158
+ if ($file == plugin_basename(__FILE__)) {
159
+
160
+ $href = 'https://wordpress.org/support/plugin/ga-google-analytics/reviews/?rate=5#new-post';
161
+ $title = esc_html__('Give us a 5-star rating at WordPress.org', 'gap');
162
+ $text = esc_html__('Rate this plugin', 'gap') .'&nbsp;&raquo;';
163
+
164
+ $links[] = '<a target="_blank" href="'. $href .'" title="'. $title .'">'. $text .'</a>';
165
+
166
+ }
167
+
168
+ return $links;
169
+
170
+ }
171
+ add_filter('plugin_row_meta', 'add_gap_links', 10, 2);
172
+
173
+
174
+
175
+ // delete plugin settings
176
+ function gap_delete_plugin_options() {
177
+ delete_option('gap_options');
178
+ }
179
+ if ($gap_options['default_options'] == 1) {
180
+ register_uninstall_hook (__FILE__, 'gap_delete_plugin_options');
181
+ }
182
+
183
+ // define default settings
184
+ function gap_add_defaults() {
185
+ $tmp = get_option('gap_options');
186
+ if(($tmp['default_options'] == '1') || (!is_array($tmp))) {
187
+ $arr = array(
188
+ 'version_alert' => 0,
189
+ 'default_options' => 0,
190
+ 'gap_enable' => 0,
191
+ 'gap_id' => 'UA-XXXXX-Y',
192
+ 'gap_location' => 'header',
193
+ 'gap_display_ads' => 0,
194
+ 'gap_universal' => 0,
195
+ 'gap_custom' => '',
196
+ 'tracker_object' => '',
197
+ 'link_attr' => 0,
198
+ 'admin_area' => 0,
199
+ 'disable_admin' => 0,
200
+ 'gap_anonymize' => 0,
201
+ 'gap_force_ssl' => 0,
202
+ 'gap_custom_code' => '',
203
+ );
204
+ update_option('gap_options', $arr);
205
+ }
206
+ }
207
+ register_activation_hook (__FILE__, 'gap_add_defaults');
208
+
209
+ // whitelist settings
210
+ function gap_init() {
211
+ register_setting('gap_plugin_options', 'gap_options', 'gap_validate_options');
212
+ }
213
+ add_action ('admin_init', 'gap_init');
214
+
215
+ // sanitize and validate input
216
+ function gap_validate_options($input) {
217
+ global $gap_location;
218
+
219
+ if (!isset($input['version_alert'])) $input['version_alert'] = null;
220
+ $input['version_alert'] = ($input['version_alert'] == 1 ? 1 : 0);
221
+
222
+ if (!isset($input['default_options'])) $input['default_options'] = null;
223
+ $input['default_options'] = ($input['default_options'] == 1 ? 1 : 0);
224
+
225
+ if (!isset($input['gap_enable'])) $input['gap_enable'] = null;
226
+ $input['gap_enable'] = ($input['gap_enable'] == 1 ? 1 : 0);
227
+
228
+ $input['gap_id'] = wp_filter_nohtml_kses($input['gap_id']);
229
+
230
+ if (!isset($input['gap_location'])) $input['gap_location'] = null;
231
+ if (!array_key_exists($input['gap_location'], $gap_location)) $input['gap_location'] = null;
232
+
233
+ if (!isset($input['gap_display_ads'])) $input['gap_display_ads'] = null;
234
+ $input['gap_display_ads'] = ($input['gap_display_ads'] == 1 ? 1 : 0);
235
+
236
+ if (!isset($input['gap_universal'])) $input['gap_universal'] = null;
237
+ $input['gap_universal'] = ($input['gap_universal'] == 1 ? 1 : 0);
238
+
239
+ // dealing with kses
240
+ global $allowedposttags;
241
+ $allowed_atts = array(
242
+ 'align'=>array(), 'class'=>array(), 'id'=>array(), 'dir'=>array(), 'lang'=>array(), 'style'=>array(), 'label'=>array(), 'url'=>array(),
243
+ 'xml:lang'=>array(), 'src'=>array(), 'alt'=>array(), 'name'=>array(), 'content'=>array(), 'http-equiv'=>array(), 'profile'=>array(),
244
+ 'href'=>array(), 'property'=>array(), 'title'=>array(), 'rel'=>array(), 'type'=>array(), 'charset'=>array(), 'media'=>array(), 'rev'=>array(),
245
+ );
246
+ $allowedposttags['strong'] = $allowed_atts;
247
+ $allowedposttags['script'] = $allowed_atts;
248
+ $allowedposttags['style'] = $allowed_atts;
249
+ $allowedposttags['small'] = $allowed_atts;
250
+ $allowedposttags['span'] = $allowed_atts;
251
+ $allowedposttags['meta'] = $allowed_atts;
252
+ $allowedposttags['item'] = $allowed_atts;
253
+ $allowedposttags['base'] = $allowed_atts;
254
+ $allowedposttags['link'] = $allowed_atts;
255
+ $allowedposttags['abbr'] = $allowed_atts;
256
+ $allowedposttags['code'] = $allowed_atts;
257
+ $allowedposttags['div'] = $allowed_atts;
258
+ $allowedposttags['img'] = $allowed_atts;
259
+ $allowedposttags['h1'] = $allowed_atts;
260
+ $allowedposttags['h2'] = $allowed_atts;
261
+ $allowedposttags['h3'] = $allowed_atts;
262
+ $allowedposttags['h4'] = $allowed_atts;
263
+ $allowedposttags['h5'] = $allowed_atts;
264
+ $allowedposttags['ol'] = $allowed_atts;
265
+ $allowedposttags['ul'] = $allowed_atts;
266
+ $allowedposttags['li'] = $allowed_atts;
267
+ $allowedposttags['em'] = $allowed_atts;
268
+ $allowedposttags['p'] = $allowed_atts;
269
+ $allowedposttags['a'] = $allowed_atts;
270
+
271
+ $input['gap_custom'] = wp_kses($input['gap_custom'], $allowedposttags);
272
+
273
+ $input['tracker_object'] = wp_kses($input['tracker_object'], $allowedposttags);
274
+
275
+ if (!isset($input['link_attr'])) $input['link_attr'] = null;
276
+ $input['link_attr'] = ($input['link_attr'] == 1 ? 1 : 0);
277
+
278
+ if (!isset($input['admin_area'])) $input['admin_area'] = null;
279
+ $input['admin_area'] = ($input['admin_area'] == 1 ? 1 : 0);
280
+
281
+ if (!isset($input['disable_admin'])) $input['disable_admin'] = null;
282
+ $input['disable_admin'] = ($input['disable_admin'] == 1 ? 1 : 0);
283
+
284
+ if (!isset($input['gap_anonymize'])) $input['gap_anonymize'] = null;
285
+ $input['gap_anonymize'] = ($input['gap_anonymize'] == 1 ? 1 : 0);
286
+
287
+ if (!isset($input['gap_force_ssl'])) $input['gap_force_ssl'] = null;
288
+ $input['gap_force_ssl'] = ($input['gap_force_ssl'] == 1 ? 1 : 0);
289
+
290
+ $input['gap_custom_code'] = wp_kses($input['gap_custom_code'], $allowedposttags);
291
+
292
+ return $input;
293
+ }
294
+
295
+ // define dropdown options
296
+ $gap_location = array(
297
+ 'header' => array(
298
+ 'value' => 'header',
299
+ 'label' => esc_html__('Include code in the document head (via wp_head)', 'gap')
300
+ ),
301
+ 'footer' => array(
302
+ 'value' => 'footer',
303
+ 'label' => esc_html__('Include code in the document footer (via wp_footer)', 'gap')
304
+ ),
305
+ );
306
+
307
+ // add the options page
308
+ function gap_add_options_page() {
309
+ global $gap_plugin;
310
+ add_options_page($gap_plugin, 'Google Analytics', 'manage_options', __FILE__, 'gap_render_form');
311
+ }
312
+ add_action ('admin_menu', 'gap_add_options_page');
313
+
314
+ // create the options page
315
+ function gap_render_form() {
316
+ global $gap_plugin, $gap_options, $gap_path, $gap_homeurl, $gap_version, $gap_location;
317
+
318
+ if (!$gap_options['version_alert'] && !$gap_options['gap_universal']) $display_alert = ' style="display:block;"';
319
+ else $display_alert = ' style="display:none;"'; ?>
320
+
321
+ <style type="text/css">
322
+ .dismiss-alert { margin: 15px; }
323
+ .dismiss-alert-wrap { display: inline-block; padding: 7px 0 10px 0; }
324
+ .dismiss-alert .description { display: inline-block; margin: -2px 15px 0 0; }
325
+ .mm-panel-overview {
326
+ padding: 0 15px 10px 100px;
327
+ background-image: url(<?php echo plugins_url(); ?>/ga-google-analytics/gap-logo.jpg);
328
+ background-repeat: no-repeat; background-position: 15px 0; background-size: 80px 80px;
329
+ }
330
+
331
+ .mm-panel-usage { padding-bottom: 10px; }
332
+
333
+ #mm-plugin-options h1 small { line-height: 12px; font-size: 12px; color: #bbb; }
334
+ #mm-plugin-options h2 { margin: 0; padding: 12px 0 12px 15px; font-size: 16px; cursor: pointer; }
335
+ #mm-plugin-options h3 { margin: 20px 15px; font-size: 14px; }
336
+
337
+ #mm-plugin-options p { margin-left: 15px; }
338
+ #mm-plugin-options p.mm-alt { margin: 15px 0; }
339
+ #mm-plugin-options .mm-item-caption,
340
+ #mm-plugin-options .mm-item-caption code { font-size: 11px; }
341
+ #mm-plugin-options ul,
342
+ #mm-plugin-options ol { margin: 15px 15px 15px 40px; }
343
+ #mm-plugin-options li { margin: 10px 0; list-style-type: disc; }
344
+ #mm-plugin-options abbr { cursor: help; border-bottom: 1px dotted #dfdfdf; }
345
+
346
+ .mm-table-wrap { margin: 15px; }
347
+ .mm-table-wrap td { padding: 15px; vertical-align: middle; }
348
+ .mm-table-wrap .widefat td { vertical-align: middle; }
349
+ .mm-table-wrap .widefat th { width: 25%; vertical-align: middle; }
350
+ .mm-code { background-color: #fafae0; color: #333; font-size: 14px; }
351
+ .mm-radio-inputs { margin: 7px 0; }
352
+ .mm-radio-inputs span { padding-left: 5px; }
353
+
354
+ #setting-error-settings_updated { margin: 8px 0 15px 0; }
355
+ #setting-error-settings_updated p { margin: 7px 0; }
356
+ #mm-plugin-options .button-primary { margin: 0 0 15px 15px; }
357
+
358
+ #mm-panel-toggle { margin: 5px 0; }
359
+ #mm-credit-info { margin-top: -5px; }
360
+ #mm-iframe-wrap { width: 100%; height: 225px; overflow: hidden; }
361
+ #mm-iframe-wrap iframe { width: 100%; height: 100%; overflow: hidden; margin: 0; padding: 0; }
362
+ </style>
363
+
364
+ <div id="mm-plugin-options" class="wrap">
365
+ <h1><?php echo $gap_plugin; ?> <small><?php echo 'v' . $gap_version; ?></small></h1>
366
+ <div id="mm-panel-toggle"><a href="<?php get_admin_url() . 'options-general.php?page=' . $gap_path; ?>"><?php esc_html_e('Toggle all panels', 'gap'); ?></a></div>
367
+
368
+ <form method="post" action="options.php">
369
+ <?php $gap_options = get_option('gap_options'); settings_fields('gap_plugin_options'); ?>
370
+
371
+ <div class="metabox-holder">
372
+ <div class="meta-box-sortables ui-sortable">
373
+
374
+ <div id="mm-panel-alert"<?php echo $display_alert; ?> class="postbox">
375
+ <h2><?php esc_html_e('Important', 'gap'); ?></h2>
376
+ <div class="toggle">
377
+ <div class="mm-panel-alert">
378
+ <p>
379
+ <?php esc_html_e('Universal Analytics is now the standard for Google Analytics.', 'gap'); ?>
380
+ <?php esc_html_e('Please read the following info and migrate by enabling Universal Analytics in the plugin settings.', 'gap'); ?>
381
+ <?php esc_html_e('Universal Analytics will be the default setting in an future version of this plugin (probably in 2017).', 'gap'); ?>
382
+ </p>
383
+ <ul>
384
+ <li><a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/"><?php esc_html_e('Learn about Universal Analytics', 'gap'); ?></a></li>
385
+ <li><a target="_blank" href="https://developers.google.com/analytics/devguides/collection/upgrade/"><?php esc_html_e('Universal Analytics Upgrade Center', 'gap'); ?></a></li>
386
+ </ul>
387
+ <div class="dismiss-alert">
388
+ <div class="dismiss-alert-wrap">
389
+ <input class="input-alert" name="gap_options[version_alert]" type="checkbox" value="1" <?php if (isset($gap_options['version_alert'])) checked('1', $gap_options['version_alert']); ?> />
390
+ <label class="description" for="gap_options[version_alert]"><?php esc_html_e('Dismiss notice', 'gap') ?></label>
391
+ </div>
392
+ </div>
393
+ </div>
394
+ </div>
395
+ </div>
396
+
397
+ <div id="mm-panel-overview" class="postbox">
398
+ <h2><?php esc_html_e('Overview', 'gap'); ?></h2>
399
+ <div class="toggle<?php if (isset($_GET["settings-updated"])) { echo ' default-hidden'; } ?>">
400
+ <div class="mm-panel-overview">
401
+ <p><?php esc_html_e('This plugin adds the GA Tracking Code to your site. Log in to your Google account to view your stats.', 'gap'); ?></p>
402
+ <ul>
403
+ <li><a id="mm-panel-usage-link" href="#mm-panel-usage"><?php esc_html_e('How to Use', 'gap'); ?></a></li>
404
+ <li><a id="mm-panel-primary-link" href="#mm-panel-primary"><?php esc_html_e('Plugin Settings', 'gap'); ?></a></li>
405
+ <li><a target="_blank" href="https://wordpress.org/support/plugin/ga-google-analytics"><?php esc_html_e('Plugin Homepage', 'gap'); ?></a></li>
406
+ </ul>
407
+ <p>
408
+ <?php esc_html_e('If you like this plugin, please', 'gap'); ?>
409
+ <a target="_blank" href="https://wordpress.org/support/plugin/ga-google-analytics/reviews/?rate=5#new-post" title="<?php esc_attr_e('THANK YOU for your support!', 'gap'); ?>">
410
+ <?php esc_html_e('give it a 5-star rating', 'gap'); ?>&nbsp;&raquo;
411
+ </a>
412
+ </p>
413
+ </div>
414
+ </div>
415
+ </div>
416
+
417
+ <div id="mm-panel-usage" class="postbox">
418
+ <h2><?php esc_html_e('How to Use', 'gap'); ?></h2>
419
+ <div class="toggle default-hidden">
420
+ <div class="mm-panel-usage">
421
+ <p><?php esc_html_e('How to use', 'gap'); ?> <?php echo $gap_plugin; ?>:</p>
422
+ <ol>
423
+ <li><?php esc_html_e('In the plugin settings, enter your GA Property ID.', 'gap'); ?></li>
424
+ <li><?php esc_html_e('In the plugin settings, enable either "Legacy Analytics" or "Universal Analytics".', 'gap'); ?></li>
425
+ <li><?php esc_html_e('Configure other settings (optional) as desired and save your changes.', 'gap'); ?></li>
426
+ <li><?php esc_html_e('After 24-48 hours, you can log into your Google Analytics account to view your stats.', 'gap'); ?></li>
427
+ </ol>
428
+ <p>
429
+ <small>
430
+ <?php esc_html_e('Note that it can take 24-48 hours after adding the tracking code before any analytical data appears in your', 'gap'); ?>
431
+ <a target="_blank" href="http://www.google.com/analytics/"><?php esc_html_e('Google Analytics account', 'gap'); ?></a>.
432
+ <?php esc_html_e('To check that the GA tacking code is included, look at the source code of your web page(s). Learn more at the', 'gap'); ?>
433
+ <a target="_blank" href="https://support.google.com/analytics/?hl=en#topic=3544906"><?php esc_html_e('Google Analytics Help Center', 'gap'); ?></a>.
434
+ </small>
435
+ </p>
436
+ </div>
437
+ </div>
438
+ </div>
439
+
440
+ <div id="mm-panel-primary" class="postbox">
441
+ <h2><?php esc_html_e('Plugin Settings', 'gap'); ?></h2>
442
+ <div class="toggle<?php if (!isset($_GET["settings-updated"])) { echo ' default-hidden'; } ?>">
443
+ <p><?php esc_html_e('Enter your Tracking Code and choose your options.', 'gap'); ?></p>
444
+ <div class="mm-table-wrap">
445
+ <table class="widefat mm-table">
446
+ <tr>
447
+ <th scope="row"><label class="description" for="gap_options[gap_id]"><?php esc_html_e('GA Property ID', 'gap') ?></label></th>
448
+ <td><input type="text" size="20" maxlength="20" name="gap_options[gap_id]" value="<?php echo $gap_options['gap_id']; ?>" /></td>
449
+ </tr>
450
+ <tr>
451
+ <th scope="row"><label class="description" for="gap_options[gap_enable]"><?php esc_html_e('Enable Analytics', 'gap') ?></label></th>
452
+ <td>
453
+ <input name="gap_options[gap_enable]" type="checkbox" value="1" <?php if (isset($gap_options['gap_enable'])) checked('1', $gap_options['gap_enable']); ?> />
454
+ <?php esc_html_e('Enable Google Analytics on your site. Uses', 'gap'); ?>
455
+ <a target="_blank" href="http://code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html"><?php esc_html_e('Legacy Analytics', 'gap'); ?></a>
456
+ <?php esc_html_e('by default. To use Universal Analytics, check this box and enable the next setting.', 'gap'); ?>
457
+ </td>
458
+ </tr>
459
+ <tr>
460
+ <th scope="row"><label class="description" for="gap_options[gap_universal]"><?php esc_html_e('Universal Analytics', 'gap') ?></label></th>
461
+ <td>
462
+ <input name="gap_options[gap_universal]" type="checkbox" value="1" <?php if (isset($gap_options['gap_universal'])) checked('1', $gap_options['gap_universal']); ?> />
463
+ <?php esc_html_e('Enable', 'gap'); ?> <a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/"><?php esc_html_e('Universal Analytics', 'gap'); ?></a>
464
+ </td>
465
+ </tr>
466
+ <tr>
467
+ <th scope="row"><label class="description" for="gap_options[gap_display_ads]"><?php esc_html_e('Display Advertising', 'gap') ?></label></th>
468
+ <td>
469
+ <input name="gap_options[gap_display_ads]" type="checkbox" value="1" <?php if (isset($gap_options['gap_display_ads'])) checked('1', $gap_options['gap_display_ads']); ?> />
470
+ <?php esc_html_e('Enable support for', 'gap'); ?> <a target="_blank" href="https://support.google.com/analytics/answer/2444872"><?php esc_html_e('Display Advertising', 'gap'); ?></a>
471
+ </td>
472
+ </tr>
473
+ <tr>
474
+ <th scope="row"><label class="description" for="gap_options[link_attr]"><?php esc_html_e('Link Attribution', 'gap') ?></label></th>
475
+ <td>
476
+ <input name="gap_options[link_attr]" type="checkbox" value="1" <?php if (isset($gap_options['link_attr'])) checked('1', $gap_options['link_attr']); ?> />
477
+ <?php esc_html_e('Enable support for', 'gap'); ?> <a target="_blank" href="https://support.google.com/analytics/answer/2558867?hl=en"><?php esc_html_e('Enhanced Link Attribution', 'gap'); ?></a>
478
+ </td>
479
+ </tr>
480
+ <tr>
481
+ <th scope="row"><label class="description" for="gap_options[gap_anonymize]"><?php esc_html_e('IP Anonymization', 'gap') ?></label></th>
482
+ <td>
483
+ <input name="gap_options[gap_anonymize]" type="checkbox" value="1" <?php if (isset($gap_options['gap_anonymize'])) checked('1', $gap_options['gap_anonymize']); ?> />
484
+ <?php esc_html_e('Enable support for', 'gap'); ?> <a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/ip-anonymization"><?php esc_html_e('IP Anonymization', 'gap'); ?></a>
485
+ </td>
486
+ </tr>
487
+ <tr>
488
+ <th scope="row"><label class="description" for="gap_options[gap_force_ssl]"><?php esc_html_e('Force SSL', 'gap') ?></label></th>
489
+ <td>
490
+ <input name="gap_options[gap_force_ssl]" type="checkbox" value="1" <?php if (isset($gap_options['gap_force_ssl'])) checked('1', $gap_options['gap_force_ssl']); ?> />
491
+ <?php esc_html_e('Enable support for', 'gap'); ?> <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#forceSSL">Force SSL</a>
492
+ </td>
493
+ </tr>
494
+ <tr>
495
+ <th scope="row"><label class="description" for="gap_options[gap_location]"><?php esc_html_e('Code Location', 'gap'); ?></label></th>
496
+ <td>
497
+ <?php if (!isset($checked)) $checked = '';
498
+ foreach ($gap_location as $gap_loc) {
499
+ $radio_setting = $gap_options['gap_location'];
500
+ if ('' != $radio_setting) {
501
+ if ($gap_options['gap_location'] == $gap_loc['value']) {
502
+ $checked = "checked=\"checked\"";
503
+ } else {
504
+ $checked = '';
505
+ }
506
+ } ?>
507
+ <div class="mm-radio-inputs">
508
+ <input type="radio" name="gap_options[gap_location]" value="<?php echo esc_attr($gap_loc['value']); ?>" <?php echo $checked; ?> />
509
+ <span><?php echo $gap_loc['label']; ?></span>
510
+ </div>
511
+ <?php } ?>
512
+ <div class="mm-item-caption">
513
+ <?php esc_html_e('Tip: Google recommends including the Tracking Code in the document header, but including it in the footer can benefit page performance.', 'gap'); ?>
514
+ <?php esc_html_e('If in doubt, go with the default option to include the code in the header.', 'gap'); ?>
515
+ </div>
516
+ </td>
517
+ </tr>
518
+ <tr>
519
+ <th scope="row"><label class="description" for="gap_options[gap_custom]"><?php esc_html_e('Custom', 'gap'); ?> <code>&lt;head&gt;</code> <?php esc_html_e('Code', 'gap'); ?></label></th>
520
+ <td>
521
+ <textarea type="textarea" rows="3" cols="50" name="gap_options[gap_custom]"><?php if (isset($gap_options['gap_custom'])) echo esc_textarea($gap_options['gap_custom']); ?></textarea>
522
+ <div class="mm-item-caption">
523
+ <?php esc_html_e('Here you may specify any markup to be displayed in the', 'gap'); ?>
524
+ <code>&lt;head&gt;</code> <?php esc_html_e('section. Leave blank to disable.', 'gap'); ?>
525
+ </div>
526
+ </td>
527
+ </tr>
528
+ <tr>
529
+ <th scope="row"><label class="description" for="gap_options[tracker_object]"><?php esc_html_e('Custom Tracker Objects', 'gap'); ?></label></th>
530
+ <td>
531
+ <textarea type="textarea" rows="3" cols="50" name="gap_options[tracker_object]"><?php if (isset($gap_options['tracker_object'])) echo esc_textarea($gap_options['tracker_object']); ?></textarea>
532
+ <div class="mm-item-caption">
533
+ <?php esc_html_e('Any code entered here will be added to the primary', 'gap'); ?>
534
+ <code>ga('create')</code> <?php esc_html_e('function as the fourth parameter.', 'gap'); ?>
535
+ <a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers"><?php esc_html_e('Learn more about creating trackers', 'gap'); ?></a>.
536
+ </div>
537
+ </td>
538
+ </tr>
539
+ <tr>
540
+ <th scope="row"><label class="description" for="gap_options[gap_custom_code]"><?php esc_html_e('Custom GA Code', 'gap'); ?></label></th>
541
+ <td>
542
+ <textarea type="textarea" rows="3" cols="50" name="gap_options[gap_custom_code]"><?php if (isset($gap_options['gap_custom_code'])) echo esc_textarea($gap_options['gap_custom_code']); ?></textarea>
543
+ <div class="mm-item-caption">
544
+ <?php esc_html_e('Any code entered here will be added to the GA code snippet. For example, this is useful for', 'gap'); ?>
545
+ <a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers#working_with_multiple_trackers"><?php esc_html_e('creating multiple trackers', 'gap'); ?></a>.
546
+ </div>
547
+ </td>
548
+ </tr>
549
+ <tr>
550
+ <th scope="row"><label class="description" for="gap_options[admin_area]"><?php esc_html_e('Admin Area', 'gap') ?></label></th>
551
+ <td>
552
+ <input name="gap_options[admin_area]" type="checkbox" value="1" <?php if (isset($gap_options['admin_area'])) checked('1', $gap_options['admin_area']); ?> />
553
+ <?php esc_html_e('Enable GA in the WordPress Admin Area', 'gap'); ?>
554
+ </td>
555
+ </tr>
556
+ <tr>
557
+ <th scope="row"><label class="description" for="gap_options[disable_admin]"><?php esc_html_e('Admin Users', 'gap') ?></label></th>
558
+ <td>
559
+ <input name="gap_options[disable_admin]" type="checkbox" value="1" <?php if (isset($gap_options['disable_admin'])) checked('1', $gap_options['disable_admin']); ?> />
560
+ <?php esc_html_e('Disable GA on the frontend for Admin-level users', 'gap') ?>
561
+ </td>
562
+ </tr>
563
+ </table>
564
+ </div>
565
+ <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'gap'); ?>" />
566
+ </div>
567
+ </div>
568
+
569
+ <div id="mm-restore-settings" class="postbox">
570
+ <h2><?php esc_html_e('Restore Defaults', 'gap'); ?></h2>
571
+ <div class="toggle<?php if (!isset($_GET["settings-updated"])) { echo ' default-hidden'; } ?>">
572
+ <p>
573
+ <input name="gap_options[default_options]" type="checkbox" value="1" id="mm_restore_defaults" <?php if (isset($gap_options['default_options'])) checked('1', $gap_options['default_options']); ?> />
574
+ <label class="description" for="gap_options[default_options]"><?php esc_html_e('Restore default options upon plugin deactivation/reactivation.', 'gap'); ?></label>
575
+ </p>
576
+ <p>
577
+ <small>
578
+ <strong><?php esc_html_e('Tip:', 'gap'); ?> </strong> <?php esc_html_e('leave this option unchecked to remember your settings.', 'gap'); ?>
579
+ <?php esc_html_e('Or, to go ahead and restore all default options, check the box, save your settings, and then deactivate/reactivate the plugin.', 'gap'); ?>
580
+ </small>
581
+ </p>
582
+ <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'gap'); ?>" />
583
+ </div>
584
+ </div>
585
+
586
+ <div id="mm-panel-current" class="postbox">
587
+ <h2><?php esc_html_e('Show Support', 'gap'); ?></h2>
588
+ <div class="toggle">
589
+ <div id="mm-iframe-wrap">
590
+ <iframe src="https://perishablepress.com/current/data.php?current=gap"></iframe>
591
+ </div>
592
+ </div>
593
+ </div>
594
+
595
+ </div>
596
+ </div>
597
+
598
+ <div id="mm-credit-info">
599
+ <a target="_blank" href="<?php echo $gap_homeurl; ?>" title="<?php echo $gap_plugin; ?> Homepage"><?php echo $gap_plugin; ?></a> by
600
+ <a target="_blank" href="https://twitter.com/perishable" title="Jeff Starr on Twitter">Jeff Starr</a> @
601
+ <a target="_blank" href="https://monzillamedia.com/" title="Obsessive Web Design &amp; Development">Monzilla Media</a>
602
+ </div>
603
+
604
+ </form>
605
+ </div>
606
+
607
+ <script type="text/javascript">
608
+ jQuery(document).ready(function(){
609
+ // toggle panels
610
+ jQuery('.default-hidden').hide();
611
+ jQuery('#mm-panel-toggle a').click(function(){
612
+ jQuery('.toggle').slideToggle(300);
613
+ return false;
614
+ });
615
+ jQuery('h2').click(function(){
616
+ jQuery(this).next().slideToggle(300);
617
+ });
618
+ jQuery('#mm-panel-usage-link').click(function(){
619
+ jQuery('.toggle').hide();
620
+ jQuery('#mm-panel-usage .toggle').slideToggle(300);
621
+ return true;
622
+ });
623
+ jQuery('#mm-panel-primary-link').click(function(){
624
+ jQuery('.toggle').hide();
625
+ jQuery('#mm-panel-primary .toggle').slideToggle(300);
626
+ return true;
627
+ });
628
+ //dismiss_alert
629
+ if (!jQuery('.dismiss-alert-wrap input').is(':checked')){
630
+ jQuery('.dismiss-alert-wrap input').one('click',function(){
631
+ jQuery('.dismiss-alert-wrap').after('<input type="submit" class="button-secondary" value="<?php esc_attr_e('Save Preference', 'gap'); ?>" />');
632
+ });
633
+ }
634
+ // prevent accidents
635
+ if (!jQuery('#mm_restore_defaults').is(':checked')){
636
+ jQuery('#mm_restore_defaults').click(function(event){
637
+ var r = confirm("<?php esc_html_e('Are you sure you want to restore all default options? (this action cannot be undone)', 'gap'); ?>");
638
+ if (r == true){
639
+ jQuery('#mm_restore_defaults').attr('checked', true);
640
+ } else {
641
+ jQuery('#mm_restore_defaults').attr('checked', false);
642
+ }
643
+ });
644
+ }
645
+ });
646
+ </script>
647
+
648
+ <?php }
gap-logo.jpg ADDED
Binary file
languages/gap.pot ADDED
@@ -0,0 +1,375 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Project-Id-Version: GA Google Analytics\n"
5
+ "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2017-03-24 19:12+0000\n"
7
+ "POT-Revision-Date: Wed Aug 31 2016 16:01:29 GMT-0700 (PDT)\n"
8
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
9
+ "Last-Translator: \n"
10
+ "Language-Team: \n"
11
+ "Language: \n"
12
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-Basepath: .\n"
18
+ "X-Poedit-SearchPath-0: ..\n"
19
+ "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
20
+ "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
21
+ "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
22
+ "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
23
+ "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
24
+ "X-Generator: Loco - https://localise.biz/"
25
+
26
+ #. Name of the plugin
27
+ #: ga-google-analytics.php:24
28
+ msgid "GA Google Analytics"
29
+ msgstr ""
30
+
31
+ #: ga-google-analytics.php:42
32
+ msgid "requires WordPress "
33
+ msgstr ""
34
+
35
+ #: ga-google-analytics.php:42
36
+ msgid " or higher, and has been deactivated!"
37
+ msgstr ""
38
+
39
+ #: ga-google-analytics.php:43
40
+ msgid "Please return to the "
41
+ msgstr ""
42
+
43
+ #: ga-google-analytics.php:43
44
+ msgid "WordPress Admin area"
45
+ msgstr ""
46
+
47
+ #: ga-google-analytics.php:43
48
+ msgid "to upgrade WordPress and try again."
49
+ msgstr ""
50
+
51
+ #: ga-google-analytics.php:132
52
+ msgid "Settings"
53
+ msgstr ""
54
+
55
+ #: ga-google-analytics.php:147
56
+ msgid "Give us a 5-star rating at WordPress.org"
57
+ msgstr ""
58
+
59
+ #: ga-google-analytics.php:148
60
+ msgid "Rate this plugin"
61
+ msgstr ""
62
+
63
+ #: ga-google-analytics.php:285
64
+ msgid "Include code in the document head (via wp_head)"
65
+ msgstr ""
66
+
67
+ #: ga-google-analytics.php:289
68
+ msgid "Include code in the document footer (via wp_footer)"
69
+ msgstr ""
70
+
71
+ #: ga-google-analytics.php:352
72
+ msgid "Toggle all panels"
73
+ msgstr ""
74
+
75
+ #: ga-google-analytics.php:361
76
+ msgid "Important"
77
+ msgstr ""
78
+
79
+ #: ga-google-analytics.php:365
80
+ msgid "Universal Analytics is now the standard for Google Analytics."
81
+ msgstr ""
82
+
83
+ #: ga-google-analytics.php:366
84
+ msgid ""
85
+ "Please read the following info and migrate by enabling Universal Analytics "
86
+ "in the plugin settings."
87
+ msgstr ""
88
+
89
+ #: ga-google-analytics.php:367
90
+ msgid ""
91
+ "Universal Analytics will be the default setting in an future version of this "
92
+ "plugin (probably in 2017)."
93
+ msgstr ""
94
+
95
+ #: ga-google-analytics.php:370
96
+ msgid "Learn about Universal Analytics"
97
+ msgstr ""
98
+
99
+ #: ga-google-analytics.php:371
100
+ msgid "Universal Analytics Upgrade Center"
101
+ msgstr ""
102
+
103
+ #: ga-google-analytics.php:376
104
+ msgid "Dismiss notice"
105
+ msgstr ""
106
+
107
+ #: ga-google-analytics.php:384
108
+ msgid "Overview"
109
+ msgstr ""
110
+
111
+ #: ga-google-analytics.php:387
112
+ msgid ""
113
+ "This plugin adds the GA Tracking Code to your site. Log in to your Google "
114
+ "account to view your stats."
115
+ msgstr ""
116
+
117
+ #: ga-google-analytics.php:389 ga-google-analytics.php:404
118
+ msgid "How to Use"
119
+ msgstr ""
120
+
121
+ #: ga-google-analytics.php:390 ga-google-analytics.php:427
122
+ msgid "Plugin Settings"
123
+ msgstr ""
124
+
125
+ #: ga-google-analytics.php:391
126
+ msgid "Plugin Homepage"
127
+ msgstr ""
128
+
129
+ #: ga-google-analytics.php:394
130
+ msgid "If you like this plugin, please"
131
+ msgstr ""
132
+
133
+ #: ga-google-analytics.php:395
134
+ msgid "THANK YOU for your support!"
135
+ msgstr ""
136
+
137
+ #: ga-google-analytics.php:396
138
+ msgid "give it a 5-star rating"
139
+ msgstr ""
140
+
141
+ #: ga-google-analytics.php:407
142
+ msgid "How to use"
143
+ msgstr ""
144
+
145
+ #: ga-google-analytics.php:409
146
+ msgid "In the plugin settings, enter your GA Property ID."
147
+ msgstr ""
148
+
149
+ #: ga-google-analytics.php:410
150
+ msgid ""
151
+ "In the plugin settings, enable either \"Legacy Analytics\" or \"Universal "
152
+ "Analytics\"."
153
+ msgstr ""
154
+
155
+ #: ga-google-analytics.php:411
156
+ msgid "Configure other settings (optional) as desired and save your changes."
157
+ msgstr ""
158
+
159
+ #: ga-google-analytics.php:412
160
+ msgid ""
161
+ "After 24-48 hours, you can log into your Google Analytics account to view "
162
+ "your stats."
163
+ msgstr ""
164
+
165
+ #: ga-google-analytics.php:416
166
+ msgid ""
167
+ "Note that it can take 24-48 hours after adding the tracking code before any "
168
+ "analytical data appears in your"
169
+ msgstr ""
170
+
171
+ #: ga-google-analytics.php:417
172
+ msgid "Google Analytics account"
173
+ msgstr ""
174
+
175
+ #: ga-google-analytics.php:418
176
+ msgid ""
177
+ "To check that the GA tacking code is included, look at the source code of "
178
+ "your web page(s). Learn more at the"
179
+ msgstr ""
180
+
181
+ #: ga-google-analytics.php:419
182
+ msgid "Google Analytics Help Center"
183
+ msgstr ""
184
+
185
+ #: ga-google-analytics.php:429
186
+ msgid "Enter your Tracking Code and choose your options."
187
+ msgstr ""
188
+
189
+ #: ga-google-analytics.php:433
190
+ msgid "GA Property ID"
191
+ msgstr ""
192
+
193
+ #: ga-google-analytics.php:437
194
+ msgid "Enable Analytics"
195
+ msgstr ""
196
+
197
+ #: ga-google-analytics.php:440
198
+ msgid "Enable Google Analytics on your site. Uses"
199
+ msgstr ""
200
+
201
+ #: ga-google-analytics.php:441
202
+ msgid "Legacy Analytics"
203
+ msgstr ""
204
+
205
+ #: ga-google-analytics.php:442
206
+ msgid ""
207
+ "by default. To use Universal Analytics, check this box and enable the next "
208
+ "setting."
209
+ msgstr ""
210
+
211
+ #: ga-google-analytics.php:446 ga-google-analytics.php:449
212
+ msgid "Universal Analytics"
213
+ msgstr ""
214
+
215
+ #: ga-google-analytics.php:449
216
+ msgid "Enable"
217
+ msgstr ""
218
+
219
+ #: ga-google-analytics.php:453 ga-google-analytics.php:456
220
+ msgid "Display Advertising"
221
+ msgstr ""
222
+
223
+ #: ga-google-analytics.php:456 ga-google-analytics.php:463
224
+ #: ga-google-analytics.php:470 ga-google-analytics.php:477
225
+ msgid "Enable support for"
226
+ msgstr ""
227
+
228
+ #: ga-google-analytics.php:460
229
+ msgid "Link Attribution"
230
+ msgstr ""
231
+
232
+ #: ga-google-analytics.php:463
233
+ msgid "Enhanced Link Attribution"
234
+ msgstr ""
235
+
236
+ #: ga-google-analytics.php:467 ga-google-analytics.php:470
237
+ msgid "IP Anonymization"
238
+ msgstr ""
239
+
240
+ #: ga-google-analytics.php:474
241
+ msgid "Force SSL"
242
+ msgstr ""
243
+
244
+ #: ga-google-analytics.php:481
245
+ msgid "Code Location"
246
+ msgstr ""
247
+
248
+ #: ga-google-analytics.php:499
249
+ msgid ""
250
+ "Tip: Google recommends including the Tracking Code in the document header, "
251
+ "but including it in the footer can benefit page performance."
252
+ msgstr ""
253
+
254
+ #: ga-google-analytics.php:500
255
+ msgid ""
256
+ "If in doubt, go with the default option to include the code in the header."
257
+ msgstr ""
258
+
259
+ #: ga-google-analytics.php:505
260
+ msgid "Custom"
261
+ msgstr ""
262
+
263
+ #: ga-google-analytics.php:505
264
+ msgid "Code"
265
+ msgstr ""
266
+
267
+ #: ga-google-analytics.php:509
268
+ msgid "Here you may specify any markup to be displayed in the"
269
+ msgstr ""
270
+
271
+ #: ga-google-analytics.php:510
272
+ msgid "section. Leave blank to disable."
273
+ msgstr ""
274
+
275
+ #: ga-google-analytics.php:515
276
+ msgid "Custom Tracker Objects"
277
+ msgstr ""
278
+
279
+ #: ga-google-analytics.php:519
280
+ msgid "Any code entered here will be added to the primary"
281
+ msgstr ""
282
+
283
+ #: ga-google-analytics.php:520
284
+ msgid "function as the fourth parameter."
285
+ msgstr ""
286
+
287
+ #: ga-google-analytics.php:521
288
+ msgid "Learn more about creating trackers"
289
+ msgstr ""
290
+
291
+ #: ga-google-analytics.php:526
292
+ msgid "Custom GA Code"
293
+ msgstr ""
294
+
295
+ #: ga-google-analytics.php:530
296
+ msgid ""
297
+ "Any code entered here will be added to the GA code snippet. For example, "
298
+ "this is useful for"
299
+ msgstr ""
300
+
301
+ #: ga-google-analytics.php:531
302
+ msgid "creating multiple trackers"
303
+ msgstr ""
304
+
305
+ #: ga-google-analytics.php:536
306
+ msgid "Admin Area"
307
+ msgstr ""
308
+
309
+ #: ga-google-analytics.php:539
310
+ msgid "Enable GA in the WordPress Admin Area"
311
+ msgstr ""
312
+
313
+ #: ga-google-analytics.php:543
314
+ msgid "Admin Users"
315
+ msgstr ""
316
+
317
+ #: ga-google-analytics.php:546
318
+ msgid "Disable GA on the frontend for Admin-level users"
319
+ msgstr ""
320
+
321
+ #: ga-google-analytics.php:551 ga-google-analytics.php:568
322
+ msgid "Save Settings"
323
+ msgstr ""
324
+
325
+ #: ga-google-analytics.php:556
326
+ msgid "Restore Defaults"
327
+ msgstr ""
328
+
329
+ #: ga-google-analytics.php:560
330
+ msgid "Restore default options upon plugin deactivation/reactivation."
331
+ msgstr ""
332
+
333
+ #: ga-google-analytics.php:564
334
+ msgid "Tip:"
335
+ msgstr ""
336
+
337
+ #: ga-google-analytics.php:564
338
+ msgid "leave this option unchecked to remember your settings."
339
+ msgstr ""
340
+
341
+ #: ga-google-analytics.php:565
342
+ msgid ""
343
+ "Or, to go ahead and restore all default options, check the box, save your "
344
+ "settings, and then deactivate/reactivate the plugin."
345
+ msgstr ""
346
+
347
+ #: ga-google-analytics.php:573
348
+ msgid "Show Support"
349
+ msgstr ""
350
+
351
+ #: ga-google-analytics.php:617
352
+ msgid "Save Preference"
353
+ msgstr ""
354
+
355
+ #: ga-google-analytics.php:623
356
+ msgid ""
357
+ "Are you sure you want to restore all default options? (this action cannot be "
358
+ "undone)"
359
+ msgstr ""
360
+
361
+ #. Description of the plugin
362
+ msgid "Adds your Google Analytics Tracking Code to your WordPress site."
363
+ msgstr ""
364
+
365
+ #. URI of the plugin
366
+ msgid "https://perishablepress.com/google-analytics-plugin/"
367
+ msgstr ""
368
+
369
+ #. Author of the plugin
370
+ msgid "Jeff Starr"
371
+ msgstr ""
372
+
373
+ #. Author URI of the plugin
374
+ msgid "https://plugin-planet.com/"
375
+ msgstr ""
readme.txt ADDED
@@ -0,0 +1,295 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === GA Google Analytics ===
2
+
3
+ Plugin Name: GA Google Analytics
4
+ Plugin URI: https://perishablepress.com/google-analytics-plugin/
5
+ Description: Adds your Google Analytics Tracking Code to your WordPress site.
6
+ Tags: analytics, ga, google, google analytics, tracking, statistics, stats
7
+ Author: Jeff Starr
8
+ Author URI: https://plugin-planet.com/
9
+ Donate link: https://m0n.co/donate
10
+ Contributors: specialk
11
+ Requires at least: 4.1
12
+ Tested up to: 4.8
13
+ Stable tag: 20170324
14
+ Version: 20170324
15
+ Text Domain: gap
16
+ Domain Path: /languages
17
+ License: GPL v2 or later
18
+
19
+ Adds your Google Analytics Tracking Code to your WordPress site.
20
+
21
+
22
+
23
+ == Description ==
24
+
25
+ This plugin enables Google Analytics for your entire WordPress site. Lightweight and fast with plenty of great features.
26
+
27
+ **Features**
28
+
29
+ * Blazing fast performance
30
+ * Does one thing and does it well
31
+ * Drop-dead simple and easy to use
32
+ * Uses latest version of tracking code
33
+ * Includes tracking code in header or footer
34
+ * Inserts tracking code on all WordPress web pages
35
+ * Includes option to add your own custom markup
36
+ * Sleek plugin Settings page with toggling panels
37
+ * Lightweight, and born of simplicity, no frills
38
+ * Option to disable GA on the frontend for admin users
39
+ * Option to include or exclude GA in the Admin Area
40
+ * Add custom directives to your GA code
41
+
42
+ This is a lightweight plugin that inserts the required GA tracking code. To view your site statistics, visit your Google Analytics account.
43
+
44
+ **GA Support**
45
+
46
+ * Supports [Classic Analytics/ga.js](https://developers.google.com/analytics/devguides/collection/gajs/)
47
+ * Supports [Universal Analytics/analytics.js](https://developers.google.com/analytics/devguides/collection/analyticsjs/)
48
+ * Supports [Display Advertising](https://support.google.com/analytics/answer/2444872)
49
+ * Supports [Enhanced Link Attribution](https://support.google.com/analytics/answer/2558867)
50
+ * Supports [Tracker Objects](https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers)
51
+ * Supports [IP Anonymization](https://developers.google.com/analytics/devguides/collection/analyticsjs/ip-anonymization)
52
+ * Supports [Force SSL](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#forceSSL)
53
+
54
+ Learn more about [Google Analytics](http://www.google.com/analytics/)!
55
+
56
+
57
+
58
+ == Installation ==
59
+
60
+ **Installation**
61
+
62
+ 1. Upload the plugin to your blog and activate
63
+ 2. Visit the settings to configure your options
64
+
65
+ After configuring your settings, you can verify that GA code is included by viewing the source code of your web pages.
66
+
67
+ __Note:__ this plugin adds the required GA code to your web pages. In order for the code to do anything, it must correspond to an active, properly configured Google Analytics account. Learn more at the [Google Analytics Help Center](https://support.google.com/analytics/?hl=en#topic=3544906).
68
+
69
+ [More info on installing WP plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins)
70
+
71
+
72
+ **Usage**
73
+
74
+ After entering your GA Property ID, enable the setting "Enable Google Analytics". This enables the legacy tracking method, which is deprecated and soon to be replaced by the new tracking method, "Universal Analytics". To go ahead and start using Universal Analytics right now, also enable the next setting, "Enable Universal Analytics".
75
+
76
+ Then from there you can enable advanced tracking functionality such as "Display Advertising" and "Link Attribution", depending on your own statistical strategy. If ever in doubt, consult the official [Google Analytics site](https://developers.google.com/analytics/) and [Help Center](https://support.google.com/analytics/?hl=en#topic=3544906).
77
+
78
+
79
+
80
+ **Upgrades**
81
+
82
+ To upgrade GA Google Analytics, remove the old version and replace with the new version. Or just click "Update" from the Plugins screen and let WordPress do it for you automatically.
83
+
84
+ __Note:__ uninstalling the plugin from the WP Plugins screen results in the removal of all settings from the WP database.
85
+
86
+ For more information, visit the [GA Plugin Homepage](https://perishablepress.com/google-analytics-plugin/).
87
+
88
+
89
+ **Restore Default Options**
90
+
91
+ To restore default plugin options, either uninstall/reinstall the plugin, or visit the plugin settings &gt; Restore Default Options.
92
+
93
+
94
+ **Uninstalling**
95
+
96
+ GA Google Analytics cleans up after itself. All plugin settings will be removed from your database when the plugin is uninstalled via the Plugins screen.
97
+
98
+
99
+
100
+ == Screenshots ==
101
+
102
+ 1. GA Google Analytics: Plugin Settings (panels toggle open/closed)
103
+
104
+ More screenshots available at the [GA Plugin Homepage](https://perishablepress.com/google-analytics-plugin/).
105
+
106
+
107
+
108
+ == Upgrade Notice ==
109
+
110
+ To upgrade GA Google Analytics, remove the old version and replace with the new version. Or just click "Update" from the Plugins screen and let WordPress do it for you automatically.
111
+
112
+ __Note:__ uninstalling the plugin from the WP Plugins screen results in the removal of all settings from the WP database.
113
+
114
+ For more information, visit the [GA Plugin Homepage](https://perishablepress.com/google-analytics-plugin/).
115
+
116
+
117
+
118
+ == Frequently Asked Questions ==
119
+
120
+ **Question:** "I have installed the GA Google Analytics plugin and did insert the tracking code and also I checked in my website View Page Source the code is there, but in Google Analytic says tracking code is not detected."
121
+
122
+ **Answer:** You need to wait awhile for Google to collect some data, like at least a day or whatever. Standard stuff for Google Analytics. For more information, check out the [Google Analytics Help Center](https://support.google.com/analytics/?hl=en#topic=3544906).
123
+
124
+ To ask a question, suggest a feature, or provide feedback, [contact me directly](https://perishablepress.com/contact/).
125
+
126
+ Learn more about [Google Analytics](http://www.google.com/analytics/) and [GA tracking methods](https://perishablepress.com/3-ways-track-google-analytics/).
127
+
128
+
129
+
130
+ == Support development of this plugin ==
131
+
132
+ I develop and maintain this free plugin with love for the WordPress community. To show support, you can [make a cash donation](https://m0n.co/donate), [bitcoin donation](https://m0n.co/bitcoin), or purchase one of my books:
133
+
134
+ * [The Tao of WordPress](https://wp-tao.com/)
135
+ * [Digging into WordPress](https://digwp.com/)
136
+ * [.htaccess made easy](https://htaccessbook.com/)
137
+ * [WordPress Themes In Depth](https://wp-tao.com/wordpress-themes-book/)
138
+
139
+ And/or purchase one of my premium WordPress plugins:
140
+
141
+ * [BBQ Pro](https://plugin-planet.com/bbq-pro/) - Pro version of Block Bad Queries
142
+ * [Blackhole Pro](https://plugin-planet.com/blackhole-pro/) - Pro version of Blackhole for Bad Bots
143
+ * [SES Pro](https://plugin-planet.com/ses-pro/) - Super-simple &amp; flexible email signup forms
144
+ * [USP Pro](https://plugin-planet.com/usp-pro/) - Pro version of User Submitted Posts
145
+
146
+ Links, tweets and likes also appreciated. Thanks! :)
147
+
148
+
149
+
150
+ == Changelog ==
151
+
152
+ **20170324**
153
+
154
+ * Updates the show support panel
155
+ * Tweaks settings UI panel display
156
+ * Edits some plugin settings for clarity
157
+ * Replaces global `$wp_version` with `get_bloginfo('version')`
158
+ * Generates new default translation template
159
+ * Tests on WordPress version 4.8
160
+
161
+ **20161116**
162
+
163
+ * Adds info to deprecation nag on plugin settings page
164
+ * Adds info to the Overview panel on plugin settings page
165
+ * Changes stable tag from trunk to latest version
166
+ * Adds translation support for some missing strings
167
+ * Updates plugin author URL
168
+ * Updates Twitter link URL
169
+ * Refactors `add_gap_links()` function
170
+ * Updates URL for rate this plugin links
171
+ * Regenerates new default translation template
172
+ * Tests on WordPress version 4.7 (beta)
173
+
174
+ **20160831**
175
+
176
+ * Renamed the plugin back to its original name, GA Google Analytics
177
+ * Revised labels for first two "enable-GA" settings for clarity
178
+ * Regenerated translation template
179
+
180
+ **20160810**
181
+
182
+ * Renamed menu link from "GA Plugin" to "Google Analytics"
183
+ * Renamed plugin from "GA Google Analytics" to "(GA) Google Analytics"
184
+ * Replaced `_e()` with `esc_html_e()` or `esc_attr_e()`
185
+ * Replaced `__()` with `esc_html__()` or `esc_attr__()`
186
+ * Streamlined and optimized plugin settings page
187
+ * Added plugin icons and larger banner image
188
+ * Improved translation support
189
+ * Tested on WordPress 4.6
190
+
191
+ **20160331**
192
+
193
+ * Replaced GA Logo with retina version
194
+ * Added screenshot to readme/docs
195
+ * Added retina version of plugin banner
196
+ * Updated readme.txt with fresh infos
197
+ * Tested on WordPress version 4.5 beta
198
+
199
+ **20151109**
200
+
201
+ * Tested on WordPress 4.4 (beta)
202
+ * Updated minimum version requirement
203
+ * Updated heading hierarchy on settings page
204
+ * Added option to disable GA for admin users (Thanks to [Daniele Raimondi](http://w3b.it/))
205
+ * Added support for IP anonymization (Thanks to [Daniele Raimondi](http://w3b.it/))
206
+ * Added support for Force SSL (Thanks to [Česlav Przywara](http://www.bluechip.at/))
207
+ * Cleaned up some "Undefined index" Notices
208
+ * Removed 404 link from Important Notice panel
209
+ * Updated Google links in the Overview panel
210
+ * Refined google_analytics_tracking_code()
211
+ * Updated default GA ID, UA-XXXXX-Y
212
+ * Added default tracker object, "auto"
213
+ * Updated Google URLs in the readme.txt
214
+ * Updated Google URLs in the Options panel
215
+ * Updated info about adding custom trackers
216
+ * Added support for custom GA code
217
+ * General code cleanup and testing
218
+
219
+ **20150808**
220
+
221
+ * Tested on WordPress 4.3
222
+ * Updated minimum version requirement
223
+
224
+ **20150507**
225
+
226
+ * Tested with WP 4.2 + 4.3 (alpha)
227
+ * Changed a few "http" links to "https"
228
+ * Added isset() to eliminate some PHP warnings
229
+
230
+ **20150314**
231
+
232
+ * Tested with latest version of WP (4.1)
233
+ * Increased minimum version to WP 3.8
234
+ * Added Text Domain and Domain Path to file header
235
+ * Streamline/fine-tune plugin code
236
+ * Removed valign="top" from settings page
237
+ * Added option to enable GA reporting in Admin Area
238
+ * Added alert/notice on settings page about Universal Analytics
239
+ * Removed deprecated screen_icon()
240
+ * Replaced default .mo/.po templates with .pot template
241
+
242
+ **20140922**
243
+
244
+ * Tested with latest version of WP (4.0)
245
+ * Increased minimum version to WP 3.7
246
+ * Added conditional check for min-version function
247
+ * Added optional field to display any other codes
248
+ * Improved layout and terminology of settings page
249
+ * Updated GA code for Display Advertising
250
+ * Added support for Enhanced Link Attribution
251
+ * Added support for Tracker Objects
252
+ * Refactored google_analytics_tracking_code()
253
+ * Updated mo/po translation files
254
+
255
+ **20140123**
256
+
257
+ * Tested with latest WordPress (3.8)
258
+ * Added trailing slash to load_plugin_textdomain()
259
+
260
+ **20131107**
261
+
262
+ * Added uninstall.php file
263
+ * Added "rate this plugin" links
264
+ * Added support for i18n
265
+
266
+ **Version 20131104**
267
+
268
+ * Added line to check for WP, prevent direct loading of script
269
+ * Added support for [Display Advertising](https://support.google.com/analytics/answer/2444872)
270
+ * Added support for [Universal Analytics/Analytics.js](https://developers.google.com/analytics/devguides/collection/analyticsjs/)
271
+ * Removed closing "?>" from ga-google-analytics.php
272
+ * Tested with the latest version of WordPress (3.7)
273
+
274
+ **Version 20130705**
275
+
276
+ * Added option to display in header or footer
277
+ * Overview and Updates admin panels toggled open by default
278
+ * Implemented translation support
279
+ * Added info to settings page
280
+ * General plugin check and code tuning
281
+
282
+ **Version 20130103**
283
+
284
+ * Added margins to submit buttons (now required in WP 3.5)
285
+
286
+ **Version 20121102**
287
+
288
+ * Revamped plugin settings page
289
+ * Fine-tuned and further tested
290
+ * Fleshed out documentation
291
+ * New graphics and copy
292
+
293
+ **Version 20120409**
294
+
295
+ * Initial release.
uninstall.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php // uninstall remove options
2
+
3
+ if(!defined('ABSPATH') && !defined('WP_UNINSTALL_PLUGIN')) exit();
4
+
5
+ // delete options
6
+ delete_option('gap_options');
7
+
8
+
9
+
10
+