Version Description
Download this release
Release Info
Developer | PixelYourSite |
Plugin | PixelYourSite – Facebook Pixel (Events, WooCommerce & Easy Digital Downloads) |
Version | 8.2.6 |
Comparing to | |
See all releases |
Code changes from version 8.2.5 to 8.2.6
- dist/scripts/public.js +1 -1
- facebook-pixel-master.php +3 -3
- includes/class-events-manager.php +3 -3
- includes/events/class-events-woo.php +4 -2
- includes/functions-admin.php +8 -0
- includes/functions-common.php +3 -0
- includes/functions-woo.php +18 -0
- includes/views/html-main-wcf.php +358 -0
- includes/views/html-wrapper-main.php +3 -0
- modules/facebook/facebook-server.php +1 -5
- modules/facebook/facebook.php +4 -2
- modules/google_analytics/ga.php +4 -2
- pixelyoursite.php +1 -1
- readme.txt +12 -4
dist/scripts/public.js
CHANGED
@@ -1730,7 +1730,7 @@ if (!Array.prototype.includes) {
|
|
1730 |
if (options.dynamicEvents.hasOwnProperty("woo_add_to_cart_on_button_click")) {
|
1731 |
|
1732 |
// Loop, any kind of "simple" product, except external
|
1733 |
-
$('.add_to_cart_button:not(.product_type_variable,.single_add_to_cart_button)').on("click",function (e) {
|
1734 |
|
1735 |
var product_id = $(this).data('product_id');
|
1736 |
|
1730 |
if (options.dynamicEvents.hasOwnProperty("woo_add_to_cart_on_button_click")) {
|
1731 |
|
1732 |
// Loop, any kind of "simple" product, except external
|
1733 |
+
$('.add_to_cart_button:not(.product_type_variable,.product_type_bundle,.single_add_to_cart_button)').on("click",function (e) {
|
1734 |
|
1735 |
var product_id = $(this).data('product_id');
|
1736 |
|
facebook-pixel-master.php
CHANGED
@@ -4,16 +4,16 @@
|
|
4 |
* Plugin Name: PixelYourSite
|
5 |
* Plugin URI: http://www.pixelyoursite.com/
|
6 |
* Description: No coding <strong>Facebook Pixel, Facebook Converion API,</strong> and <strong>Google Analytics</strong> install. Track key actions with our Signal event, or configure your own events. WooCommerce and EDD fully supported, with Facebook Dynamic Ads Pixel set-up and Google Analytics Enhanced Ecommerce. Insert any custom script with our Head & Footer option. Add the <strong>Pinterest Tag</strong> with our free add-on. The PRO version adds support for the Google Ads tag plus a lot of extra stuff. Full support for <strong>ConsentMagic.com</strong>.
|
7 |
-
* Version: 8.2.
|
8 |
* Author: PixelYourSite
|
9 |
* Author URI: http://www.pixelyoursite.com
|
10 |
* License: GPLv3
|
11 |
*
|
12 |
* Requires at least: 4.4
|
13 |
-
* Tested up to: 5.
|
14 |
*
|
15 |
* WC requires at least: 2.6.0
|
16 |
-
* WC tested up to: 5.
|
17 |
*
|
18 |
* Text Domain: pys
|
19 |
*/
|
4 |
* Plugin Name: PixelYourSite
|
5 |
* Plugin URI: http://www.pixelyoursite.com/
|
6 |
* Description: No coding <strong>Facebook Pixel, Facebook Converion API,</strong> and <strong>Google Analytics</strong> install. Track key actions with our Signal event, or configure your own events. WooCommerce and EDD fully supported, with Facebook Dynamic Ads Pixel set-up and Google Analytics Enhanced Ecommerce. Insert any custom script with our Head & Footer option. Add the <strong>Pinterest Tag</strong> with our free add-on. The PRO version adds support for the Google Ads tag plus a lot of extra stuff. Full support for <strong>ConsentMagic.com</strong>.
|
7 |
+
* Version: 8.2.6
|
8 |
* Author: PixelYourSite
|
9 |
* Author URI: http://www.pixelyoursite.com
|
10 |
* License: GPLv3
|
11 |
*
|
12 |
* Requires at least: 4.4
|
13 |
+
* Tested up to: 5.8
|
14 |
*
|
15 |
* WC requires at least: 2.6.0
|
16 |
+
* WC tested up to: 5.5
|
17 |
*
|
18 |
* Text Domain: pys
|
19 |
*/
|
includes/class-events-manager.php
CHANGED
@@ -456,7 +456,7 @@ class EventsManager {
|
|
456 |
|
457 |
?>
|
458 |
|
459 |
-
<script type="application/javascript">
|
460 |
/* <![CDATA[ */
|
461 |
window.pysWooProductData = window.pysWooProductData || [];
|
462 |
window.pysWooProductData[ <?php echo $product_id; ?> ] = <?php echo $params; ?>;
|
@@ -527,7 +527,7 @@ class EventsManager {
|
|
527 |
|
528 |
?>
|
529 |
|
530 |
-
<script type="application/javascript">
|
531 |
/* <![CDATA[ */
|
532 |
window.pysWooProductData = window.pysWooProductData || [];
|
533 |
<?php foreach ( $params as $product_id => $product_data ) : ?>
|
@@ -588,7 +588,7 @@ class EventsManager {
|
|
588 |
|
589 |
?>
|
590 |
|
591 |
-
<script type="application/javascript">
|
592 |
/* <![CDATA[ */
|
593 |
window.pysEddProductData = window.pysEddProductData || [];
|
594 |
window.pysEddProductData[<?php echo $post->ID; ?>] = <?php echo json_encode( $params ); ?>;
|
456 |
|
457 |
?>
|
458 |
|
459 |
+
<script type="application/javascript" style="display:none">
|
460 |
/* <![CDATA[ */
|
461 |
window.pysWooProductData = window.pysWooProductData || [];
|
462 |
window.pysWooProductData[ <?php echo $product_id; ?> ] = <?php echo $params; ?>;
|
527 |
|
528 |
?>
|
529 |
|
530 |
+
<script type="application/javascript" style="display:none">
|
531 |
/* <![CDATA[ */
|
532 |
window.pysWooProductData = window.pysWooProductData || [];
|
533 |
<?php foreach ( $params as $product_id => $product_data ) : ?>
|
588 |
|
589 |
?>
|
590 |
|
591 |
+
<script type="application/javascript" style="display:none">
|
592 |
/* <![CDATA[ */
|
593 |
window.pysEddProductData = window.pysEddProductData || [];
|
594 |
window.pysEddProductData[<?php echo $post->ID; ?>] = <?php echo json_encode( $params ); ?>;
|
includes/events/class-events-woo.php
CHANGED
@@ -150,11 +150,13 @@ class EventsWoo extends EventsFactory {
|
|
150 |
case 'woo_add_to_cart_on_cart_page': {
|
151 |
return PYS()->getOption( 'woo_add_to_cart_enabled' ) &&
|
152 |
PYS()->getOption( 'woo_add_to_cart_on_cart_page' ) &&
|
153 |
-
is_cart()
|
|
|
154 |
}
|
155 |
case 'woo_add_to_cart_on_checkout_page': {
|
156 |
return PYS()->getOption( 'woo_add_to_cart_enabled' ) && PYS()->getOption( 'woo_add_to_cart_on_checkout_page' )
|
157 |
-
&& is_checkout() && ! is_wc_endpoint_url()
|
|
|
158 |
}
|
159 |
|
160 |
case 'woo_initiate_checkout': {
|
150 |
case 'woo_add_to_cart_on_cart_page': {
|
151 |
return PYS()->getOption( 'woo_add_to_cart_enabled' ) &&
|
152 |
PYS()->getOption( 'woo_add_to_cart_on_cart_page' ) &&
|
153 |
+
is_cart()
|
154 |
+
&& count(WC()->cart->get_cart())>0;
|
155 |
}
|
156 |
case 'woo_add_to_cart_on_checkout_page': {
|
157 |
return PYS()->getOption( 'woo_add_to_cart_enabled' ) && PYS()->getOption( 'woo_add_to_cart_on_checkout_page' )
|
158 |
+
&& is_checkout() && ! is_wc_endpoint_url()
|
159 |
+
&& count(WC()->cart->get_cart())>0;
|
160 |
}
|
161 |
|
162 |
case 'woo_initiate_checkout': {
|
includes/functions-admin.php
CHANGED
@@ -75,6 +75,14 @@ function getAdminPrimaryNavTabs() {
|
|
75 |
'name' => 'EasyDigitalDownloads',
|
76 |
);
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
}
|
79 |
|
80 |
$tabs['gdpr'] = array(
|
75 |
'name' => 'EasyDigitalDownloads',
|
76 |
);
|
77 |
|
78 |
+
}
|
79 |
+
if ( isWcfActive() ) {
|
80 |
+
|
81 |
+
$tabs['wcf'] = array(
|
82 |
+
'url' => buildAdminUrl( 'pixelyoursite', 'wcf' ),
|
83 |
+
'name' => 'CartFlows',
|
84 |
+
);
|
85 |
+
|
86 |
}
|
87 |
|
88 |
$tabs['gdpr'] = array(
|
includes/functions-common.php
CHANGED
@@ -9,6 +9,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
}
|
10 |
|
11 |
|
|
|
|
|
|
|
12 |
|
13 |
function isPinterestActive( $checkCompatibility = true ) {
|
14 |
|
9 |
}
|
10 |
|
11 |
|
12 |
+
function isWcfActive() {
|
13 |
+
return function_exists('wcf');
|
14 |
+
}
|
15 |
|
16 |
function isPinterestActive( $checkCompatibility = true ) {
|
17 |
|
includes/functions-woo.php
CHANGED
@@ -196,4 +196,22 @@ function getWooEventValueCart( $valueOption, $global, $percent = 100 ) {
|
|
196 |
}
|
197 |
|
198 |
return $value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
}
|
196 |
}
|
197 |
|
198 |
return $value;
|
199 |
+
}
|
200 |
+
|
201 |
+
function wooGetOrderIdFromRequest() {
|
202 |
+
if(isset( $_REQUEST['key'] ) && $_REQUEST['key'] != "") {
|
203 |
+
$order_key = sanitize_key($_REQUEST['key']);
|
204 |
+
$order_id = (int) wc_get_order_id_by_order_key( $order_key );
|
205 |
+
return $order_id;
|
206 |
+
}
|
207 |
+
if(isset( $_REQUEST['referenceCode'] ) && $_REQUEST['referenceCode'] != "") {
|
208 |
+
return (int)$_REQUEST['referenceCode'];
|
209 |
+
}
|
210 |
+
if(isset( $_REQUEST['ref_venta'] ) && $_REQUEST['ref_venta'] != "") {
|
211 |
+
return (int)$_REQUEST['ref_venta'];
|
212 |
+
}
|
213 |
+
if(!empty($_REQUEST['wcf-order'])) {
|
214 |
+
return (int)$_REQUEST['wcf-order'];
|
215 |
+
}
|
216 |
+
return -1;
|
217 |
}
|
includes/views/html-main-wcf.php
ADDED
@@ -0,0 +1,358 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace PixelYourSite;
|
3 |
+
|
4 |
+
use Cartflows_Helper;
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly.
|
8 |
+
}
|
9 |
+
?>
|
10 |
+
|
11 |
+
<h2 class="section-title">CartFlows Settings</h2>
|
12 |
+
<!-- Enable CartFlows -->
|
13 |
+
<div class="card card-static">
|
14 |
+
<div class="card-header">
|
15 |
+
General
|
16 |
+
</div>
|
17 |
+
<div class="card-body">
|
18 |
+
<div class="row">
|
19 |
+
<div class="col">
|
20 |
+
<p>From here you can control the events and parameters fired by PixelYourSite Professional on CartFlos pages and actions.</p>
|
21 |
+
<?php PYS()->render_switcher_input( "",false,true ); ?>
|
22 |
+
<h4 class="switcher-label">Enable CartFlows set-up</h4>
|
23 |
+
<?php renderProBadge(); ?>
|
24 |
+
</div>
|
25 |
+
</div>
|
26 |
+
</div>
|
27 |
+
</div>
|
28 |
+
|
29 |
+
<!-- Dedicated Tracking -->
|
30 |
+
<div class="card ">
|
31 |
+
<div class="card-header">
|
32 |
+
Dedicated Tracking IDs (optional) <?php renderProBadge(); cardCollapseBtn(); ?>
|
33 |
+
</div>
|
34 |
+
<div class="card-body">
|
35 |
+
|
36 |
+
<?php if ( Facebook()->enabled() ) : ?>
|
37 |
+
<div class="plate">
|
38 |
+
<div class="row pt-3">
|
39 |
+
<div class="col">
|
40 |
+
<h4 class="mb-3">Facebook Pixel</h4>
|
41 |
+
<h4 class="label">Facebook Pixel ID:</h4>
|
42 |
+
<?php Facebook()->render_text_input( 'wcf_pixel_id', 'Add your pixel ID there',true ); ?>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
<div class="row mt-3">
|
46 |
+
<div class="col">
|
47 |
+
<h4 class="label">Conversion API:</h4>
|
48 |
+
<?php Facebook()->render_text_area_input( 'wcf_server_access_api_token', 'Add your token there',true ); ?>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
<div class="row mt-3">
|
52 |
+
<div class="col">
|
53 |
+
<h4 class="label">test_event_code:</h4>
|
54 |
+
<?php Facebook()->render_text_input( 'wcf_test_api_event_code', 'Add your test_event_code there',true ); ?>
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
<div class="row mt-3 pb-3">
|
58 |
+
<div class="col">
|
59 |
+
<h4 class="label">Verify your domain:</h4>
|
60 |
+
<?php Facebook()->render_text_input( 'wcf_verify_meta_tag', 'Add the verification meta-tag there' ,true); ?>
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
<?php endif; ?>
|
65 |
+
|
66 |
+
<?php if ( GA()->enabled() ) : ?>
|
67 |
+
<hr>
|
68 |
+
<div class="plate">
|
69 |
+
<div class="row pt-3 mt-3 pb-3">
|
70 |
+
<div class="col">
|
71 |
+
<h4 class="mb-3">Google Analytics</h4>
|
72 |
+
<h4 class="label">Google Analytics ID:</h4>
|
73 |
+
<?php GA()->render_text_input( 'wcf_pixel_id', 'Add your ID there',true ); ?>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
</div>
|
77 |
+
<?php endif; ?>
|
78 |
+
|
79 |
+
|
80 |
+
<?php if ( Bing()->enabled() ) : ?>
|
81 |
+
<hr>
|
82 |
+
<div class="plate">
|
83 |
+
<div class="row pt-3 mt-3 pb-3">
|
84 |
+
<div class="col">
|
85 |
+
<h4 class="mb-3">Bing Tag</h4>
|
86 |
+
<h4 class="label">Bing Tag ID:</h4>
|
87 |
+
<?php Bing()->render_text_input( 'wcf_pixel_id', 'Add your ID there',true ); ?>
|
88 |
+
</div>
|
89 |
+
</div>
|
90 |
+
</div>
|
91 |
+
<?php endif; ?>
|
92 |
+
|
93 |
+
<?php if ( Pinterest()->enabled() ) : ?>
|
94 |
+
<hr>
|
95 |
+
<div class="plate">
|
96 |
+
<div class="row pt-3 mt-3">
|
97 |
+
<div class="col">
|
98 |
+
<h4 class="mb-3">Pinterest Pixel</h4>
|
99 |
+
<h4 class="label">Pinterest Pixel ID:</h4>
|
100 |
+
<?php Pinterest()->render_text_input( 'wcf_pixel_id', 'Add your ID there',true ); ?>
|
101 |
+
</div>
|
102 |
+
</div>
|
103 |
+
<div class="row mt-3 pb-3">
|
104 |
+
<div class="col">
|
105 |
+
<h4 class="label">Verify your domain:</h4>
|
106 |
+
<?php Pinterest()->render_text_input( 'wcf_verify_meta_tag', 'Add the verification meta-tag there',true ); ?>
|
107 |
+
</div>
|
108 |
+
</div>
|
109 |
+
</div>
|
110 |
+
<?php endif; ?>
|
111 |
+
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
|
115 |
+
<h2 class="section-title">Standard Events Settings</h2>
|
116 |
+
|
117 |
+
<!-- Purchase -->
|
118 |
+
<div class="card ">
|
119 |
+
<div class="card-header">
|
120 |
+
Purchase settings <?php renderProBadge(); cardCollapseBtn(); ?>
|
121 |
+
</div>
|
122 |
+
<div class="card-body">
|
123 |
+
<div class="row">
|
124 |
+
<div class="col">
|
125 |
+
<p>You have additional options for this event on the plugins WooCommerce page</p>
|
126 |
+
<div class="custom-controls-stacked mb-3">
|
127 |
+
<?php PYS()->render_radio_input( 'wcf_purchase_on', 'all', 'Fire a Purchase event for each Upsale and Downsale step',true ); ?>
|
128 |
+
<?php PYS()->render_radio_input( 'wcf_purchase_on', 'last', 'Fire a single Purchase event for all Upsale or Downsale steps. <strong>Caution</strong>: if the client abandons a step, we wont\'t track the transaction ' ,true ); ?>
|
129 |
+
</div>
|
130 |
+
<?php PYS()->render_switcher_input( 'wcf_purchase_on_optin_enabled',false,true ); ?>
|
131 |
+
<h4 class="switcher-label">Fire the event Optin offers</h4>
|
132 |
+
</div>
|
133 |
+
</div>
|
134 |
+
</div>
|
135 |
+
</div>
|
136 |
+
|
137 |
+
<!-- AddToCart -->
|
138 |
+
<div class="card ">
|
139 |
+
<div class="card-header">
|
140 |
+
AddToCart settings <?php renderProBadge(); cardCollapseBtn(); ?>
|
141 |
+
</div>
|
142 |
+
<div class="card-body">
|
143 |
+
<div class="row">
|
144 |
+
<div class="col">
|
145 |
+
<p>You have additional options for this event on the plugins WooCommerce page</p>
|
146 |
+
<?php PYS()->render_switcher_input( 'wcf_add_to_cart_on_bump_click_enabled',false,true ); ?>
|
147 |
+
<h4 class="switcher-label">Fire the event for order bumps</h4>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
</div>
|
151 |
+
</div>
|
152 |
+
|
153 |
+
<!-- Lead -->
|
154 |
+
<div class="card ">
|
155 |
+
<div class="card-header has_switch">
|
156 |
+
<?php PYS()->render_switcher_input( 'wcf_lead_enabled',false,true ); ?> Lead <?php renderProBadge(); cardCollapseBtn(); ?>
|
157 |
+
</div>
|
158 |
+
<div class="card-body">
|
159 |
+
<div class="row">
|
160 |
+
<div class="col">
|
161 |
+
Fire a Lead event when a Optin offer is accepted
|
162 |
+
</div>
|
163 |
+
</div>
|
164 |
+
</div>
|
165 |
+
</div>
|
166 |
+
|
167 |
+
<!-- ViewContent -->
|
168 |
+
<div class="card ">
|
169 |
+
<div class="card-header">
|
170 |
+
ViewContent settings <?php renderProBadge(); cardCollapseBtn(); ?>
|
171 |
+
</div>
|
172 |
+
<div class="card-body">
|
173 |
+
<div class="row">
|
174 |
+
<div class="col">
|
175 |
+
<p>You have additional options for this event on the plugins WooCommerce page</p>
|
176 |
+
<p>The event is always fired on page</p>
|
177 |
+
<?php PYS()->render_switcher_input( 'wcf_sell_step_view_content_enabled' ,false,true ); ?>
|
178 |
+
<h4 class="switcher-label">Fire the event on Upsale and Downsale steps</h4>
|
179 |
+
</div>
|
180 |
+
</div>
|
181 |
+
</div>
|
182 |
+
</div>
|
183 |
+
|
184 |
+
|
185 |
+
|
186 |
+
<h2 class="section-title">Custom Events</h2>
|
187 |
+
|
188 |
+
<!-- CartFlows -->
|
189 |
+
<div class="card ">
|
190 |
+
<div class="card-header has_switch">
|
191 |
+
<?php PYS()->render_switcher_input( 'wcf_cart_flows_event_enabled',false,true ); ?> CartFlows Event <?php renderProBadge(); cardCollapseBtn(); ?>
|
192 |
+
</div>
|
193 |
+
<div class="card-body">
|
194 |
+
<?php if ( Facebook()->enabled() ) : ?>
|
195 |
+
<div class="row">
|
196 |
+
<div class="col">
|
197 |
+
<p>Fire this event for all CartFlows pages.</p>
|
198 |
+
<?php Facebook()->render_switcher_input( 'wcf_cart_flows_event_enabled',false,true ); ?>
|
199 |
+
<h4 class="switcher-label">Facebook</h4>
|
200 |
+
</div>
|
201 |
+
</div>
|
202 |
+
<?php endif; ?>
|
203 |
+
|
204 |
+
<?php if ( GA()->enabled() ) : ?>
|
205 |
+
<div class="row">
|
206 |
+
<div class="col">
|
207 |
+
<?php GA()->render_switcher_input( 'wcf_cart_flows_event_enabled',false,true ); ?>
|
208 |
+
<h4 class="switcher-label">Google Analytics</h4>
|
209 |
+
</div>
|
210 |
+
</div>
|
211 |
+
<?php endif; ?>
|
212 |
+
|
213 |
+
|
214 |
+
|
215 |
+
<?php if ( Pinterest()->enabled() ) : ?>
|
216 |
+
<div class="row">
|
217 |
+
<div class="col">
|
218 |
+
<?php Pinterest()->render_switcher_input( 'wcf_cart_flows_event_enabled',false,true ); ?>
|
219 |
+
<h4 class="switcher-label">Pinterest</h4>
|
220 |
+
</div>
|
221 |
+
</div>
|
222 |
+
<?php endif; ?>
|
223 |
+
|
224 |
+
<?php if ( Bing()->enabled() ) : ?>
|
225 |
+
<div class="row">
|
226 |
+
<div class="col">
|
227 |
+
<?php Bing()->render_switcher_input( 'wcf_cart_flows_event_enabled',false,true ); ?>
|
228 |
+
<h4 class="switcher-label">Bing</h4>
|
229 |
+
</div>
|
230 |
+
</div>
|
231 |
+
<?php endif; ?>
|
232 |
+
</div>
|
233 |
+
</div>
|
234 |
+
|
235 |
+
<!-- step event -->
|
236 |
+
<div class="card ">
|
237 |
+
<div class="card-header has_switch">
|
238 |
+
<?php PYS()->render_switcher_input( 'wcf_step_event_enabled',false,true ); ?> Track Steps <?php renderProBadge(); cardCollapseBtn(); ?>
|
239 |
+
</div>
|
240 |
+
<div class="card-body">
|
241 |
+
<?php if ( Facebook()->enabled() ) : ?>
|
242 |
+
<div class="row">
|
243 |
+
<div class="col">
|
244 |
+
<p>Fire CartFlows_Landing, CartFlows_Upsale, CartFlows_Downsale, CartFlows_Checkout, CartFlows_ThankYou,CartFlows_Optin</p>
|
245 |
+
<?php Facebook()->render_switcher_input( 'wcf_step_event_enabled',false,true ); ?>
|
246 |
+
<h4 class="switcher-label">Facebook</h4>
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
<?php endif; ?>
|
250 |
+
|
251 |
+
<?php if ( GA()->enabled() ) : ?>
|
252 |
+
<div class="row">
|
253 |
+
<div class="col">
|
254 |
+
<?php GA()->render_switcher_input( 'wcf_step_event_enabled',false,true ); ?>
|
255 |
+
<h4 class="switcher-label">Google Analytics</h4>
|
256 |
+
</div>
|
257 |
+
</div>
|
258 |
+
<?php endif; ?>
|
259 |
+
|
260 |
+
|
261 |
+
<?php if ( Pinterest()->enabled() ) : ?>
|
262 |
+
<div class="row">
|
263 |
+
<div class="col">
|
264 |
+
<?php Pinterest()->render_switcher_input( 'wcf_step_event_enabled',false,true ); ?>
|
265 |
+
<h4 class="switcher-label">Pinterest</h4>
|
266 |
+
</div>
|
267 |
+
</div>
|
268 |
+
<?php endif; ?>
|
269 |
+
|
270 |
+
<?php if ( Bing()->enabled() ) : ?>
|
271 |
+
<div class="row">
|
272 |
+
<div class="col">
|
273 |
+
<?php Bing()->render_switcher_input( 'wcf_step_event_enabled',false,true ); ?>
|
274 |
+
<h4 class="switcher-label">Bing</h4>
|
275 |
+
</div>
|
276 |
+
</div>
|
277 |
+
<?php endif; ?>
|
278 |
+
</div>
|
279 |
+
</div>
|
280 |
+
|
281 |
+
<!-- step event -->
|
282 |
+
<div class="card ">
|
283 |
+
<div class="card-header has_switch">
|
284 |
+
<?php PYS()->render_switcher_input( 'wcf_bump_event_enabled',false,true ); ?> Track Order Bumps <?php renderProBadge(); cardCollapseBtn(); ?>
|
285 |
+
</div>
|
286 |
+
<div class="card-body">
|
287 |
+
<?php if ( Facebook()->enabled() ) : ?>
|
288 |
+
<div class="row">
|
289 |
+
<div class="col">
|
290 |
+
<p>Fire CartFlows_order_bump, when an order bump is accepted</p>
|
291 |
+
<?php Facebook()->render_switcher_input( 'wcf_bump_event_enabled',false,true ); ?>
|
292 |
+
<h4 class="switcher-label">Facebook</h4>
|
293 |
+
</div>
|
294 |
+
</div>
|
295 |
+
<?php endif; ?>
|
296 |
+
|
297 |
+
<?php if ( GA()->enabled() ) : ?>
|
298 |
+
<div class="row">
|
299 |
+
<div class="col">
|
300 |
+
<?php GA()->render_switcher_input( 'wcf_bump_event_enabled',false,true ); ?>
|
301 |
+
<h4 class="switcher-label">Google Analytics</h4>
|
302 |
+
</div>
|
303 |
+
</div>
|
304 |
+
<?php endif; ?>
|
305 |
+
|
306 |
+
|
307 |
+
<?php if ( Pinterest()->enabled() ) : ?>
|
308 |
+
<div class="row">
|
309 |
+
<div class="col">
|
310 |
+
<?php Pinterest()->render_switcher_input( 'wcf_bump_event_enabled',false,true ); ?>
|
311 |
+
<h4 class="switcher-label">Pinterest</h4>
|
312 |
+
</div>
|
313 |
+
</div>
|
314 |
+
<?php endif; ?>
|
315 |
+
|
316 |
+
<?php if ( Bing()->enabled() ) : ?>
|
317 |
+
<div class="row">
|
318 |
+
<div class="col">
|
319 |
+
<?php Bing()->render_switcher_input( 'wcf_bump_event_enabled',false,true ); ?>
|
320 |
+
<h4 class="switcher-label">Bing</h4>
|
321 |
+
</div>
|
322 |
+
</div>
|
323 |
+
<?php endif; ?>
|
324 |
+
</div>
|
325 |
+
</div>
|
326 |
+
<h2 class="section-title">CartFlows Events Parameters</h2>
|
327 |
+
|
328 |
+
<div class="card ">
|
329 |
+
<div class="card-header">
|
330 |
+
Control the CartFlows Parameters <?php renderProBadge(); cardCollapseBtn(); ?>
|
331 |
+
</div>
|
332 |
+
<div class="card-body">
|
333 |
+
<div class="row">
|
334 |
+
<div class="col">
|
335 |
+
<?php PYS()->render_switcher_input( 'wcf_global_cartflows_parameter_enabled',false,true ); ?>
|
336 |
+
<h4 class="switcher-label">CartFlows</h4>
|
337 |
+
</div>
|
338 |
+
</div>
|
339 |
+
<div class="row">
|
340 |
+
<div class="col">
|
341 |
+
<?php PYS()->render_switcher_input( 'wcf_global_cartflows_flow_parameter_enabled',false,true ); ?>
|
342 |
+
<h4 class="switcher-label">CartFlows_flow</h4>
|
343 |
+
</div>
|
344 |
+
</div>
|
345 |
+
<div class="row">
|
346 |
+
<div class="col">
|
347 |
+
<?php PYS()->render_switcher_input( 'wcf_global_cartflows_step_parameter_enabled',false,true ); ?>
|
348 |
+
<h4 class="switcher-label">CartFlows_step</h4>
|
349 |
+
</div>
|
350 |
+
</div>
|
351 |
+
</div>
|
352 |
+
</div>
|
353 |
+
|
354 |
+
<div class="row justify-content-center">
|
355 |
+
<div class="col-4">
|
356 |
+
<button class="btn btn-block btn-sm btn-save">Save Settings</button>
|
357 |
+
</div>
|
358 |
+
</div>
|
includes/views/html-wrapper-main.php
CHANGED
@@ -79,6 +79,9 @@ include "html-popovers.php";
|
|
79 |
case 'edd':
|
80 |
include "html-main-edd.php";
|
81 |
break;
|
|
|
|
|
|
|
82 |
|
83 |
case 'head_footer':
|
84 |
/** @noinspection PhpIncludeInspection */
|
79 |
case 'edd':
|
80 |
include "html-main-edd.php";
|
81 |
break;
|
82 |
+
case 'wcf':
|
83 |
+
include "html-main-wcf.php";
|
84 |
+
break;
|
85 |
|
86 |
case 'head_footer':
|
87 |
/** @noinspection PhpIncludeInspection */
|
modules/facebook/facebook-server.php
CHANGED
@@ -201,16 +201,12 @@ class FacebookServer {
|
|
201 |
if(!empty($this->testCode[$pixel_Id]))
|
202 |
$request->setTestEventCode($this->testCode[$pixel_Id]);
|
203 |
|
204 |
-
if($this->isDebug)
|
205 |
-
error_log("send fb api request ".print_r($request,true));
|
206 |
-
|
207 |
try{
|
208 |
$response = $request->execute();
|
209 |
} catch (\Exception $e) {
|
210 |
-
|
211 |
}
|
212 |
|
213 |
-
if($this->isDebug && isset($response)) error_log("fb api response ".print_r($response,true));
|
214 |
}
|
215 |
}
|
216 |
|
201 |
if(!empty($this->testCode[$pixel_Id]))
|
202 |
$request->setTestEventCode($this->testCode[$pixel_Id]);
|
203 |
|
|
|
|
|
|
|
204 |
try{
|
205 |
$response = $request->execute();
|
206 |
} catch (\Exception $e) {
|
207 |
+
// error_log("error send Fb API request ".$e->getMessage());
|
208 |
}
|
209 |
|
|
|
210 |
}
|
211 |
}
|
212 |
|
modules/facebook/facebook.php
CHANGED
@@ -430,10 +430,12 @@ class Facebook extends Settings implements Pixel {
|
|
430 |
$value = json_encode($value);
|
431 |
@$args[ 'cd[' . $param . ']' ] = urlencode( $value );
|
432 |
}
|
433 |
-
|
|
|
|
|
434 |
// ALT tag used to pass ADA compliance
|
435 |
printf( '<noscript><img height="1" width="1" style="display: none;" src="%s" alt="facebook_pixel"></noscript>',
|
436 |
-
|
437 |
|
438 |
echo "\r\n";
|
439 |
|
430 |
$value = json_encode($value);
|
431 |
@$args[ 'cd[' . $param . ']' ] = urlencode( $value );
|
432 |
}
|
433 |
+
$src = add_query_arg( $args, 'https://www.facebook.com/tr' );
|
434 |
+
$src = str_replace("[","%5B",$src); //pass markup validation
|
435 |
+
$src = str_replace("]","%5D",$src);
|
436 |
// ALT tag used to pass ADA compliance
|
437 |
printf( '<noscript><img height="1" width="1" style="display: none;" src="%s" alt="facebook_pixel"></noscript>',
|
438 |
+
$src);
|
439 |
|
440 |
echo "\r\n";
|
441 |
|
modules/google_analytics/ga.php
CHANGED
@@ -376,10 +376,12 @@ class GA extends Settings implements Pixel {
|
|
376 |
$args["pa"] = 'detail'; // required
|
377 |
|
378 |
}
|
379 |
-
|
|
|
|
|
380 |
// ALT tag used to pass ADA compliance
|
381 |
printf( '<noscript><img height="1" width="1" style="display: none;" src="%s" alt="google_analytics"></noscript>',
|
382 |
-
|
383 |
|
384 |
echo "\r\n";
|
385 |
|
376 |
$args["pa"] = 'detail'; // required
|
377 |
|
378 |
}
|
379 |
+
$src = add_query_arg( $args, 'https://www.google-analytics.com/collect' ) ;
|
380 |
+
$src = str_replace("[","%5B",$src);
|
381 |
+
$src = str_replace("]","%5D",$src);
|
382 |
// ALT tag used to pass ADA compliance
|
383 |
printf( '<noscript><img height="1" width="1" style="display: none;" src="%s" alt="google_analytics"></noscript>',
|
384 |
+
$src);
|
385 |
|
386 |
echo "\r\n";
|
387 |
|
pixelyoursite.php
CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
4 |
exit; // Exit if accessed directly.
|
5 |
}
|
6 |
|
7 |
-
define( 'PYS_FREE_VERSION', '8.2.
|
8 |
define( 'PYS_FREE_PINTEREST_MIN_VERSION', '3.0.0' );
|
9 |
define( 'PYS_FREE_BING_MIN_VERSION', '2.0.0' );
|
10 |
define( 'PYS_FREE_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
4 |
exit; // Exit if accessed directly.
|
5 |
}
|
6 |
|
7 |
+
define( 'PYS_FREE_VERSION', '8.2.6' );
|
8 |
define( 'PYS_FREE_PINTEREST_MIN_VERSION', '3.0.0' );
|
9 |
define( 'PYS_FREE_BING_MIN_VERSION', '2.0.0' );
|
10 |
define( 'PYS_FREE_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: Facebook Pixel, Facebook Conversion API, CAPI, Facebook Pixel Events, Face
|
|
4 |
Requires at least: 3.0.1
|
5 |
Requires PHP: 5.4
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 8.2.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -139,9 +139,10 @@ OTHER USEFUL FEATURES:
|
|
139 |
**EVEN MORE FEATURES WITH THE PRO VERSION:**
|
140 |
|
141 |
|
142 |
-
[PixelYourSite Pro](https://www.pixelyoursite.com/) is used by thousands of businesses already and will offer you some extraordinary features.
|
143 |
-
|
144 |
-
|
|
|
145 |
|
146 |
|
147 |
|
@@ -459,6 +460,13 @@ NO, absolutely not! We don't track any type of data about your website. We simpl
|
|
459 |
== Changelog ==
|
460 |
|
461 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
= PixelYourSite 8.2.5 =
|
463 |
|
464 |
* Facebook API update, Conversion API related.
|
4 |
Requires at least: 3.0.1
|
5 |
Requires PHP: 5.4
|
6 |
Tested up to: 5.8
|
7 |
+
Stable tag: 8.2.6
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
139 |
**EVEN MORE FEATURES WITH THE PRO VERSION:**
|
140 |
|
141 |
|
142 |
+
[PixelYourSite Pro](https://www.pixelyoursite.com/) is used by thousands of businesses already and will offer you some extraordinary features.
|
143 |
+
|
144 |
+
|
145 |
+
Full PixelYourSite Professional and **CartFlows** integration: [watch video for details](https://www.pixelyoursite.com/cartflows-and-pixelyoursite)
|
146 |
|
147 |
|
148 |
|
460 |
== Changelog ==
|
461 |
|
462 |
|
463 |
+
= PixelYourSite 8.2.6 =
|
464 |
+
|
465 |
+
* UI update to reflect the [new integration with CartFlows available in PixelYourSite Professional](https://www.pixelyoursite.com/cartflows-and-pixelyoursite)
|
466 |
+
* WordPress 5.8 compatibility check
|
467 |
+
|
468 |
+
|
469 |
+
|
470 |
= PixelYourSite 8.2.5 =
|
471 |
|
472 |
* Facebook API update, Conversion API related.
|