Google Analytics - Version 1.6

Version Description

  • Improved tag manager script placement, preventing search console errors
Download this release

Release Info

Developer webkinder
Plugin Icon 128x128 Google Analytics
Version 1.6
Comparing to
See all releases

Code changes from version 1.5 to 1.6

includes/mailchimp-form.php CHANGED
@@ -8,17 +8,17 @@
8
  <div id="mc_embed_signup">
9
  <form action="//webkinder.us12.list-manage.com/subscribe/post?u=979fe90d29c9ca9e25d5acc4b&amp;id=dfae840228" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
10
  <div id="mc_embed_signup_scroll">
11
- <h2><?php _e("Stay updated on this plugin", $this->textdomain); ?></h2>
12
  <div class="mc-field-group">
13
- <label for="mce-EMAIL"><?php _e("Email Address", $this->textdomain); ?><span class="asterisk">*</span></label>
14
  <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
15
  </div>
16
  <div class="mc-field-group">
17
- <label for="mce-FNAME"><?php _e("First Name", $this->textdomain); ?><span class="asterisk">*</span></label>
18
  <input type="text" value="" name="FNAME" class="required" id="mce-FNAME">
19
  </div>
20
  <div class="mc-field-group">
21
- <label for="mce-LNAME"><?php _e("Last Name", $this->textdomain); ?><span class="asterisk">*</span></label>
22
  <input type="text" value="" name="LNAME" class="required" id="mce-LNAME">
23
  </div>
24
 
@@ -27,7 +27,7 @@
27
  <div class="response" id="mce-success-response" style="display:none"></div>
28
  </div> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
29
  <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_979fe90d29c9ca9e25d5acc4b_dfae840228" tabindex="-1" value=""></div>
30
- <div class="clear"><input type="submit" value="<?php _e("Subscribe", $this->textdomain); ?>" name="subscribe" id="mc-embedded-subscribe" class="button button-primary"></div>
31
  </div>
32
  </form>
33
  </div>
8
  <div id="mc_embed_signup">
9
  <form action="//webkinder.us12.list-manage.com/subscribe/post?u=979fe90d29c9ca9e25d5acc4b&amp;id=dfae840228" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
10
  <div id="mc_embed_signup_scroll">
11
+ <h2><?php _e("Stay updated on this plugin", 'wk-ga'); ?></h2>
12
  <div class="mc-field-group">
13
+ <label for="mce-EMAIL"><?php _e("Email Address", 'wk-ga'); ?><span class="asterisk">*</span></label>
14
  <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
15
  </div>
16
  <div class="mc-field-group">
17
+ <label for="mce-FNAME"><?php _e("First Name", 'wk-ga'); ?><span class="asterisk">*</span></label>
18
  <input type="text" value="" name="FNAME" class="required" id="mce-FNAME">
19
  </div>
20
  <div class="mc-field-group">
21
+ <label for="mce-LNAME"><?php _e("Last Name", 'wk-ga'); ?><span class="asterisk">*</span></label>
22
  <input type="text" value="" name="LNAME" class="required" id="mce-LNAME">
23
  </div>
24
 
27
  <div class="response" id="mce-success-response" style="display:none"></div>
28
  </div> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
29
  <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_979fe90d29c9ca9e25d5acc4b_dfae840228" tabindex="-1" value=""></div>
30
+ <div class="clear"><input type="submit" value="<?php _e("Subscribe", 'wk-ga'); ?>" name="subscribe" id="mc-embedded-subscribe" class="button button-primary"></div>
31
  </div>
32
  </form>
33
  </div>
lang/wk-ga-de_CH.mo CHANGED
Binary file
lang/wk-ga-de_CH.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics by WebKinder\n"
4
- "POT-Creation-Date: 2016-11-05 13:02+0100\n"
5
- "PO-Revision-Date: 2016-11-05 13:02+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: de\n"
@@ -15,16 +15,37 @@ msgstr ""
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e\n"
17
  "X-Poedit-SearchPath-0: wk-ga.php\n"
 
18
 
19
- #: wk-ga.php:186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  msgid "Do not track any visits from this device."
21
  msgstr "Keine Besuche von diesem Gerät tracken."
22
 
23
- #: wk-ga.php:215
24
  msgid "Test your tracking code now!"
25
  msgstr "Teste deinen Tracking Code jetzt!"
26
 
27
- #: wk-ga.php:219
28
  msgid ""
29
  "Enter your Google Analytics tracking code below. You can also use Google Tag "
30
  "Manager instead by checking the relevant setting."
@@ -33,23 +54,23 @@ msgstr ""
33
  "Google Tag Manager verwendet werden, indem das entsprechende Setting gesetzt "
34
  "wird."
35
 
36
- #: wk-ga.php:227
37
  msgid "GA Tracking Code"
