WP Google Analytics Events - Version 1.8

Version Description

Download this release

Release Info

Developer yuvalo
Plugin Icon 128x128 WP Google Analytics Events
Version 1.8
Comparing to
See all releases

Code changes from version 1.7 to 1.8

Files changed (3) hide show
  1. ga-scroll-event.php +4 -4
  2. includes/admin.php +37 -30
  3. readme.txt +4 -4
ga-scroll-event.php CHANGED
@@ -3,13 +3,13 @@
3
  Plugin Name: WP Google Analytics Events
4
  Plugin URI: http://wpflow.com
5
  Description: Adds the Google Analytics code to your website and enables you to send events on scroll or click.
6
- Version: 1.7
7
  Author: Yuval Oren
8
  Author URI: http://wpflow.com
9
  License: GPLv2
10
  */
11
 
12
- /* Copyright 2013 Yuval Oren (email : yuval@steam.io)
13
  This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
14
  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15
  You should have received a copy of the GNU General Public License
@@ -112,7 +112,7 @@ function ga_events_header() {
112
  }
113
  }
114
 
115
- add_action( 'wp_footer', 'ga_events_footer', 100 );
116
 
117
  function ga_events_footer() {
118
  $options = get_option('ga_events_options');
@@ -123,7 +123,7 @@ function ga_events_footer() {
123
  $universal = 0;
124
  }
125
  echo "
126
- <script>
127
 
128
  jQuery(document).ready(function() {
129
  scroll_events.bind_events( {
3
  Plugin Name: WP Google Analytics Events
4
  Plugin URI: http://wpflow.com
5
  Description: Adds the Google Analytics code to your website and enables you to send events on scroll or click.
6
+ Version: 1.8
7
  Author: Yuval Oren
8
  Author URI: http://wpflow.com
9
  License: GPLv2
10
  */
11
 
