Version Description
Download this release
Release Info
Developer | PixelYourSite |
Plugin | PixelYourSite – Facebook Pixel (Events, WooCommerce & Easy Digital Downloads) |
Version | 3.0.3 |
Comparing to | |
See all releases |
Code changes from version 3.0.2 to 3.0.3
- facebook-pixel-master.php +9 -15
- inc/common.php +44 -20
- inc/html-tab-woo-general.php +22 -22
- js/public.js +1 -1
- readme.txt +9 -1
facebook-pixel-master.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Plugin URI: http://www.pixelyoursite.com/facebook-pixel-plugin-help
|
6 |
Author: PixelYourSite
|
7 |
Author URI: http://www.pixelyoursite.com
|
8 |
-
Version: 3.0.
|
9 |
License: GPLv3
|
10 |
*/
|
11 |
|
@@ -16,7 +16,7 @@ if( defined( 'WP_DEBUG' ) && WP_DEBUG == true ) {
|
|
16 |
error_reporting( E_ALL );
|
17 |
}
|
18 |
|
19 |
-
define( 'PYS_FREE_VERSION', '3.0.
|
20 |
|
21 |
require_once( 'inc/common.php' );
|
22 |
require_once( 'inc/admin_notices.php' );
|
@@ -26,15 +26,13 @@ require_once( 'inc/ajax-standard.php' );
|
|
26 |
add_action( 'plugins_loaded', 'pys_free_init' );
|
27 |
function pys_free_init() {
|
28 |
|
29 |
-
if( !is_admin() ){
|
30 |
-
|
31 |
-
// display Facebook Pixel Code
|
32 |
-
|
33 |
-
add_action( 'wp_head', 'pys_pixel_code', 1 );
|
34 |
|
35 |
-
// add addtocart ajax support only if woocommerce installed
|
36 |
-
if( pys_is_woocommerce_active() ){
|
37 |
-
add_action( 'wp_enqueue_scripts', 'pys_public_scripts' );
|
38 |
add_filter( 'woocommerce_loop_add_to_cart_link', 'pys_add_code_to_woo_cart_link', 10, 2 );
|
39 |
}
|
40 |
|
@@ -105,11 +103,7 @@ if( !function_exists( 'pys_public_scripts' ) ) {
|
|
105 |
|
106 |
function pys_public_scripts() {
|
107 |
|
108 |
-
|
109 |
-
|
110 |
-
wp_enqueue_script( 'pys', plugins_url( 'js/public.js', __FILE__ ), array( 'jquery' ), PYS_FREE_VERSION );
|
111 |
-
|
112 |
-
}
|
113 |
|
114 |
}
|
115 |
|
5 |
Plugin URI: http://www.pixelyoursite.com/facebook-pixel-plugin-help
|
6 |
Author: PixelYourSite
|
7 |
Author URI: http://www.pixelyoursite.com
|
8 |
+
Version: 3.0.3
|
9 |
License: GPLv3
|
10 |
*/
|
11 |
|
16 |
error_reporting( E_ALL );
|
17 |
}
|
18 |
|
19 |
+
define( 'PYS_FREE_VERSION', '3.0.2');
|
20 |
|
21 |
require_once( 'inc/common.php' );
|
22 |
require_once( 'inc/admin_notices.php' );
|
26 |
add_action( 'plugins_loaded', 'pys_free_init' );
|
27 |
function pys_free_init() {
|
28 |
|
29 |
+
if( !is_admin() && pys_get_option( 'general', 'enabled' ) == true && ! pys_is_disabled_for_role() ){
|
30 |
+
|
31 |
+
add_action( 'wp_head', 'pys_pixel_code', 1 ); // display Facebook Pixel Code
|
32 |
+
add_action( 'wp_enqueue_scripts', 'pys_public_scripts' );
|
|
|
33 |
|
34 |
+
// add addtocart ajax support only if woocommerce installed and event is enabled
|
35 |
+
if( pys_is_woocommerce_active() && pys_get_option( 'woo', 'enabled' ) && pys_get_option( 'woo', 'on_add_to_cart_btn' ) ){
|
|
|
36 |
add_filter( 'woocommerce_loop_add_to_cart_link', 'pys_add_code_to_woo_cart_link', 10, 2 );
|
37 |
}
|
38 |
|
103 |
|
104 |
function pys_public_scripts() {
|
105 |
|
106 |
+
wp_enqueue_script( 'pys', plugins_url( 'js/public.js', __FILE__ ), array( 'jquery' ), PYS_FREE_VERSION );
|
|
|
|
|
|
|
|
|
107 |
|
108 |
}
|
109 |
|
inc/common.php
CHANGED
@@ -653,6 +653,11 @@ if( !function_exists( 'pys_get_noscript_code' ) ) {
|
|
653 |
|
654 |
function pys_get_noscript_code( $type, $params ) {
|
655 |
|
|
|
|
|
|
|
|
|
|
|
656 |
$args = array();
|
657 |
|
658 |
$args['id'] = pys_get_option( 'general', 'pixel_id' );
|
@@ -660,7 +665,7 @@ if( !function_exists( 'pys_get_noscript_code' ) ) {
|
|
660 |
$args['noscript'] = 1;
|
661 |
|
662 |
foreach ( $params as $param => $value ) {
|
663 |
-
@$args[ 'cd[' . $param . ']' ]
|
664 |
}
|
665 |
|
666 |
$src = add_query_arg( $args, 'https://www.facebook.com/tr' );
|
@@ -826,7 +831,16 @@ if( !function_exists( 'pys_get_product_id' ) ) {
|
|
826 |
*/
|
827 |
if( !function_exists( 'pys_insert_attribute' ) ) {
|
828 |
|
829 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
830 |
|
831 |
// do not modify js attributes
|
832 |
if( $attr_name == 'on' ) {
|
@@ -835,9 +849,9 @@ if( !function_exists( 'pys_insert_attribute' ) ) {
|
|
835 |
|
836 |
$attr_value = trim( $attr_value );
|
837 |
|
838 |
-
$
|
839 |
-
$
|
840 |
-
$node = $
|
841 |
|
842 |
if( is_null( $node ) ) {
|
843 |
return $tag;
|
@@ -849,7 +863,7 @@ if( !function_exists( 'pys_insert_attribute' ) ) {
|
|
849 |
if( empty( $attribute ) || $overwrite ) {
|
850 |
|
851 |
$node->setAttribute( $attr_name, $attr_value );
|
852 |
-
return $
|
853 |
|
854 |
}
|
855 |
|
@@ -858,7 +872,7 @@ if( !function_exists( 'pys_insert_attribute' ) ) {
|
|
858 |
|
859 |
$value = $attribute . ' ' . $attr_value;
|
860 |
$node->setAttribute( $attr_name, $value );
|
861 |
-
return $
|
862 |
|
863 |
}
|
864 |
|
@@ -908,6 +922,27 @@ if( !function_exists( 'pys_convert_quotes' ) ) {
|
|
908 |
|
909 |
}
|
910 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
911 |
/**
|
912 |
* Output pixel code.
|
913 |
*/
|
@@ -931,17 +966,6 @@ if( !function_exists( 'pys_pixel_code' ) ) {
|
|
931 |
return;
|
932 |
}
|
933 |
|
934 |
-
// if disabled for current role
|
935 |
-
$disabled_roles = get_option( 'pixel_your_site' );
|
936 |
-
$user = wp_get_current_user();
|
937 |
-
foreach ( (array) $user->roles as $role ) {
|
938 |
-
|
939 |
-
if ( array_key_exists( "disable_for_$role", $disabled_roles['general'] ) ) {
|
940 |
-
return;
|
941 |
-
}
|
942 |
-
|
943 |
-
}
|
944 |
-
|
945 |
// build pixel code...
|
946 |
$pixelcode = "\n";
|
947 |
$nojscode = "\n";
|
@@ -964,7 +988,7 @@ if( !function_exists( 'pys_pixel_code' ) ) {
|
|
964 |
}
|
965 |
|
966 |
// search event
|
967 |
-
if ( pys_get_option( 'general', 'search_event_enabled' ) && is_search() ) {
|
968 |
|
969 |
$pixelcode .= "// Search Event \n";
|
970 |
$pixelcode .= "fbq('track', 'Search', { search_string: '" . pys_clean_param_value( $_REQUEST['s'] ) . "'} );";
|
@@ -978,7 +1002,7 @@ if( !function_exists( 'pys_pixel_code' ) ) {
|
|
978 |
}
|
979 |
|
980 |
// add standard events
|
981 |
-
$std_events = get_option( 'pixel_your_site_std_events' );
|
982 |
if ( pys_get_option( 'std', 'enabled' ) && count( $std_events ) > 0 ) {
|
983 |
|
984 |
foreach ( $std_events as $event ) {
|
653 |
|
654 |
function pys_get_noscript_code( $type, $params ) {
|
655 |
|
656 |
+
// skip, because event is works only if js supported
|
657 |
+
if( $type == 'TimeOnPage' ) {
|
658 |
+
return null;
|
659 |
+
}
|
660 |
+
|
661 |
$args = array();
|
662 |
|
663 |
$args['id'] = pys_get_option( 'general', 'pixel_id' );
|
665 |
$args['noscript'] = 1;
|
666 |
|
667 |
foreach ( $params as $param => $value ) {
|
668 |
+
@$args[ 'cd[' . $param . ']' ] = urlencode( $value );
|
669 |
}
|
670 |
|
671 |
$src = add_query_arg( $args, 'https://www.facebook.com/tr' );
|
831 |
*/
|
832 |
if( !function_exists( 'pys_insert_attribute' ) ) {
|
833 |
|
834 |
+
/**
|
835 |
+
* @param $attr_name
|
836 |
+
* @param $attr_value
|
837 |
+
* @param $tag
|
838 |
+
* @param bool|false $overwrite
|
839 |
+
* @param string $tag_name by default function processing only A tags but it can be changed by setting $tag_name parameter. It is used in PayPal button event for example.
|
840 |
+
*
|
841 |
+
* @return string tag HTML with inserted attribute and its value
|
842 |
+
*/
|
843 |
+
function pys_insert_attribute( $attr_name, $attr_value, $tag, $overwrite = false, $tag_name = 'a' ) {
|
844 |
|
845 |
// do not modify js attributes
|
846 |
if( $attr_name == 'on' ) {
|
849 |
|
850 |
$attr_value = trim( $attr_value );
|
851 |
|
852 |
+
$doc = new DOMDocument();
|
853 |
+
$doc->loadHTML( '<?xml encoding="UTF-8">' . $tag, LIBXML_NOEMPTYTAG );
|
854 |
+
$node = $doc->getElementsByTagName( $tag_name )->item(0);
|
855 |
|
856 |
if( is_null( $node ) ) {
|
857 |
return $tag;
|
863 |
if( empty( $attribute ) || $overwrite ) {
|
864 |
|
865 |
$node->setAttribute( $attr_name, $attr_value );
|
866 |
+
return $doc->saveHTML( $node );
|
867 |
|
868 |
}
|
869 |
|
872 |
|
873 |
$value = $attribute . ' ' . $attr_value;
|
874 |
$node->setAttribute( $attr_name, $value );
|
875 |
+
return $doc->saveHTML( $node );
|
876 |
|
877 |
}
|
878 |
|
922 |
|
923 |
}
|
924 |
|
925 |
+
if( !function_exists( 'pys_is_disabled_for_role' ) ) {
|
926 |
+
|
927 |
+
function pys_is_disabled_for_role() {
|
928 |
+
|
929 |
+
// if disabled for current role
|
930 |
+
$disabled_roles = get_option( 'pixel_your_site' );
|
931 |
+
$user = wp_get_current_user();
|
932 |
+
foreach ( (array) $user->roles as $role ) {
|
933 |
+
|
934 |
+
if ( array_key_exists( "disable_for_$role", $disabled_roles['general'] ) ) {
|
935 |
+
return true;
|
936 |
+
}
|
937 |
+
|
938 |
+
}
|
939 |
+
|
940 |
+
return false;
|
941 |
+
|
942 |
+
}
|
943 |
+
|
944 |
+
}
|
945 |
+
|
946 |
/**
|
947 |
* Output pixel code.
|
948 |
*/
|
966 |
return;
|
967 |
}
|
968 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
969 |
// build pixel code...
|
970 |
$pixelcode = "\n";
|
971 |
$nojscode = "\n";
|
988 |
}
|
989 |
|
990 |
// search event
|
991 |
+
if ( pys_get_option( 'general', 'search_event_enabled' ) && is_search() && isset( $_REQUEST['s'] ) ) {
|
992 |
|
993 |
$pixelcode .= "// Search Event \n";
|
994 |
$pixelcode .= "fbq('track', 'Search', { search_string: '" . pys_clean_param_value( $_REQUEST['s'] ) . "'} );";
|
1002 |
}
|
1003 |
|
1004 |
// add standard events
|
1005 |
+
$std_events = get_option( 'pixel_your_site_std_events', array() );
|
1006 |
if ( pys_get_option( 'std', 'enabled' ) && count( $std_events ) > 0 ) {
|
1007 |
|
1008 |
foreach ( $std_events as $event ) {
|
inc/html-tab-woo-general.php
CHANGED
@@ -112,14 +112,14 @@
|
|
112 |
<tr class="disabled">
|
113 |
<td class="alignright"><p class="label">Product price</p></td>
|
114 |
<td>
|
115 |
-
<input type="radio" name="pricea" checked
|
116 |
</td>
|
117 |
</tr>
|
118 |
|
119 |
<tr class="disabled">
|
120 |
<td class="alignright"><p class="label">Percent of product price</p></td>
|
121 |
<td>
|
122 |
-
<input type="radio" name="pricea"
|
123 |
<input type="text">%
|
124 |
</td>
|
125 |
</tr>
|
@@ -127,7 +127,7 @@
|
|
127 |
<tr class="disabled">
|
128 |
<td class="alignright"><p class="label">Use Global value</p></td>
|
129 |
<td>
|
130 |
-
<input type="radio" name="pricea"
|
131 |
<input type="text">
|
132 |
</td>
|
133 |
</tr>
|
@@ -227,14 +227,14 @@
|
|
227 |
<tr class="disabled">
|
228 |
<td class="alignright"><p class="label">Products price (subtotal)</p></td>
|
229 |
<td>
|
230 |
-
<input type="radio" name="pricec" checked
|
231 |
</td>
|
232 |
</tr>
|
233 |
|
234 |
<tr class="disabled">
|
235 |
<td class="alignright"><p class="label">Percent of products value (subtotal)</p></td>
|
236 |
<td>
|
237 |
-
<input type="radio" name="pricec"
|
238 |
<input type="text">%
|
239 |
</td>
|
240 |
</tr>
|
@@ -242,7 +242,7 @@
|
|
242 |
<tr class="disabled">
|
243 |
<td class="alignright"><p class="label">Use Global value</p></td>
|
244 |
<td>
|
245 |
-
<input type="radio" name="pricec"
|
246 |
<input type="text">
|
247 |
</td>
|
248 |
</tr>
|
@@ -312,7 +312,7 @@
|
|
312 |
<tr class="tall">
|
313 |
<td class="alignright"><p class="label big">Advanced Matching on Purchase event:</p></td>
|
314 |
<td>
|
315 |
-
<input type="checkbox" name="" value="1" class="
|
316 |
Enable - <strong>This is a PRO feature</strong> - <a href="http://www.pixelyoursite.com/facebook-pixel-plugin">Update NOW</a>
|
317 |
<span class="help">Advance Matching can lead to 10% increase in attributed conversions and 20% increase in reach of retargeting campaigns - <a href="http://www.pixelyoursite.com/enable-advance-matching-woocommerce" target="_blank">Click to read more</a> </span>
|
318 |
</td>
|
@@ -328,7 +328,7 @@
|
|
328 |
<tr class="disabled">
|
329 |
<td class="alignright"></td>
|
330 |
<td>
|
331 |
-
<input type="checkbox" name="" value="1"
|
332 |
<strong>Add Town, State and Country parameters</strong>
|
333 |
<span class="help">Will pull <code>town</code>, <code>state</code> and <code>country</code></span>
|
334 |
|
@@ -338,7 +338,7 @@
|
|
338 |
<tr class="disabled">
|
339 |
<td></td>
|
340 |
<td>
|
341 |
-
<input type="checkbox" name="" value="1"
|
342 |
<strong>Add Payment Method parameter</strong>
|
343 |
<span class="help">Will pull <code>payment</code></span>
|
344 |
|
@@ -348,7 +348,7 @@
|
|
348 |
<tr class="disabled">
|
349 |
<td></td>
|
350 |
<td>
|
351 |
-
<input type="checkbox" name="" value="1"
|
352 |
<strong>Add Shipping Method parameter</strong>
|
353 |
<span class="help">Will pull <code>shipping</code></span>
|
354 |
</td>
|
@@ -357,7 +357,7 @@
|
|
357 |
<tr class="disabled">
|
358 |
<td></td>
|
359 |
<td>
|
360 |
-
<input type="checkbox" name="" value="1"
|
361 |
<strong>Add Coupons parameter</strong>
|
362 |
<span class="help">Will pull <code>coupon_used</code> and <code>coupon_name</code></span>
|
363 |
</td>
|
@@ -381,7 +381,7 @@
|
|
381 |
<tr class="disabled">
|
382 |
<td class="alignright"><p class="label">Event type:</p></td>
|
383 |
<td>
|
384 |
-
<input type="radio" name="eta" checked
|
385 |
<select autocomplete="off" disabled>
|
386 |
<option selected>Lead</option>
|
387 |
</select>
|
@@ -391,7 +391,7 @@
|
|
391 |
<tr class="disabled tall">
|
392 |
<td class="alignright"><p class="label">Name of custom event:</p></td>
|
393 |
<td>
|
394 |
-
<input type="radio" name="eta"
|
395 |
<input type="text">
|
396 |
<span class="help">* The Affiliate event will have all the parameters values specific for selected event.</span>
|
397 |
<span class="help">* The Custom Affiliate event will have value, currency, content_name, content_type, content_ids.</span>
|
@@ -401,21 +401,21 @@
|
|
401 |
<tr class="disabled">
|
402 |
<td class="alignright"><p class="label">Do not pull event value</p></td>
|
403 |
<td>
|
404 |
-
<input type="radio" name="pricex" checked
|
405 |
</td>
|
406 |
</tr>
|
407 |
|
408 |
<tr class="disabled">
|
409 |
<td class="alignright"><p class="label">Event Value = Prouct Price</p></td>
|
410 |
<td>
|
411 |
-
<input type="radio" name="pricex"
|
412 |
</td>
|
413 |
</tr>
|
414 |
|
415 |
<tr class="disabled">
|
416 |
<td class="alignright"><p class="label">Use Global value</p></td>
|
417 |
<td>
|
418 |
-
<input type="radio" name="pricex"
|
419 |
<input type="text">
|
420 |
<span class="help">* Set this if you want a unique global value every time affiliate product clicked.</span>
|
421 |
</td>
|
@@ -437,7 +437,7 @@
|
|
437 |
<tr class="disabled">
|
438 |
<td class="alignright"><p class="label">Event type:</p></td>
|
439 |
<td>
|
440 |
-
<input type="radio" name="etb" checked
|
441 |
<select autocomplete="off" disabled>
|
442 |
<option selected>InitiatePayment</option>
|
443 |
</select>
|
@@ -447,7 +447,7 @@
|
|
447 |
<tr class="disabled tall">
|
448 |
<td class="alignright"><p class="label">Name of custom event:</p></td>
|
449 |
<td>
|
450 |
-
<input type="radio" name="etb"
|
451 |
<input type="text">
|
452 |
<span class="help">* The PayPal Standard event will have all the parameters values specific for selected event.</span>
|
453 |
<span class="help">* The Custom Affiliate event will have value, currency, content_type, content_ids.</span>
|
@@ -457,21 +457,21 @@
|
|
457 |
<tr class="disabled">
|
458 |
<td class="alignright"><p class="label">Do not pull event value</p></td>
|
459 |
<td>
|
460 |
-
<input type="radio" name="price" checked
|
461 |
</td>
|
462 |
</tr>
|
463 |
|
464 |
<tr class="disabled">
|
465 |
<td class="alignright"><p class="label">Event Value = Cart Total</p></td>
|
466 |
<td>
|
467 |
-
<input type="radio" name="price"
|
468 |
</td>
|
469 |
</tr>
|
470 |
|
471 |
<tr class="disabled">
|
472 |
<td class="alignright"><p class="label">Use Global value</p></td>
|
473 |
<td>
|
474 |
-
<input type="radio" name="price"
|
475 |
<input type="text">
|
476 |
<span class="help">* Set this if you want a unique global value every time affiliate product clicked.</span>
|
477 |
</td>
|
@@ -495,7 +495,7 @@
|
|
495 |
</td>
|
496 |
<td>
|
497 |
<input type="checkbox" name="pys[woo][enabled]" value="1"
|
498 |
-
<?php echo pys_checkbox_state( 'woo', 'enabled' ); ?>
|
499 |
</td>
|
500 |
</tr>
|
501 |
|
112 |
<tr class="disabled">
|
113 |
<td class="alignright"><p class="label">Product price</p></td>
|
114 |
<td>
|
115 |
+
<input type="radio" name="pricea" checked>
|
116 |
</td>
|
117 |
</tr>
|
118 |
|
119 |
<tr class="disabled">
|
120 |
<td class="alignright"><p class="label">Percent of product price</p></td>
|
121 |
<td>
|
122 |
+
<input type="radio" name="pricea">
|
123 |
<input type="text">%
|
124 |
</td>
|
125 |
</tr>
|
127 |
<tr class="disabled">
|
128 |
<td class="alignright"><p class="label">Use Global value</p></td>
|
129 |
<td>
|
130 |
+
<input type="radio" name="pricea">
|
131 |
<input type="text">
|
132 |
</td>
|
133 |
</tr>
|
227 |
<tr class="disabled">
|
228 |
<td class="alignright"><p class="label">Products price (subtotal)</p></td>
|
229 |
<td>
|
230 |
+
<input type="radio" name="pricec" checked>
|
231 |
</td>
|
232 |
</tr>
|
233 |
|
234 |
<tr class="disabled">
|
235 |
<td class="alignright"><p class="label">Percent of products value (subtotal)</p></td>
|
236 |
<td>
|
237 |
+
<input type="radio" name="pricec">
|
238 |
<input type="text">%
|
239 |
</td>
|
240 |
</tr>
|
242 |
<tr class="disabled">
|
243 |
<td class="alignright"><p class="label">Use Global value</p></td>
|
244 |
<td>
|
245 |
+
<input type="radio" name="pricec">
|
246 |
<input type="text">
|
247 |
</td>
|
248 |
</tr>
|
312 |
<tr class="tall">
|
313 |
<td class="alignright"><p class="label big">Advanced Matching on Purchase event:</p></td>
|
314 |
<td>
|
315 |
+
<input type="checkbox" name="" value="1" class="disabled">
|
316 |
Enable - <strong>This is a PRO feature</strong> - <a href="http://www.pixelyoursite.com/facebook-pixel-plugin">Update NOW</a>
|
317 |
<span class="help">Advance Matching can lead to 10% increase in attributed conversions and 20% increase in reach of retargeting campaigns - <a href="http://www.pixelyoursite.com/enable-advance-matching-woocommerce" target="_blank">Click to read more</a> </span>
|
318 |
</td>
|
328 |
<tr class="disabled">
|
329 |
<td class="alignright"></td>
|
330 |
<td>
|
331 |
+
<input type="checkbox" name="" value="1">
|
332 |
<strong>Add Town, State and Country parameters</strong>
|
333 |
<span class="help">Will pull <code>town</code>, <code>state</code> and <code>country</code></span>
|
334 |
|
338 |
<tr class="disabled">
|
339 |
<td></td>
|
340 |
<td>
|
341 |
+
<input type="checkbox" name="" value="1">
|
342 |
<strong>Add Payment Method parameter</strong>
|
343 |
<span class="help">Will pull <code>payment</code></span>
|
344 |
|
348 |
<tr class="disabled">
|
349 |
<td></td>
|
350 |
<td>
|
351 |
+
<input type="checkbox" name="" value="1">
|
352 |
<strong>Add Shipping Method parameter</strong>
|
353 |
<span class="help">Will pull <code>shipping</code></span>
|
354 |
</td>
|
357 |
<tr class="disabled">
|
358 |
<td></td>
|
359 |
<td>
|
360 |
+
<input type="checkbox" name="" value="1">
|
361 |
<strong>Add Coupons parameter</strong>
|
362 |
<span class="help">Will pull <code>coupon_used</code> and <code>coupon_name</code></span>
|
363 |
</td>
|
381 |
<tr class="disabled">
|
382 |
<td class="alignright"><p class="label">Event type:</p></td>
|
383 |
<td>
|
384 |
+
<input type="radio" name="eta" checked>
|
385 |
<select autocomplete="off" disabled>
|
386 |
<option selected>Lead</option>
|
387 |
</select>
|
391 |
<tr class="disabled tall">
|
392 |
<td class="alignright"><p class="label">Name of custom event:</p></td>
|
393 |
<td>
|
394 |
+
<input type="radio" name="eta">
|
395 |
<input type="text">
|
396 |
<span class="help">* The Affiliate event will have all the parameters values specific for selected event.</span>
|
397 |
<span class="help">* The Custom Affiliate event will have value, currency, content_name, content_type, content_ids.</span>
|
401 |
<tr class="disabled">
|
402 |
<td class="alignright"><p class="label">Do not pull event value</p></td>
|
403 |
<td>
|
404 |
+
<input type="radio" name="pricex" checked>
|
405 |
</td>
|
406 |
</tr>
|
407 |
|
408 |
<tr class="disabled">
|
409 |
<td class="alignright"><p class="label">Event Value = Prouct Price</p></td>
|
410 |
<td>
|
411 |
+
<input type="radio" name="pricex">
|
412 |
</td>
|
413 |
</tr>
|
414 |
|
415 |
<tr class="disabled">
|
416 |
<td class="alignright"><p class="label">Use Global value</p></td>
|
417 |
<td>
|
418 |
+
<input type="radio" name="pricex">
|
419 |
<input type="text">
|
420 |
<span class="help">* Set this if you want a unique global value every time affiliate product clicked.</span>
|
421 |
</td>
|
437 |
<tr class="disabled">
|
438 |
<td class="alignright"><p class="label">Event type:</p></td>
|
439 |
<td>
|
440 |
+
<input type="radio" name="etb" checked>
|
441 |
<select autocomplete="off" disabled>
|
442 |
<option selected>InitiatePayment</option>
|
443 |
</select>
|
447 |
<tr class="disabled tall">
|
448 |
<td class="alignright"><p class="label">Name of custom event:</p></td>
|
449 |
<td>
|
450 |
+
<input type="radio" name="etb">
|
451 |
<input type="text">
|
452 |
<span class="help">* The PayPal Standard event will have all the parameters values specific for selected event.</span>
|
453 |
<span class="help">* The Custom Affiliate event will have value, currency, content_type, content_ids.</span>
|
457 |
<tr class="disabled">
|
458 |
<td class="alignright"><p class="label">Do not pull event value</p></td>
|
459 |
<td>
|
460 |
+
<input type="radio" name="price" checked>
|
461 |
</td>
|
462 |
</tr>
|
463 |
|
464 |
<tr class="disabled">
|
465 |
<td class="alignright"><p class="label">Event Value = Cart Total</p></td>
|
466 |
<td>
|
467 |
+
<input type="radio" name="price">
|
468 |
</td>
|
469 |
</tr>
|
470 |
|
471 |
<tr class="disabled">
|
472 |
<td class="alignright"><p class="label">Use Global value</p></td>
|
473 |
<td>
|
474 |
+
<input type="radio" name="price">
|
475 |
<input type="text">
|
476 |
<span class="help">* Set this if you want a unique global value every time affiliate product clicked.</span>
|
477 |
</td>
|
495 |
</td>
|
496 |
<td>
|
497 |
<input type="checkbox" name="pys[woo][enabled]" value="1"
|
498 |
+
<?php echo pys_checkbox_state( 'woo', 'enabled' ); ?> >
|
499 |
</td>
|
500 |
</tr>
|
501 |
|
js/public.js
CHANGED
@@ -4,9 +4,9 @@ jQuery(document).ready(function( $ ) {
|
|
4 |
$(".ajax_add_to_cart").click(function(e){
|
5 |
|
6 |
var code = jQuery(this).attr('data-pixelcode') || false;
|
7 |
-
console.log( code );
|
8 |
|
9 |
if( code != false && code != '' ) {
|
|
|
10 |
eval( code );
|
11 |
}
|
12 |
|
4 |
$(".ajax_add_to_cart").click(function(e){
|
5 |
|
6 |
var code = jQuery(this).attr('data-pixelcode') || false;
|
|
|
7 |
|
8 |
if( code != false && code != '' ) {
|
9 |
+
console.log( code );
|
10 |
eval( code );
|
11 |
}
|
12 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: PixelYourSite, c0d3fev3r, themister
|
|
3 |
Tags: Facebook Pixel, New Facebook Pixel, Facebook Conversion Pixel, Facebook Pixel Events, Facebook, New Facebook Pixel Events, Dynamic Events, Standard Events, Facebook Events, Facebook Standard Events, Facebook Dynamic Product Ads, WooCommerce, WooCommerce Facebook Pixel, Facebook Custom Events, Facebook Conversion Value, WooCommerce Affiliate Products, Facebook Pixel PayPal
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 4.5.2
|
6 |
-
Stable tag: 3.0.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -198,6 +198,14 @@ We have an article about how to optimize Facebook Ads Reports:
|
|
198 |
|
199 |
= PixelYourSite 3.0.2 =
|
200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
* Small fixes related to some possible html errors
|
202 |
|
203 |
* Admin Notice modiffications
|
3 |
Tags: Facebook Pixel, New Facebook Pixel, Facebook Conversion Pixel, Facebook Pixel Events, Facebook, New Facebook Pixel Events, Dynamic Events, Standard Events, Facebook Events, Facebook Standard Events, Facebook Dynamic Product Ads, WooCommerce, WooCommerce Facebook Pixel, Facebook Custom Events, Facebook Conversion Value, WooCommerce Affiliate Products, Facebook Pixel PayPal
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 4.5.2
|
6 |
+
Stable tag: 3.0.3
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
198 |
|
199 |
= PixelYourSite 3.0.2 =
|
200 |
|
201 |
+
* Fixing PHP warnings and errors
|
202 |
+
|
203 |
+
* Fixing encoding problems
|
204 |
+
|
205 |
+
* Fixing incompatibility with some themes
|
206 |
+
|
207 |
+
= PixelYourSite 3.0.2 =
|
208 |
+
|
209 |
* Small fixes related to some possible html errors
|
210 |
|
211 |
* Admin Notice modiffications
|