38
  msgstr "GA Tracking Code"
39
 
40
- #: wk-ga.php:231
41
  msgid "Anonymize IP's"
42
  msgstr "IP Anonymisierung"
43
 
44
- #: wk-ga.php:235
45
  msgid "Track logged in users"
46
  msgstr "Eingeloggte Benutzer tracken"
47
 
48
- #: wk-ga.php:239
49
  msgid "Use Google Tag Manager instead"
50
  msgstr "Google Tag Manager verwenden"
51
 
52
- #: wk-ga.php:243
53
  msgid "Google Tag Manager ID"
54
  msgstr "Google Tag Manager ID"
55
 
@@ -65,15 +86,6 @@ msgstr "Google Tag Manager ID"
65
  #~ msgid "Stay updated on our plugins"
66
  #~ msgstr "Erfahre das Neuste über unsere Plugins"
67
 
68
- #~ msgid "Email Address"
69
- #~ msgstr "Email Adresse"
70
-
71
- #~ msgid "First Name"
72
- #~ msgstr "Vorname"
73
-
74
- #~ msgid "Last Name"
75
- #~ msgstr "Nachname"
76
-
77
  #~ msgid ""
78
  #~ "Enter your Google Analytics tracking code below. There are two additional "
79
  #~ "mechanisms that allow you to stop tracking your own visits. The first one "
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics by WebKinder\n"
4
+ "POT-Creation-Date: 2016-12-10 09:41+0100\n"
5
+ "PO-Revision-Date: 2016-12-10 09:42+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: de\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e\n"
17
  "X-Poedit-SearchPath-0: wk-ga.php\n"
18
+ "X-Poedit-SearchPath-1: includes\n"
19
 
20
+ #: includes/mailchimp-form.php:11
21
+ msgid "Stay updated on this plugin"
22
+ msgstr "Erfahre das Wichtigste über jedes Update"
23
+
24
+ #: includes/mailchimp-form.php:13
25
+ msgid "Email Address"
26
+ msgstr "Email Adresse"
27
+
28
+ #: includes/mailchimp-form.php:17
29
+ msgid "First Name"
30
+ msgstr "Vorname"
31
+
32
+ #: includes/mailchimp-form.php:21
33
+ msgid "Last Name"
34
+ msgstr "Nachname"
35
+
36
+ #: includes/mailchimp-form.php:30
37
+ msgid "Subscribe"
38
+ msgstr "Abonnieren"
39
+
40
+ #: wk-ga.php:202
41
  msgid "Do not track any visits from this device."
42
  msgstr "Keine Besuche von diesem Gerät tracken."
43
 
44
+ #: wk-ga.php:231
45
  msgid "Test your tracking code now!"
46
  msgstr "Teste deinen Tracking Code jetzt!"
47
 
48
+ #: wk-ga.php:235
49
  msgid ""
50
  "Enter your Google Analytics tracking code below. You can also use Google Tag "
51
  "Manager instead by checking the relevant setting."
54
  "Google Tag Manager verwendet werden, indem das entsprechende Setting gesetzt "
55
  "wird."
56
 
57
+ #: wk-ga.php:243
58
  msgid "GA Tracking Code"
59
  msgstr "GA Tracking Code"
60
 
61
+ #: wk-ga.php:247
62
  msgid "Anonymize IP's"
63
  msgstr "IP Anonymisierung"
64
 
65
+ #: wk-ga.php:251
66
  msgid "Track logged in users"
67
  msgstr "Eingeloggte Benutzer tracken"
68
 
69
+ #: wk-ga.php:255
70
  msgid "Use Google Tag Manager instead"
71
  msgstr "Google Tag Manager verwenden"
72
 
73
+ #: wk-ga.php:259
74
  msgid "Google Tag Manager ID"
75
  msgstr "Google Tag Manager ID"
76
 
86
  #~ msgid "Stay updated on our plugins"
87
  #~ msgstr "Erfahre das Neuste über unsere Plugins"
88
 
 
 
 
 
 
 
 
 
 
89
  #~ msgid ""
90
  #~ "Enter your Google Analytics tracking code below. There are two additional "
91
  #~ "mechanisms that allow you to stop tracking your own visits. The first one "
lang/wk-ga-de_DE.mo CHANGED
Binary file
lang/wk-ga-de_DE.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics by WebKinder\n"
4
- "POT-Creation-Date: 2016-11-05 13:02+0100\n"
5
- "PO-Revision-Date: 2016-11-05 13:02+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: de\n"
@@ -15,16 +15,37 @@ msgstr ""
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e\n"
17
  "X-Poedit-SearchPath-0: wk-ga.php\n"
 
18
 
19
- #: wk-ga.php:186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  msgid "Do not track any visits from this device."
21
  msgstr "Keine Besuche von diesem Gerät tracken."