12
+ /* Copyright 2013 Yuval Oren (email : yuval@pinewise.com)
13
  This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
14
  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15
  You should have received a copy of the GNU General Public License
112
  }
113
  }
114
 
115
+ add_action( 'wp_footer', 'ga_events_footer', 100 );
116
 
117
  function ga_events_footer() {
118
  $options = get_option('ga_events_options');
123
  $universal = 0;
124
  }
125
  echo "
126
+ <script>
127
 
128
  jQuery(document).ready(function() {
129
  scroll_events.bind_events( {
includes/admin.php CHANGED
@@ -12,6 +12,7 @@ function ga_events_menu() {
12
  add_submenu_page('wp-google-analytics-events','General Settings','General Settings', 'manage_options', 'wp-google-analytics-events' , 'ga_events_settings_page' );
13
  add_submenu_page('wp-google-analytics-events','Click Tracking','Click Tracking', 'manage_options', 'wp-google-analytics-events-click' , 'ga_events_settings_page' );
14
  add_submenu_page('wp-google-analytics-events','Scroll Tracking','Scroll Tracking', 'manage_options', 'wp-google-analytics-events-scroll' , 'ga_events_settings_page' );
 
15
  add_submenu_page('wp-google-analytics-events','Upgrade','Upgrade Now', 'manage_options', 'wp-google-analytics-events-upgrade', 'ga_events_settings_page' );
16
  }
17
 
@@ -30,7 +31,13 @@ function ga_events_settings_page() {
30
  <a href="?page=wp-google-analytics-events" class="nav-tab <?php echo $active_page == 'wp-google-analytics-events' ? 'nav-tab-active' : ''; ?>">General Settings</a>
31
  <a href="?page=wp-google-analytics-events-click" class="nav-tab <?php echo $active_page == 'wp-google-analytics-events-click' ? 'nav-tab-active' : ''; ?>">Click Tracking</a>
32
  <a href="?page=wp-google-analytics-events-scroll" class="nav-tab <?php echo $active_page == 'wp-google-analytics-events-scroll' ? 'nav-tab-active' : ''; ?>">Scroll Tracking</a>
 
33
  </h2>
 
 
 
 
 
34
 
35
  <form method="post" action='options.php'>
36
  <?php settings_fields('ga_events_options'); ?>
@@ -41,12 +48,13 @@ function ga_events_settings_page() {
41
  $show_sidebar = false;
42
  } else if ($active_page == 'wp-google-analytics-events-scroll') {
43
  do_settings_sections('ga_events_scroll');
44
- $show_sidebar = false;
45
- } else {
46
  do_settings_sections('ga_events');
47
  }
48
  ?>
49
- <input class="button-primary" type="submit" name="submit" value="Save Changes" />
 
 
50
  </form>
51
  <div class="settings_content">
52
  <form action="" method="post" enctype="multipart/form-data">
@@ -85,7 +93,7 @@ function ga_events_settings_page() {
85
  <span class="btn-title ">
86
  Starting from
87
  <span class="btn-data">
88
- <span class="price">$29</span>
89
  </span>
90
  </span>
91
  </a>
@@ -94,29 +102,9 @@ function ga_events_settings_page() {
94
  </tr>
95
  </tbody>
96
  </table>
97
- <!-- Begin MailChimp Signup Form -->
98
- <link href="//cdn-images.mailchimp.com/embedcode/slim-081711.css" rel="stylesheet" type="text/css">
99
- <style type="text/css">
100
- #mc_embed_signup{background:#fff; clear:left; font:13px Helvetica,Arial,sans-serif; width:250px; margin-top:30px; }
101
- /* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
102
- We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
103
- </style>
104
- <div id="mc_embed_signup">
105
- <form action="http://wpflow.us6.list-manage.com/subscribe/post?u=3a1990ecd0eee6198c11e5fc1&amp;id=7e01c30e7f" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
106
- <div class="form-content">
107
- <h4>Receive plugin updates, news, promo codes and more</h4>
108
- <label for="mce-EMAIL">Subscribe to our mailing list</label>
109
- <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>
110
- <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
111
- <div style="position: absolute; left: -5000px;"><input type="text" name="b_3a1990ecd0eee6198c11e5fc1_7e01c30e7f" value=""></div>
112
- </div>
113
- <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn-subscribe "></div>
114
- </form>
115
- </div>
116
 
117
- <!--End mc_embed_signup-->
118
  </div>
119
- <?php } ?>
120
 
121
 
122
  <?php
@@ -162,10 +150,12 @@ function ga_events_admin_init() {
162
  add_settings_section('ga_events_main','WP Google Analytics Events Settings', 'ga_events_section_text','ga_events');
163
  add_settings_section('ga_events_click_section','Click Tracking', 'ga_events_section_text','ga_events_click');
164
  add_settings_section('ga_events_scroll_section','Scroll Tracking', 'ga_events_section_text','ga_events_scroll');
 
165
  add_settings_field('ga_events_id', '','ga_events_setting_input','ga_events','ga_events_main');
166
  add_settings_field('ga_events_exclude_snippet', '','ga_events_setting_snippet_input','ga_events','ga_events_main');
167
  add_settings_field('ga_events_universal', '','ga_events_setting_uni_input','ga_events','ga_events_main');
168
  add_settings_field('ga_events_divs', '','ga_events_setting_divs_input','ga_events_scroll','ga_events_scroll_section');
 
169
  add_settings_field('ga_events_click', '','ga_events_setting_click_input','ga_events_click','ga_events_click_section');
170
  add_settings_field('ga_events_sidebar', '','ga_events_setting_sidebar','ga_events','ga_events_main');
171
  add_settings_field('ga_events_download_settings', '','ga_events_settings_download','ga_events','ga_events_main');
@@ -178,6 +168,27 @@ function ga_events_section_text() {
178
  echo "<a href='http://wpflow.com/documentation'>Plugin Documentation</a>";
179
  }
180
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  function ga_events_setting_input() {
182
  $options = get_option('ga_events_options');
183
  $id = $options['id'];
@@ -244,7 +255,7 @@ function ga_events_setting_divs_input() {
244
  }
245
 
246
  }
247
- echo "</tbody></table>";
248
  }
249
 
250
 
@@ -375,8 +386,4 @@ function ga_events_file(){
375
  exit();
376
  }
377
 
378
-
379
-
380
  ?>
381
-
382
-
12
  add_submenu_page('wp-google-analytics-events','General Settings','General Settings', 'manage_options', 'wp-google-analytics-events' , 'ga_events_settings_page' );
13
  add_submenu_page('wp-google-analytics-events','Click Tracking','Click Tracking', 'manage_options', 'wp-google-analytics-events-click' , 'ga_events_settings_page' );
14
  add_submenu_page('wp-google-analytics-events','Scroll Tracking','Scroll Tracking', 'manage_options', 'wp-google-analytics-events-scroll' , 'ga_events_settings_page' );
15
+ add_submenu_page('wp-google-analytics-events','Getting Started Guide','Getting Started Guide', 'manage_options', 'wp-google-analytics-events-started' , 'ga_events_settings_page' );
16
  add_submenu_page('wp-google-analytics-events','Upgrade','Upgrade Now', 'manage_options', 'wp-google-analytics-events-upgrade', 'ga_events_settings_page' );
17
  }
18
 
31
  <a href="?page=wp-google-analytics-events" class="nav-tab <?php echo $active_page == 'wp-google-analytics-events' ? 'nav-tab-active' : ''; ?>">General Settings</a>
32
  <a href="?page=wp-google-analytics-events-click" class="nav-tab <?php echo $active_page == 'wp-google-analytics-events-click' ? 'nav-tab-active' : ''; ?>">Click Tracking</a>
33
  <a href="?page=wp-google-analytics-events-scroll" class="nav-tab <?php echo $active_page == 'wp-google-analytics-events-scroll' ? 'nav-tab-active' : ''; ?>">Scroll Tracking</a>
34
+ <a href="?page=wp-google-analytics-events-started" class="nav-tab <?php echo $active_page == 'wp-google-analytics-events-started' ? 'nav-tab-active' : ''; ?>">Getting Started Guide</a>
35
  </h2>
36
+ <?php
37
+ if ($active_page == 'wp-google-analytics-events-started') {
38
+ ga_events_setting_started();
39
+ } else {
40
+ ?>
41
 
42
  <form method="post" action='options.php'>
43
  <?php settings_fields('ga_events_options'); ?>
48
  $show_sidebar = false;
49
  } else if ($active_page == 'wp-google-analytics-events-scroll') {
50
  do_settings_sections('ga_events_scroll');
51
+ }else {
 
52
  do_settings_sections('ga_events');
53
  }
54
  ?>
55
+
56
+ <input class="button-primary" type="submit" name="submit" value="Save Changes" />
57
+
58
  </form>
59
  <div class="settings_content">
60
  <form action="" method="post" enctype="multipart/form-data">
93
  <span class="btn-title ">
94
  Starting from
95
  <span class="btn-data">
96
+ <span class="price">$49</span>
97
  </span>
98
  </span>
99
  </a>
102
  </tr>
103
  </tbody>
104
  </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
 
 
106
  </div>
107
+ <?php }} ?>
108
 
109
 
110
  <?php
150
  add_settings_section('ga_events_main','WP Google Analytics Events Settings', 'ga_events_section_text','ga_events');
151
  add_settings_section('ga_events_click_section','Click Tracking', 'ga_events_section_text','ga_events_click');
152
  add_settings_section('ga_events_scroll_section','Scroll Tracking', 'ga_events_section_text','ga_events_scroll');
153
+ add_settings_section('ga_events_started_section','Getting Started Guide', 'ga_events_section_text','ga_events_started');
154
  add_settings_field('ga_events_id', '','ga_events_setting_input','ga_events','ga_events_main');
155
  add_settings_field('ga_events_exclude_snippet', '','ga_events_setting_snippet_input','ga_events','ga_events_main');
156
  add_settings_field('ga_events_universal', '','ga_events_setting_uni_input','ga_events','ga_events_main');
157
  add_settings_field('ga_events_divs', '','ga_events_setting_divs_input','ga_events_scroll','ga_events_scroll_section');
158
+ add_settings_field('ga_events_started', '','ga_events_setting_started','ga_events_started','ga_events_started_section');
159
  add_settings_field('ga_events_click', '','ga_events_setting_click_input','ga_events_click','ga_events_click_section');
160
  add_settings_field('ga_events_sidebar', '','ga_events_setting_sidebar','ga_events','ga_events_main');
161
  add_settings_field('ga_events_download_settings', '','ga_events_settings_download','ga_events','ga_events_main');
168
  echo "<a href='http://wpflow.com/documentation'>Plugin Documentation</a>";
169
  }
170
 
171
+ function ga_events_setting_started() {
172
+ echo '
173
+ <h2>Getting Started Guide</h2>
174
+ <form action="https://www.getdrip.com/forms/4588171/submissions" method="post" data-drip-embedded-form="4588171">
175
+ <div style="background:white; line-height:20px; padding: 5px 15px 15px 15px;
176
+ font-size: 15px; max-width:400px;">
177
+
178
+ <h3 style="margin-top: 10px;" data-drip-attribute="headline">Want to learn more about event tracking?</h3>
179
+ <div data-drip-attribute="description">Now that you installed the plugin, we want to help you get everything up and running.&nbsp;<br />
180
+ Join our short email course and get started with event tracking.</div>
181
+ <div>
182
+ <label style="margin-top:10px;"for="fields[email]">Email Address:</label><br />
183
+ <input type="email" name="fields[email]" value="" />
184
+ </div>
185
+ <div>
186
+ <input style="margin-top:15px;" class="button-primary" type="submit" name="submit" value="Get Started" data-drip-attribute="sign-up-button" />
187
+ </div>
188
+ </div>
189
+ </form>';
190
+ }
191
+
192
  function ga_events_setting_input() {
193
  $options = get_option('ga_events_options');
194
  $id = $options['id'];
255
  }
256
 
257
  }
258
+ echo "</tbody></table>";
259
  }
260
 
261
 
386
  exit();
387
  }
388
 
 
 
389
  ?>
 
 
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
  === WP Google Analytics Events ===
2
  Contributors: yuvalo
3
  Tags: analytics, google, events, ga
4
- Tested up to: 4.3
5
- Stable tag: 1.7
6
  License: GPLv2
7
  Requires at least: 3.0
8
 
@@ -37,7 +37,7 @@ http://www.youtube.com/watch?v=UP8mfuV9huI
37
  2. Plugin Click Settings screenshot-4.png
38
  3. Plugin Scroll Settings screenshot-5.png
39
  2. Google Analytics real time events screenshot-2.png
40
- == Changelog ==
41
  = Version 1.7 =
42
  1. Import / Export ferature added
43
  = Version 1.6 =
@@ -46,7 +46,7 @@ http://www.youtube.com/watch?v=UP8mfuV9huI
46
  1. UI Changes
47
  2. Diactivating and reactivating the plugin will not delete previous settings
48
  = Version 1.4 =
49
- You can now use the plugin along with Yoast Analytics.
50
  Just check the "Don't add the GA tracking code" option and if you are using the universal tracking code, check that option as well.
51
  = Version 1.2 =
52
  1. Fixes an issue that would cause tracking a page twice.
1
  === WP Google Analytics Events ===
2
  Contributors: yuvalo
3
  Tags: analytics, google, events, ga
4
+ Tested up to: 4.4
5
+ Stable tag: 1.8
6
  License: GPLv2
7
  Requires at least: 3.0
8
 
37
  2. Plugin Click Settings screenshot-4.png
38
  3. Plugin Scroll Settings screenshot-5.png
39
  2. Google Analytics real time events screenshot-2.png
40
+ == Changelog ==
41
  = Version 1.7 =
42
  1. Import / Export ferature added
43
  = Version 1.6 =
46
  1. UI Changes
47
  2. Diactivating and reactivating the plugin will not delete previous settings
48
  = Version 1.4 =
49
+ You can now use the plugin along with Yoast Analytics.
50
  Just check the "Don't add the GA tracking code" option and if you are using the universal tracking code, check that option as well.
51
  = Version 1.2 =
52
  1. Fixes an issue that would cause tracking a page twice.