PixelYourSite – Facebook Pixel (Events, WooCommerce & Easy Digital Downloads) - Version 8.0.7

Version Description

Download this release

Release Info

Developer PixelYourSite
Plugin Icon 128x128 PixelYourSite – Facebook Pixel (Events, WooCommerce & Easy Digital Downloads)
Version 8.0.7
Comparing to
See all releases

Code changes from version 8.0.6 to 8.0.7

dist/scripts/public.js CHANGED
@@ -243,6 +243,9 @@ if (!Array.prototype.includes) {
243
  // Clone all object members to another and return it
244
  copyProperties: function (from, to) {
245
  for (var key in from) {
 
 
 
246
  to[key] = from[key];
247
  }
248
  return to;
@@ -265,6 +268,9 @@ if (!Array.prototype.includes) {
265
  if (obj instanceof Array) {
266
  copy = [];
267
  for (var i = 0, len = obj.length; i < len; i++) {
 
 
 
268
  copy[i] = Utils.clone(obj[i]);
269
  }
270
  return copy;
@@ -274,7 +280,12 @@ if (!Array.prototype.includes) {
274
  if (obj instanceof Object) {
275
  copy = {};
276
  for (var attr in obj) {
277
- if (obj.hasOwnProperty(attr)) copy[attr] = Utils.clone(obj[attr]);
 
 
 
 
 
278
  }
279
  return copy;
280
  }
@@ -985,12 +996,15 @@ if (!Array.prototype.includes) {
985
  if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag()))
986
  return;
987
  var event = Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);
 
 
 
 
 
988
  if (window.pysWooProductData.hasOwnProperty(product_id)) {
989
  if (window.pysWooProductData[product_id].hasOwnProperty('facebook')) {
990
 
991
- if (product_type === Utils.PRODUCT_VARIABLE && !options.facebook.wooVariableAsSimple) {
992
- product_id = parseInt($form.find('input[name="variation_id"]').val());
993
- }
994
  Utils.copyProperties(window.pysWooProductData[product_id]['facebook'].params, event.params);
995
 
996
  var groupValue = 0;
@@ -1335,7 +1349,7 @@ if (!Array.prototype.includes) {
1335
  return;
1336
  var event = Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);
1337
 
1338
- if (product_type === Utils.PRODUCT_VARIABLE) {
1339
  product_id = parseInt($form.find('input[name="variation_id"]').val());
1340
  }
1341
 
@@ -1484,7 +1498,7 @@ if (!Array.prototype.includes) {
1484
  var isFired = false;
1485
  var pixels = Object.keys(options.dynamicEvents.signal_page_scroll);
1486
 
1487
- for(i = 0;i<pixels.length;i++) {
1488
  var event = Utils.clone(options.dynamicEvents.signal_page_scroll[pixels[i]]);
1489
  var scroll = Math.round(docHeight * event.scroll_percent / 100)// convert % to absolute positions
1490
 
@@ -1505,7 +1519,7 @@ if (!Array.prototype.includes) {
1505
  var pixels = Object.keys(options.dynamicEvents.signal_time_on_page);
1506
  var time = options.dynamicEvents.signal_time_on_page[pixels[0]].time_on_page; // the same for all pixel
1507
  setTimeout(function(){
1508
- for(i = 0;i<pixels.length;i++) {
1509
  var event = Utils.clone(options.dynamicEvents.signal_time_on_page[pixels[i]]);
1510
  Utils.copyProperties(Utils.getRequestParams(), event.params);
1511
  getPixelBySlag(pixels[i]).onTime(event);
@@ -1534,7 +1548,7 @@ if (!Array.prototype.includes) {
1534
 
1535
  if (extension.length > 0) {
1536
  var pixels = Object.keys(options.dynamicEvents.signal_download);
1537
- for (i = 0; i < pixels.length; i++) {
1538
  var event = Utils.clone(options.dynamicEvents.signal_download[pixels[i]]);
1539
  var extensions = event.extensions;
1540
  if (extensions.includes(extension)) {
@@ -1606,7 +1620,8 @@ if (!Array.prototype.includes) {
1606
  });
1607
 
1608
  // Single Product
1609
- $('button.single_add_to_cart_button,.single_add_to_cart_button').onFirst('click tap',function (e) {
 
1610
 
1611
  var $button = $(this);
1612
 
@@ -1805,7 +1820,7 @@ if (!Array.prototype.includes) {
1805
  $('form.comment-form').on("submit",function () {
1806
 
1807
  var pixels = Object.keys(options.dynamicEvents.signal_comment);
1808
- for(i = 0;i<pixels.length;i++) {
1809
  var event = Utils.clone(options.dynamicEvents.signal_comment[pixels[i]]);
1810
  Utils.copyProperties(Utils.getRequestParams(), event.params);
1811
  getPixelBySlag(pixels[i]).onCommentEvent(event);
@@ -1845,7 +1860,7 @@ if (!Array.prototype.includes) {
1845
  $form.find('[type="submit"]').val() : $form.find('[type="submit"]').text()
1846
  };
1847
  var pixels = Object.keys(options.dynamicEvents.signal_form);
1848
- for(i = 0;i<pixels.length;i++) {
1849
  var event = Utils.clone(options.dynamicEvents.signal_form[pixels[i]]);
1850
  Utils.copyProperties(params,event.params,)
1851
  Utils.copyProperties(Utils.getRequestParams(), event.params);
@@ -1861,7 +1876,7 @@ if (!Array.prototype.includes) {
1861
  };
1862
 
1863
  var pixels = Object.keys(options.dynamicEvents.signal_form);
1864
- for(i = 0;i<pixels.length;i++) {
1865
  var event = Utils.clone(options.dynamicEvents.signal_form[pixels[i]]);
1866
  Utils.copyProperties(params,event.params)
1867
  Utils.copyProperties(Utils.getRequestParams(), event.params);
@@ -1878,7 +1893,7 @@ if (!Array.prototype.includes) {
1878
  };
1879
 
1880
  var pixels = Object.keys(options.dynamicEvents.signal_form);
1881
- for(i = 0;i<pixels.length;i++) {
1882
  var event = Utils.clone(options.dynamicEvents.signal_form[pixels[i]]);
1883
  Utils.copyProperties(params,event.params)
1884
  Utils.copyProperties(Utils.getRequestParams(), event.params);
243
  // Clone all object members to another and return it
244
  copyProperties: function (from, to) {
245
  for (var key in from) {
246
+ if("function" == typeof from[key]) {
247
+ continue;
248
+ }
249
  to[key] = from[key];
250
  }
251
  return to;
268
  if (obj instanceof Array) {
269
  copy = [];
270
  for (var i = 0, len = obj.length; i < len; i++) {
271
+ if("function" == typeof obj[i]) {
272
+ continue;
273
+ }
274
  copy[i] = Utils.clone(obj[i]);
275
  }
276
  return copy;
280
  if (obj instanceof Object) {
281
  copy = {};
282
  for (var attr in obj) {
283
+ if (obj.hasOwnProperty(attr)) {
284
+ if("function" == typeof obj[attr]) {
285
+ continue;
286
+ }
287
+ copy[attr] = Utils.clone(obj[attr]);
288
+ }
289
  }
290
  return copy;
291
  }
996
  if(!options.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag()))
997
  return;
998
  var event = Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);
999
+
1000
+ if (product_type === Utils.PRODUCT_VARIABLE && !options.facebook.wooVariableAsSimple) {
1001
+ product_id = parseInt($form.find('input[name="variation_id"]').val());
1002
+ }
1003
+
1004
  if (window.pysWooProductData.hasOwnProperty(product_id)) {
1005
  if (window.pysWooProductData[product_id].hasOwnProperty('facebook')) {
1006
 
1007
+
 
 
1008
  Utils.copyProperties(window.pysWooProductData[product_id]['facebook'].params, event.params);
1009
 
1010
  var groupValue = 0;
1349
  return;
1350
  var event = Utils.clone(options.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);
1351
 
1352
+ if (product_type === Utils.PRODUCT_VARIABLE && !options.ga.wooVariableAsSimple) {
1353
  product_id = parseInt($form.find('input[name="variation_id"]').val());
1354
  }
1355
 
1498
  var isFired = false;
1499
  var pixels = Object.keys(options.dynamicEvents.signal_page_scroll);
1500
 
1501
+ for(var i = 0;i<pixels.length;i++) {
1502
  var event = Utils.clone(options.dynamicEvents.signal_page_scroll[pixels[i]]);
1503
  var scroll = Math.round(docHeight * event.scroll_percent / 100)// convert % to absolute positions
1504
 
1519
  var pixels = Object.keys(options.dynamicEvents.signal_time_on_page);
1520
  var time = options.dynamicEvents.signal_time_on_page[pixels[0]].time_on_page; // the same for all pixel
1521
  setTimeout(function(){
1522
+ for(var i = 0;i<pixels.length;i++) {
1523
  var event = Utils.clone(options.dynamicEvents.signal_time_on_page[pixels[i]]);
1524
  Utils.copyProperties(Utils.getRequestParams(), event.params);
1525
  getPixelBySlag(pixels[i]).onTime(event);
1548
 
1549
  if (extension.length > 0) {
1550
  var pixels = Object.keys(options.dynamicEvents.signal_download);
1551
+ for (var i = 0; i < pixels.length; i++) {
1552
  var event = Utils.clone(options.dynamicEvents.signal_download[pixels[i]]);
1553
  var extensions = event.extensions;
1554
  if (extensions.includes(extension)) {
1620
  });
1621
 
1622
  // Single Product
1623
+ // tap try to https://stackoverflow.com/questions/30990967/on-tap-click-event-firing-twice-how-to-avoid-it
1624
+ $('button.single_add_to_cart_button,.single_add_to_cart_button').onFirst('click',function (e) {
1625
 
1626
  var $button = $(this);
1627
 
1820
  $('form.comment-form').on("submit",function () {
1821
 
1822
  var pixels = Object.keys(options.dynamicEvents.signal_comment);
1823
+ for(var i = 0;i<pixels.length;i++) {
1824
  var event = Utils.clone(options.dynamicEvents.signal_comment[pixels[i]]);
1825
  Utils.copyProperties(Utils.getRequestParams(), event.params);
1826
  getPixelBySlag(pixels[i]).onCommentEvent(event);
1860
  $form.find('[type="submit"]').val() : $form.find('[type="submit"]').text()
1861
  };
1862
  var pixels = Object.keys(options.dynamicEvents.signal_form);
1863
+ for(var i = 0;i<pixels.length;i++) {
1864
  var event = Utils.clone(options.dynamicEvents.signal_form[pixels[i]]);
1865
  Utils.copyProperties(params,event.params,)
1866
  Utils.copyProperties(Utils.getRequestParams(), event.params);
1876
  };
1877
 
1878
  var pixels = Object.keys(options.dynamicEvents.signal_form);
1879
+ for(var i = 0;i<pixels.length;i++) {
1880
  var event = Utils.clone(options.dynamicEvents.signal_form[pixels[i]]);
1881
  Utils.copyProperties(params,event.params)
1882
  Utils.copyProperties(Utils.getRequestParams(), event.params);
1893
  };
1894
 
1895
  var pixels = Object.keys(options.dynamicEvents.signal_form);
1896
+ for(var i = 0;i<pixels.length;i++) {
1897
  var event = Utils.clone(options.dynamicEvents.signal_form[pixels[i]]);
1898
  Utils.copyProperties(params,event.params)
1899
  Utils.copyProperties(Utils.getRequestParams(), event.params);
facebook-pixel-master.php CHANGED
@@ -3,8 +3,8 @@
3
  /**
4
  * Plugin Name: PixelYourSite
5
  * Plugin URI: http://www.pixelyoursite.com/
6
- * Description: No codding <strong>Facebook Pixel</strong> and <strong>Google Analytics</strong> install. Track key actions with our Global Events, 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.
7
- * Version: 8.0.6
8
  * Author: PixelYourSite
9
  * Author URI: http://www.pixelyoursite.com
10
  * License: GPLv3
3
  /**
4
  * Plugin Name: PixelYourSite
5
  * Plugin URI: http://www.pixelyoursite.com/
6
+ * Description: No codding <strong>Facebook Pixel</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. Facebook Conversion API (CAPI) support.
7
+ * Version: 8.0.7
8
  * Author: PixelYourSite
9
  * Author URI: http://www.pixelyoursite.com
10
  * License: GPLv3
includes/views/html-main-general.php CHANGED
@@ -41,7 +41,7 @@ if ( ! defined( 'ABSPATH' ) ) {
41
  <h4 class="label">Conversion API (recommended):</h4>
42
  <?php Facebook()->render_checkbox_input(
43
  "use_server_api",
44
- "Send events directly from your web server to Facebook through the Conversion API. This can help you capture more events. An access token is required to use the server-side API. <a href='https://www.pixelyoursite.com/documentation/configure-server-side-events' target='_blank'>Generate Access Token</a>"
45
  ); ?>
46
  <?php Facebook()->render_checkbox_input("server_event_use_ajax","Use Ajax when conversion API is enabled. Keep this option active if you use a cache");?>
47
  <?php Facebook()->render_text_area_array_item("server_access_api_token","Api token") ?>
41
  <h4 class="label">Conversion API (recommended):</h4>
42
  <?php Facebook()->render_checkbox_input(
43
  "use_server_api",
44
+ "Send events directly from your web server to Facebook through the Conversion API. This can help you capture more events. An access token is required to use the server-side API. <a href='https://www.pixelyoursite.com/facebook-conversion-api-capi' target='_blank'>Learn how to generate the token and how to test Conversion API</a>"
45
  ); ?>
46
  <?php Facebook()->render_checkbox_input("server_event_use_ajax","Use Ajax when conversion API is enabled. Keep this option active if you use a cache");?>
47
  <?php Facebook()->render_text_area_array_item("server_access_api_token","Api token") ?>
modules/google_analytics/ga.php CHANGED
@@ -103,7 +103,8 @@ class GA extends Settings implements Pixel {
103
  'isDebugEnabled' => $this->getPixelDebugMode(),
104
  'isUse4Version' => $this->isUse4Version(),
105
  'disableAdvertisingFeatures' => $this->getOption( 'disable_advertising_features' ),
106
- 'disableAdvertisingPersonalization' => $this->getOption( 'disable_advertising_personalization' )
 
107
  );
108
 
109
  }
103
  'isDebugEnabled' => $this->getPixelDebugMode(),
104
  'isUse4Version' => $this->isUse4Version(),
105
  'disableAdvertisingFeatures' => $this->getOption( 'disable_advertising_features' ),
106
+ 'disableAdvertisingPersonalization' => $this->getOption( 'disable_advertising_personalization' ),
107
+ 'wooVariableAsSimple' => $this->getOption( 'woo_variable_as_simple' )
108
  );
109
 
110
  }
pixelyoursite.php CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
- define( 'PYS_FREE_VERSION', '8.0.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__ ) ) );
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
+ define( 'PYS_FREE_VERSION', '8.0.7' );
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
@@ -1,14 +1,14 @@
1
  ===PixelYourSite - Your smart PIXEL (TAG) Manager===
2
  Contributors: PixelYourSite, 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, Easy Digital Downloads Pixel, Easy Digital Downloads Google Analytics, Head & Footer scripts, Enhanced Ecommerce, Pinterest tag
4
  Requires at least: 3.0.1
5
  Requires PHP: 5.4
6
  Tested up to: 5.6
7
- Stable tag: 8.0.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
- Facebook Pixel, Google Analytics, plus ANY other script. WooCommerce and EDD with Facebook Dynamic Product Ads and Google Enhanced Ecommerce. Track any action with events. Pinterest Tag support via a free add-on. Dedicated paid Bing Tag add-on.
12
 
13
  == Description ==
14
  **Manage your Facebook Pixel or Google Analytics code with a single plugin and add ANY other script (Head & Footer feature). The Pinterest Tag can be implemented via [free add-on](https://www.pixelyoursite.com/pinterest-tag).**
@@ -23,7 +23,7 @@ Take a look at this video to see the plugin in action:
23
 
24
  [youtube https://www.youtube.com/watch?v=OUHU9lZ2lwQ]
25
 
26
- NEW: Facebook Pixel Conversion API: [Learn how to configure Conversion API events](https://www.pixelyoursite.com/documentation/configure-server-side-events)
27
 
28
  Learn how to [verify your domain on Facebook](https://www.pixelyoursite.com/verify-domain-facebook)
29
 
@@ -396,6 +396,20 @@ NO, absolutely not! We don't track any type of data about your website. We simpl
396
  == Changelog ==
397
 
398
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  = PixelYourSite 8.0.6 =
400
 
401
  * Fix: missing AddToCart IDs when "treat variable products like simple products" is enabled.
1
  ===PixelYourSite - Your smart PIXEL (TAG) Manager===
2
  Contributors: PixelYourSite, themister
3
+ Tags: Facebook Pixel, Facebook Conversion API, CAPI, 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, Easy Digital Downloads Pixel, Easy Digital Downloads Google Analytics, Head & Footer scripts, Enhanced Ecommerce, Pinterest tag
4
  Requires at least: 3.0.1
5
  Requires PHP: 5.4
6
  Tested up to: 5.6
7
+ Stable tag: 8.0.7
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
+ Facebook Pixel, Google Analytics, plus ANY other script. WooCommerce and EDD with Facebook Dynamic Product Ads and Google Enhanced Ecommerce. Track any action with events. Pinterest Tag support via a free add-on. Dedicated paid Bing Tag add-on. Facebook Conversion API (CAPI) support.
12
 
13
  == Description ==
14
  **Manage your Facebook Pixel or Google Analytics code with a single plugin and add ANY other script (Head & Footer feature). The Pinterest Tag can be implemented via [free add-on](https://www.pixelyoursite.com/pinterest-tag).**
23
 
24
  [youtube https://www.youtube.com/watch?v=OUHU9lZ2lwQ]
25
 
26
+ NEW: Facebook Pixel Conversion API: [Learn how to enable and test Conversion API events](https://www.pixelyoursite.com/facebook-conversion-api-capi)
27
 
28
  Learn how to [verify your domain on Facebook](https://www.pixelyoursite.com/verify-domain-facebook)
29
 
396
  == Changelog ==
397
 
398
 
399
+ = PixelYourSite 8.0.7 =
400
+
401
+ * Fix for a potential problem with AddToCart not being fired on single product pages.
402
+
403
+ * Fix for a potential problem with the AddToCart fired twice on single product pages.
404
+
405
+ * Fix for a potential problem with the mobile menu of the Porto theme.
406
+
407
+ * Fix for a potential conflict between the Bing add-on and a product filter plugin.
408
+
409
+ * Update for the [Facebook CAPI help link](https://www.pixelyoursite.com/facebook-conversion-api-capi) inside the plugin.
410
+
411
+
412
+
413
  = PixelYourSite 8.0.6 =
414
 
415
  * Fix: missing AddToCart IDs when "treat variable products like simple products" is enabled.