22
 
23
- #: wk-ga.php:215
24
  msgid "Test your tracking code now!"
25
  msgstr "Teste deinen Tracking Code jetzt!"
26
 
27
- #: wk-ga.php:219
28
  msgid ""
29
  "Enter your Google Analytics tracking code below. You can also use Google Tag "
30
  "Manager instead by checking the relevant setting."
@@ -33,23 +54,23 @@ msgstr ""
33
  "Google Tag Manager verwendet werden, indem das entsprechende Setting gesetzt "
34
  "wird."
35
 
36
- #: wk-ga.php:227
37
  msgid "GA Tracking Code"
38
  msgstr "GA Tracking Code"
39
 
40
- #: wk-ga.php:231
41
  msgid "Anonymize IP's"
42
  msgstr "IP Anonymisierung"
43
 
44
- #: wk-ga.php:235
45
  msgid "Track logged in users"
46
  msgstr "Eingeloggte Benutzer tracken"
47
 
48
- #: wk-ga.php:239
49
  msgid "Use Google Tag Manager instead"
50
  msgstr "Google Tag Manager verwenden"
51
 
52
- #: wk-ga.php:243
53
  msgid "Google Tag Manager ID"
54
  msgstr "Google Tag Manager ID"
55
 
@@ -65,15 +86,6 @@ msgstr "Google Tag Manager ID"
65
  #~ msgid "Stay updated on our plugins"
66
  #~ msgstr "Erfahre das Neuste über unsere Plugins"
67
 
68
- #~ msgid "Email Address"
69
- #~ msgstr "Email Adresse"
70
-
71
- #~ msgid "First Name"
72
- #~ msgstr "Vorname"
73
-
74
- #~ msgid "Last Name"
75
- #~ msgstr "Nachname"
76
-
77
  #~ msgid ""
78
  #~ "Enter your Google Analytics tracking code below. There are two additional "
79
  #~ "mechanisms that allow you to stop tracking your own visits. The first one "
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics by WebKinder\n"
4
+ "POT-Creation-Date: 2016-12-10 09:41+0100\n"
5
+ "PO-Revision-Date: 2016-12-10 09:42+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: de\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e\n"
17
  "X-Poedit-SearchPath-0: wk-ga.php\n"
18
+ "X-Poedit-SearchPath-1: includes\n"
19
 
20
+ #: includes/mailchimp-form.php:11
21
+ msgid "Stay updated on this plugin"
22
+ msgstr "Erfahre das Wichtigste über jedes Update"
23
+
24
+ #: includes/mailchimp-form.php:13
25
+ msgid "Email Address"
26
+ msgstr "Email Adresse"
27
+
28
+ #: includes/mailchimp-form.php:17
29
+ msgid "First Name"
30
+ msgstr "Vorname"
31
+
32
+ #: includes/mailchimp-form.php:21
33
+ msgid "Last Name"
34
+ msgstr "Nachname"
35
+
36
+ #: includes/mailchimp-form.php:30
37
+ msgid "Subscribe"
38
+ msgstr "Abonnieren"
39
+
40
+ #: wk-ga.php:202
41
  msgid "Do not track any visits from this device."
42
  msgstr "Keine Besuche von diesem Gerät tracken."
43
 
44
+ #: wk-ga.php:231
45
  msgid "Test your tracking code now!"
46
  msgstr "Teste deinen Tracking Code jetzt!"
47
 
48
+ #: wk-ga.php:235
49
  msgid ""
50
  "Enter your Google Analytics tracking code below. You can also use Google Tag "
51
  "Manager instead by checking the relevant setting."
54
  "Google Tag Manager verwendet werden, indem das entsprechende Setting gesetzt "
55
  "wird."
56
 
57
+ #: wk-ga.php:243
58
  msgid "GA Tracking Code"
59
  msgstr "GA Tracking Code"
60
 
61
+ #: wk-ga.php:247
62
  msgid "Anonymize IP's"
63
  msgstr "IP Anonymisierung"
64
 
65
+ #: wk-ga.php:251
66
  msgid "Track logged in users"
67
  msgstr "Eingeloggte Benutzer tracken"
68
 
69
+ #: wk-ga.php:255
70
  msgid "Use Google Tag Manager instead"
71
  msgstr "Google Tag Manager verwenden"
72
 
73
+ #: wk-ga.php:259
74
  msgid "Google Tag Manager ID"
75
  msgstr "Google Tag Manager ID"
76
 
86
  #~ msgid "Stay updated on our plugins"
87
  #~ msgstr "Erfahre das Neuste über unsere Plugins"
88
 
 
 
 
 
 
 
 
 
 
89
  #~ msgid ""
