Version Description
Download this release
Release Info
Developer | yuvalo |
Plugin | WP Google Analytics Events |
Version | 2.4 |
Comparing to | |
See all releases |
Code changes from version 2.3 to 2.4
- css/style.css +58 -0
- ga-scroll-event.php +18 -2
- images/WPGAE_Logo-177x78.png +0 -0
- images/ga-help.png +0 -0
- includes/admin.php +11 -6
- js/admin.js +9 -0
- js/ga-scroll-events.js +1 -1
- readme.txt +6 -3
css/style.css
CHANGED
@@ -238,3 +238,61 @@ a.btn_close_popup img {
|
|
238 |
margin-right: 2px;
|
239 |
color: #0085ba;
|
240 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
margin-right: 2px;
|
239 |
color: #0085ba;
|
240 |
}
|
241 |
+
|
242 |
+
.ga-tooltip{
|
243 |
+
width: 16px;
|
244 |
+
height: 16px;
|
245 |
+
background: url(../images/ga-help.png) no-repeat;
|
246 |
+
display: inline-block;
|
247 |
+
margin-left: 5px;
|
248 |
+
vertical-align:middle;
|
249 |
+
cursor: help;
|
250 |
+
margin-top: -10px;
|
251 |
+
}
|
252 |
+
|
253 |
+
.ui-tooltip, .arrow:after {
|
254 |
+
background: #356aa0;
|
255 |
+
border: 2px solid white;
|
256 |
+
}
|
257 |
+
.ui-tooltip {
|
258 |
+
padding: 10px 20px;
|
259 |
+
color: white;
|
260 |
+
border-radius: 20px;
|
261 |
+
box-shadow: 0 0 7px #356aa0;
|
262 |
+
max-width:350px;
|
263 |
+
}
|
264 |
+
.arrow {
|
265 |
+
width: 70px;
|
266 |
+
height: 16px;
|
267 |
+
overflow: hidden;
|
268 |
+
position: absolute;
|
269 |
+
left: 50%;
|
270 |
+
margin-left: -35px;
|
271 |
+
bottom: -16px;
|
272 |
+
}
|
273 |
+
.arrow.top {
|
274 |
+
top: -16px;
|
275 |
+
bottom: auto;
|
276 |
+
}
|
277 |
+
.arrow.left {
|
278 |
+
left: 20%;
|
279 |
+
}
|
280 |
+
.arrow:after {
|
281 |
+
content: "";
|
282 |
+
position: absolute;
|
283 |
+
z-index:9999;
|
284 |
+
left: 20px;
|
285 |
+
top: -20px;
|
286 |
+
width: 25px;
|
287 |
+
height: 25px;
|
288 |
+
box-shadow: 6px 5px 9px -9px #356aa0;
|
289 |
+
-webkit-transform: rotate(45deg);
|
290 |
+
-moz-transform: rotate(45deg);
|
291 |
+
-ms-transform: rotate(45deg);
|
292 |
+
-o-transform: rotate(45deg);
|
293 |
+
tranform: rotate(45deg);
|
294 |
+
}
|
295 |
+
.arrow.top:after {
|
296 |
+
bottom: -20px;
|
297 |
+
top: auto;
|
298 |
+
}
|
ga-scroll-event.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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: 2.
|
7 |
Author: Yuval Oren
|
8 |
Author URI: http://wpflow.com
|
9 |
License: GPLv2
|
@@ -81,7 +81,7 @@ add_action('init','ga_events_scripts');
|
|
81 |
|
82 |
function ga_events_scripts() {
|
83 |
wp_enqueue_script('jquery');
|
84 |
-
wp_enqueue_script('scrolldepth',plugins_url( '/js/ga-scroll-events.js', __FILE__) , array('jquery'), '2.
|
85 |
}
|
86 |
|
87 |
|
@@ -184,6 +184,22 @@ function ga_events_footer() {
|
|
184 |
|
185 |
}
|
186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
function ga_events_get_selector($element) {
|
188 |
$options = get_option('ga_events_options');
|
189 |
if ($element[0]){
|
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: 2.4
|
7 |
Author: Yuval Oren
|
8 |
Author URI: http://wpflow.com
|
9 |
License: GPLv2
|
81 |
|
82 |
function ga_events_scripts() {
|
83 |
wp_enqueue_script('jquery');
|
84 |
+
wp_enqueue_script('scrolldepth',plugins_url( '/js/ga-scroll-events.js', __FILE__) , array('jquery'), '2.4', false);
|
85 |
}
|
86 |
|
87 |
|
184 |
|
185 |
}
|
186 |
|
187 |
+
add_filter( 'plugin_action_links', 'ga_events_action_link', 10, 5 );
|
188 |
+
function ga_events_action_link( $actions, $plugin_file ) {
|
189 |
+
static $plugin;
|
190 |
+
if (!isset($plugin))
|
191 |
+
$plugin = plugin_basename(__FILE__);
|
192 |
+
if ($plugin == $plugin_file) {
|
193 |
+
$upgrade = array('upgrade' => '<a href="https://wpflow.com/upgrade/">' . __('Upgrade', 'General') . '</a>');
|
194 |
+
$settings = array('settings' => '<a href="?page=wp-google-analytics-events">' . __('Settings', 'General') . '</a>');
|
195 |
+
|
196 |
+
$actions = array_merge($upgrade, $actions);
|
197 |
+
$actions = array_merge($settings, $actions);
|
198 |
+
}
|
199 |
+
|
200 |
+
return $actions;
|
201 |
+
}
|
202 |
+
|
203 |
function ga_events_get_selector($element) {
|
204 |
$options = get_option('ga_events_options');
|
205 |
if ($element[0]){
|
images/WPGAE_Logo-177x78.png
ADDED
Binary file
|
images/ga-help.png
ADDED
Binary file
|
includes/admin.php
CHANGED
@@ -35,7 +35,7 @@ function ga_events_settings_page() {
|
|
35 |
</h2>
|
36 |
<?php
|
37 |
if ($active_page == 'wp-google-analytics-events-started') {
|
38 |
-
|
39 |
} else {
|
40 |
?>
|
41 |
|
@@ -78,7 +78,7 @@ function ga_events_settings_page() {
|
|
78 |
<li><i class="fa fa-check-square-o fa-lg"></i><strong>Link Tracking</strong></li>
|
79 |
<li title="Dynamic Event Data"><i class="fa fa-check-square-o fa-lg"></i><strong>Placeholders</strong></li>
|
80 |
<li><i class="fa fa-check-square-o fa-lg"></i><strong>YouTube Video Tracking</strong></li>
|
81 |
-
<li><i class="fa fa-check-square-o fa-lg"></i><strong>
|
82 |
<li><i class="fa fa-check-square-o fa-lg"></i><strong>Set Value for Events</strong></li>
|
83 |
<li><i class="fa fa-check-square-o fa-lg"></i><strong>HTML Tag support</strong></li>
|
84 |
<li><i class="fa fa-check-square-o fa-lg"></i><strong>Pro Support</strong></li>
|
@@ -120,7 +120,7 @@ function ga_events_settings_page() {
|
|
120 |
function load_custom_wp_admin_style() {
|
121 |
wp_register_style( 'custom_wp_admin_css', plugins_url('css/style.css', dirname(__FILE__)));
|
122 |
wp_enqueue_style( 'custom_wp_admin_css' );
|
123 |
-
wp_enqueue_script( 'admin-init', plugins_url('js/admin.js', dirname(__FILE__)) , array('jquery'), null, true );
|
124 |
|
125 |
}
|
126 |
|
@@ -197,7 +197,7 @@ function ga_events_setting_input() {
|
|
197 |
function ga_events_setting_snippet_input() {
|
198 |
$options = get_option('ga_events_options');
|
199 |
$id = $options['exclude_snippet'];
|
200 |
-
echo "<label>Don't add the GA tracking code</label>";
|
201 |
echo "<span class='ga_intable'><input id='snippet' name='ga_events_options[exclude_snippet]' type='checkbox' value='1' " . checked( $id , 1,false) . " /></span>";
|
202 |
|
203 |
}
|
@@ -212,14 +212,14 @@ function ga_events_setting_uni_input() {
|
|
212 |
function ga_events_setting_anon_input() {
|
213 |
$options = get_option('ga_events_options');
|
214 |
$id = $options['anonymizeip'];
|
215 |
-
echo "<label>IP Anonymization
|
216 |
echo "<span class='ga_intable'><input id='anonymizeip' name='ga_events_options[anonymizeip]' type='checkbox' value='1' " . checked( $id , 1,false) . " /></span>";
|
217 |
}
|
218 |
|
219 |
function ga_events_setting_adv_input() {
|
220 |
$options = get_option('ga_events_options');
|
221 |
$id = $options['advanced'];
|
222 |
-
echo "<label>Advanced Mode</label>";
|
223 |
echo "<span class='ga_intable'><input id='advanced' name='ga_events_options[advanced]' type='checkbox' value='1' " . checked( $id , 1,false) . " /></span>";
|
224 |
}
|
225 |
|
@@ -476,4 +476,9 @@ function cleanEventFeilds($arr) {
|
|
476 |
return $arr;
|
477 |
}
|
478 |
|
|
|
|
|
|
|
|
|
|
|
479 |
?>
|
35 |
</h2>
|
36 |
<?php
|
37 |
if ($active_page == 'wp-google-analytics-events-started') {
|
38 |
+
do_settings_sections('ga_events_started');
|
39 |
} else {
|
40 |
?>
|
41 |
|
78 |
<li><i class="fa fa-check-square-o fa-lg"></i><strong>Link Tracking</strong></li>
|
79 |
<li title="Dynamic Event Data"><i class="fa fa-check-square-o fa-lg"></i><strong>Placeholders</strong></li>
|
80 |
<li><i class="fa fa-check-square-o fa-lg"></i><strong>YouTube Video Tracking</strong></li>
|
81 |
+
<li><i class="fa fa-check-square-o fa-lg"></i><strong>Vimeo Video support</strong></li>
|
82 |
<li><i class="fa fa-check-square-o fa-lg"></i><strong>Set Value for Events</strong></li>
|
83 |
<li><i class="fa fa-check-square-o fa-lg"></i><strong>HTML Tag support</strong></li>
|
84 |
<li><i class="fa fa-check-square-o fa-lg"></i><strong>Pro Support</strong></li>
|
120 |
function load_custom_wp_admin_style() {
|
121 |
wp_register_style( 'custom_wp_admin_css', plugins_url('css/style.css', dirname(__FILE__)));
|
122 |
wp_enqueue_style( 'custom_wp_admin_css' );
|
123 |
+
wp_enqueue_script( 'admin-init', plugins_url('js/admin.js', dirname(__FILE__)) , array('jquery','jquery-ui-tooltip'), null, true );
|
124 |
|
125 |
}
|
126 |
|
197 |
function ga_events_setting_snippet_input() {
|
198 |
$options = get_option('ga_events_options');
|
199 |
$id = $options['exclude_snippet'];
|
200 |
+
echo "<label>Don't add the GA tracking code ".ga_tooltip('Useful if you already have the code snippet loaded by a different plugin')."</label>";
|
201 |
echo "<span class='ga_intable'><input id='snippet' name='ga_events_options[exclude_snippet]' type='checkbox' value='1' " . checked( $id , 1,false) . " /></span>";
|
202 |
|
203 |
}
|
212 |
function ga_events_setting_anon_input() {
|
213 |
$options = get_option('ga_events_options');
|
214 |
$id = $options['anonymizeip'];
|
215 |
+
echo "<label>IP Anonymization".ga_tooltip('Tell Google Analytics not to log IP Addresses. Requires code snippet to be checked')."</label>";
|
216 |
echo "<span class='ga_intable'><input id='anonymizeip' name='ga_events_options[anonymizeip]' type='checkbox' value='1' " . checked( $id , 1,false) . " /></span>";
|
217 |
}
|
218 |
|
219 |
function ga_events_setting_adv_input() {
|
220 |
$options = get_option('ga_events_options');
|
221 |
$id = $options['advanced'];
|
222 |
+
echo "<label>Advanced Mode ".ga_tooltip('Enable Advanced Selectors')."</label>";
|
223 |
echo "<span class='ga_intable'><input id='advanced' name='ga_events_options[advanced]' type='checkbox' value='1' " . checked( $id , 1,false) . " /></span>";
|
224 |
}
|
225 |
|
476 |
return $arr;
|
477 |
}
|
478 |
|
479 |
+
function ga_tooltip($content = '') {
|
480 |
+
$html = '<span class="ga-tooltip" title="'.$content.'"></span>';
|
481 |
+
return $html;
|
482 |
+
}
|
483 |
+
|
484 |
?>
|
js/admin.js
CHANGED
@@ -1,3 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
jQuery('.btn_upload').on('click',function(e){
|
2 |
jQuery('.settings_content').slideDown();
|
3 |
e.preventDefault();
|
1 |
+
jQuery.widget.bridge( 'gaetooltip', jQuery.ui.tooltip );
|
2 |
+
|
3 |
+
jQuery( '.ga-tooltip' ).gaetooltip({ position: {
|
4 |
+
my: "left bottom-10",
|
5 |
+
at: "right top",
|
6 |
+
collision: "none"
|
7 |
+
}
|
8 |
+
});
|
9 |
+
|
10 |
jQuery('.btn_upload').on('click',function(e){
|
11 |
jQuery('.settings_content').slideDown();
|
12 |
e.preventDefault();
|
js/ga-scroll-events.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*!
|
2 |
-
* WP Googel Analytics Events | v2.
|
3 |
* Copyright (c) 2013 Yuval Oren (@yuvalo)
|
4 |
* License: GPLv2
|
5 |
*/
|
1 |
/*!
|
2 |
+
* WP Googel Analytics Events | v2.4
|
3 |
* Copyright (c) 2013 Yuval Oren (@yuvalo)
|
4 |
* License: GPLv2
|
5 |
*/
|
readme.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
=== WP Google Analytics Events ===
|
2 |
-
Contributors: yuvalo
|
3 |
Tags: analytics, google, events, ga, google analytics, tracking
|
4 |
-
Tested up to: 4.7
|
5 |
-
Stable tag: 2.
|
6 |
License: GPLv2
|
7 |
Requires at least: 3.0
|
8 |
|
@@ -80,6 +80,9 @@ http://www.youtube.com/watch?v=UP8mfuV9huI
|
|
80 |
3. Plugin Scroll Settings screenshot-5.png
|
81 |
2. Google Analytics real time events screenshot-2.png
|
82 |
== Changelog ==
|
|
|
|
|
|
|
83 |
= Version 2.3 =
|
84 |
1. Better dependency handling for WordPress 4.7
|
85 |
= Version 2.2 =
|
1 |
=== WP Google Analytics Events ===
|
2 |
+
Contributors: yuvalo, claconsay
|
3 |
Tags: analytics, google, events, ga, google analytics, tracking
|
4 |
+
Tested up to: 4.7.1
|
5 |
+
Stable tag: 2.4
|
6 |
License: GPLv2
|
7 |
Requires at least: 3.0
|
8 |
|
80 |
3. Plugin Scroll Settings screenshot-5.png
|
81 |
2. Google Analytics real time events screenshot-2.png
|
82 |
== Changelog ==
|
83 |
+
= Version 2.4 =
|
84 |
+
1. Added tooltips
|
85 |
+
2. Buttons for the plugins page
|
86 |
= Version 2.3 =
|
87 |
1. Better dependency handling for WordPress 4.7
|
88 |
= Version 2.2 =
|