90
  #~ "Enter your Google Analytics tracking code below. There are two additional "
91
  #~ "mechanisms that allow you to stop tracking your own visits. The first one "
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: webkinder
3
  Tags: google analytics, tracking code, analytics, anonymization, anonymize, anonymizeIp, cookie, Datenschutz, ga, gaoptout, google, googleanalytics, google tag manager, gtm, Datenschutz, datenschutzkonform, script, snippet
4
  Requires at least: 3.0
5
- Tested up to: 4.6
6
- Stable tag: 1.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -45,5 +45,8 @@ If you have any questions or feature requests, feel free to contact us via suppo
45
  = 1.2 =
46
  * added support for Google Tag Manager
47
 
48
- = 1.5 =
49
  * Visual improvement of the settings page
 
 
 
2
  Contributors: webkinder
3
  Tags: google analytics, tracking code, analytics, anonymization, anonymize, anonymizeIp, cookie, Datenschutz, ga, gaoptout, google, googleanalytics, google tag manager, gtm, Datenschutz, datenschutzkonform, script, snippet
4
  Requires at least: 3.0
5
+ Tested up to: 4.7
6
+ Stable tag: 1.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
45
  = 1.2 =
46
  * added support for Google Tag Manager
47
 
48
+ = 1.5 =
49
  * Visual improvement of the settings page
50
+
51
+ = 1.6 =
52
+ * Improved tag manager script placement, preventing search console errors
wk-ga.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Google Analytics by WebKinder
4
  Plugin URI: https://wordpress.org/plugins/wk-google-analytics/
5
  Description: Google Analytics for WordPress without tracking your own visits
6
- Version: 1.5
7
  Author: WebKinder
8
  Author URI: http://www.webkinder.ch
9
  License: GPL2
@@ -32,11 +32,14 @@ class wk_ga {
32
  //Cookie function
33
  add_action( 'wp_head', array( $this, 'render_script') );
34
 
35
- //Google Analytics code in <head>
36
  add_action( 'wp_head', array( $this, 'google_analytics_script') );
37
 
38
- //Google Tag Manager in footer
39
- add_action( 'wp_footer', array( $this, 'google_tag_manager_script'));
 
 
 
40
  }
41
 
42
  /*
@@ -66,8 +69,6 @@ class wk_ga {
66
  if( $this->should_track_visit() && get_option('ga_use_tag_manager') ) {
67
  $TAG_MANAGER_ID = get_option('ga_tag_manager_id');
68
  ?>
69
- <noscript><iframe src="//www.googletagmanager.com/ns.html?id=<?php echo $TAG_MANAGER_ID; ?>"
70
- height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
71
  <script>
72
  if( !hasWKGoogleAnalyticsCookie() ) {
73
  //Google Tag Manager
@@ -81,6 +82,21 @@ class wk_ga {
81
  <?php
82
  }
83
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  /*
85
  * Google Analytics Script Tag
86
  */
3
  Plugin Name: Google Analytics by WebKinder
4
  Plugin URI: https://wordpress.org/plugins/wk-google-analytics/
5
  Description: Google Analytics for WordPress without tracking your own visits
6
+ Version: 1.6
7
  Author: WebKinder
8
  Author URI: http://www.webkinder.ch
9
  License: GPL2
32
  //Cookie function
33
  add_action( 'wp_head', array( $this, 'render_script') );
34
 
35
+ //Google Analytics script in <head>
36
  add_action( 'wp_head', array( $this, 'google_analytics_script') );
37
 
38
+ //Google Tag Manager script in header
39
+ add_action( 'wp_head', array( $this, 'google_tag_manager_script'));
40
+
41
+ //Google Tag Manager noscript footer
42
+ add_action( 'wp_footer', array( $this, 'google_tag_manager_noscript'));
43
  }
44
 
45
  /*
69
  if( $this->should_track_visit() && get_option('ga_use_tag_manager') ) {
70
  $TAG_MANAGER_ID = get_option('ga_tag_manager_id');
71
  ?>
 
 
72
  <script>
73
  if( !hasWKGoogleAnalyticsCookie() ) {
74
  //Google Tag Manager
82
  <?php
83
  }
84
  }
85
+
86
+ /*
87
+ * Tag Manager Script Tag
88
+ */
89
+ function google_tag_manager_noscript() {
90
+ if( $this->should_track_visit() && get_option('ga_use_tag_manager') ) {
91
+ $TAG_MANAGER_ID = get_option('ga_tag_manager_id');
92
+ ?>
93
+ <noscript><iframe src="//www.googletagmanager.com/ns.html?id=<?php echo $TAG_MANAGER_ID; ?>"
94
+ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
95
+
96
+ <?php
97
+ }
98
+ }
99
+
100
  /*
101
  * Google Analytics Script Tag
102
  */