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

Version Description

Download this release

Release Info

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

Code changes from version 9.0.0 to 9.1.0

dist/scripts/public.js CHANGED
@@ -1357,7 +1357,7 @@ if (!Array.prototype.includes) {
1357
  let params = {
1358
  event_category: "Key Actions",
1359
  event_action: name,
1360
- // non_interaction: param.non_interaction,
1361
  }
1362
  return params;
1363
  }
@@ -1365,7 +1365,7 @@ if (!Array.prototype.includes) {
1365
  let params = {
1366
  event_category: "Key Actions",
1367
  event_action: name,
1368
- // non_interaction: param.non_interaction,
1369
  }
1370
  var formClass = (typeof param.form_class != 'undefined') ? 'class: ' + param.form_class : '';
1371
  if(formClass != "") {
@@ -1378,7 +1378,7 @@ if (!Array.prototype.includes) {
1378
  event_category: "Key Actions",
1379
  event_action: name,
1380
  event_label: param.download_name,
1381
- // non_interaction: param.non_interaction,
1382
  }
1383
  return params;
1384
  }
@@ -1388,7 +1388,7 @@ if (!Array.prototype.includes) {
1388
  event_category: "Key Actions",
1389
  event_action: name,
1390
  event_label: document.title,
1391
- // non_interaction: param.non_interaction,
1392
  }
1393
  return params;
1394
  }
@@ -1397,109 +1397,10 @@ if (!Array.prototype.includes) {
1397
  event_category: "Key Actions",
1398
  event_action: name,
1399
  event_label: param.search_term,
1400
- // non_interaction: param.non_interaction,
1401
  }
1402
  return params;
1403
  }
1404
-
1405
- case 'Signal': {
1406
- switch (param.event_action) {
1407
- case 'External Click':
1408
- case 'Internal Click':
1409
- case 'Tel':
1410
- case 'Email': {
1411
- let params = {
1412
- event_category: name,
1413
- event_action: param.event_action,
1414
- non_interaction: param.non_interaction,
1415
- }
1416
- if(options.trackTrafficSource) {
1417
- params['traffic_source'] = param.traffic_source
1418
- }
1419
- return params;
1420
- }break;
1421
- case 'Video': {
1422
- let params = {
1423
- event_category: name,
1424
- event_action: param.event_action,
1425
- event_label: param.video_title,
1426
- non_interaction: param.non_interaction,
1427
- }
1428
- if(options.trackTrafficSource) {
1429
- params['traffic_source'] = param.traffic_source
1430
- }
1431
- return params;
1432
- }break;
1433
- case 'Comment': {
1434
- let params = {
1435
- event_category: name,
1436
- event_action: param.event_action,
1437
- event_label: document.location.href,
1438
- non_interaction: param.non_interaction,
1439
- }
1440
- if(options.trackTrafficSource) {
1441
- params['traffic_source'] = param.traffic_source
1442
- }
1443
- return params;
1444
- }break;
1445
- case 'Form': {
1446
- var params = {
1447
- event_category: name,
1448
- event_action: param.event_action,
1449
- non_interaction: param.non_interaction,
1450
- };
1451
- if(options.trackTrafficSource) {
1452
- params['traffic_source'] = param.traffic_source
1453
- }
1454
- var formClass = (typeof param.form_class != 'undefined') ? 'class: ' + param.form_class : '';
1455
- if(formClass != "") {
1456
- params["event_label"] = formClass;
1457
- }
1458
- return params;
1459
- }break;
1460
- case 'Download': {
1461
- return {
1462
- event_category: name,
1463
- event_action: param.event_action,
1464
- event_label: param.download_name,
1465
- non_interaction: param.non_interaction,
1466
- }
1467
- }break;
1468
- }
1469
- if(param.event_action.indexOf('Scroll') === 0){
1470
- var scroll_percent = param.event_action.substring(
1471
- param.event_action.indexOf(' ')+1,
1472
- param.event_action.indexOf('%')
1473
- );
1474
- let params = {
1475
- event_category: name,
1476
- event_action: param.event_action,
1477
- event_label: scroll_percent,
1478
- non_interaction: param.non_interaction,
1479
- }
1480
- if(options.trackTrafficSource) {
1481
- params['traffic_source'] = param.traffic_source
1482
- }
1483
- return params;
1484
- }
1485
- if(param.event_action.indexOf('Time on page') === 0) {
1486
- let time_on_page = param.event_action.substring(
1487
- 14,
1488
- param.event_action.indexOf(' seconds')
1489
- );
1490
- let params = {
1491
- event_category: name,
1492
- event_action: param.event_action,
1493
- event_label: time_on_page,
1494
- non_interaction: param.non_interaction,
1495
-
1496
- };
1497
- if(options.trackTrafficSource) {
1498
- params['traffic_source'] = param.traffic_source
1499
- }
1500
- return params
1501
- }
1502
- }
1503
  }
1504
 
1505
  //delete standard params
@@ -1784,8 +1685,7 @@ if (!Array.prototype.includes) {
1784
 
1785
  Utils.setupGdprCallbacks();
1786
  // page scroll event
1787
- if (options.dynamicEvents.hasOwnProperty("signal_page_scroll")
1788
- || options.dynamicEvents.hasOwnProperty("automatic_event_scroll")
1789
  ) {
1790
 
1791
  var singlePageScroll = function () {
@@ -1793,19 +1693,7 @@ if (!Array.prototype.includes) {
1793
 
1794
  var docHeight = $(document).height() - $(window).height();
1795
  var isFired = false;
1796
- if (options.dynamicEvents.hasOwnProperty("signal_page_scroll")) {
1797
- var pixels = Object.keys(options.dynamicEvents.signal_page_scroll);
1798
- for(var i = 0;i<pixels.length;i++) {
1799
- var event = Utils.clone(options.dynamicEvents.signal_page_scroll[pixels[i]]);
1800
- var scroll = Math.round(docHeight * event.scroll_percent / 100)// convert % to absolute positions
1801
 
1802
- if(scroll < $(window).scrollTop()) {
1803
- Utils.copyProperties(Utils.getRequestParams(), event.params);
1804
- getPixelBySlag(pixels[i]).onPageScroll(event);
1805
- isFired = true
1806
- }
1807
- }
1808
- }
1809
  if (options.dynamicEvents.hasOwnProperty("automatic_event_scroll")) {
1810
  var pixels = Object.keys(options.dynamicEvents.automatic_event_scroll);
1811
  for(var i = 0;i<pixels.length;i++) {
@@ -1826,17 +1714,6 @@ if (!Array.prototype.includes) {
1826
  $(document).on("scroll",singlePageScroll);
1827
  }
1828
 
1829
- if (options.dynamicEvents.hasOwnProperty("signal_time_on_page")) {
1830
- var pixels = Object.keys(options.dynamicEvents.signal_time_on_page);
1831
- var time = options.dynamicEvents.signal_time_on_page[pixels[0]].time_on_page; // the same for all pixel
1832
- setTimeout(function(){
1833
- for(var i = 0;i<pixels.length;i++) {
1834
- var event = Utils.clone(options.dynamicEvents.signal_time_on_page[pixels[i]]);
1835
- Utils.copyProperties(Utils.getRequestParams(), event.params);
1836
- getPixelBySlag(pixels[i]).onTime(event);
1837
- }
1838
- },time*1000);
1839
- }
1840
 
1841
  if (options.dynamicEvents.hasOwnProperty("automatic_event_time_on_page")) {
1842
  var pixels = Object.keys(options.dynamicEvents.automatic_event_time_on_page);
@@ -1851,17 +1728,14 @@ if (!Array.prototype.includes) {
1851
  }
1852
 
1853
  // setup Click Event
1854
- if (options.dynamicEvents.hasOwnProperty("automatic_event_download") ||
1855
- options.dynamicEvents.hasOwnProperty("signal_download")) {
1856
 
1857
  $(document).onFirst('click', 'a, button, input[type="button"], input[type="submit"]', function (e) {
1858
 
1859
  var $elem = $(this);
1860
 
1861
  // Download
1862
- if(
1863
- options.dynamicEvents.hasOwnProperty("signal_download")
1864
- || options.dynamicEvents.hasOwnProperty("automatic_event_download")
1865
  ) {
1866
  var isFired = false;
1867
  if ($elem.is('a')) {
@@ -1874,24 +1748,7 @@ if (!Array.prototype.includes) {
1874
  var track_download = false;
1875
 
1876
  if (extension.length > 0) {
1877
- if(options.dynamicEvents.hasOwnProperty("signal_download") ) {
1878
- var pixels = Object.keys(options.dynamicEvents.signal_download);
1879
- for (var i = 0; i < pixels.length; i++) {
1880
- var event = Utils.clone(options.dynamicEvents.signal_download[pixels[i]]);
1881
- var extensions = event.extensions;
1882
- if (extensions.includes(extension)) {
1883
- if (options.enable_remove_download_url_param) {
1884
- href = href.split('?')[0];
1885
- }
1886
- event.params.download_url = href;
1887
- event.params.download_type = extension;
1888
- event.params.download_name = Utils.getLinkFilename(href);
1889
 
1890
- getPixelBySlag(pixels[i]).onDownloadEvent(event);
1891
- isFired = true;
1892
- }
1893
- }
1894
- }
1895
  if(options.dynamicEvents.hasOwnProperty("automatic_event_download") ) {
1896
  var pixels = Object.keys(options.dynamicEvents.automatic_event_download);
1897
  for (var i = 0; i < pixels.length; i++) {
@@ -2160,13 +2017,13 @@ if (!Array.prototype.includes) {
2160
  $('form#edd_checkout_cart_form .edd_cart_remove_item_btn').on("click",function (e) {
2161
 
2162
  var href = $(this).attr('href');
2163
- var key = href.substring(href.indexOf('=') + 1).charAt(0);
2164
-
2165
- if (options.dynamicEvents.edd_remove_from_cart.hasOwnProperty(key)) {
2166
- var events = options.dynamicEvents.edd_remove_from_cart[key];
2167
- Utils.fireEventForAllPixel("onEddRemoveFromCartEvent",events)
 
2168
  }
2169
-
2170
  });
2171
 
2172
  }
@@ -2174,19 +2031,10 @@ if (!Array.prototype.includes) {
2174
  }
2175
 
2176
  // setup Comment Event
2177
- if (options.dynamicEvents.hasOwnProperty("signal_comment")
2178
- || options.dynamicEvents.hasOwnProperty("automatic_event_comment")
2179
  ) {
2180
 
2181
  $('form.comment-form').on("submit",function () {
2182
- if (options.dynamicEvents.hasOwnProperty("signal_comment")) {
2183
- var pixels = Object.keys(options.dynamicEvents.signal_comment);
2184
- for (var i = 0; i < pixels.length; i++) {
2185
- var event = Utils.clone(options.dynamicEvents.signal_comment[pixels[i]]);
2186
- Utils.copyProperties(Utils.getRequestParams(), event.params);
2187
- getPixelBySlag(pixels[i]).onCommentEvent(event);
2188
- }
2189
- }
2190
  if (options.dynamicEvents.hasOwnProperty("automatic_event_comment")) {
2191
  var pixels = Object.keys(options.dynamicEvents.automatic_event_comment);
2192
  for (var i = 0; i < pixels.length; i++) {
@@ -2201,8 +2049,7 @@ if (!Array.prototype.includes) {
2201
 
2202
 
2203
  // setup Form Event
2204
- if ( options.dynamicEvents.hasOwnProperty("signal_form")
2205
- || options.dynamicEvents.hasOwnProperty("automatic_event_form")) {
2206
 
2207
  $(document).onFirst('submit', 'form', function (e) {
2208
 
@@ -2230,16 +2077,7 @@ if (!Array.prototype.includes) {
2230
  text: $form.find('[type="submit"]').is('input') ?
2231
  $form.find('[type="submit"]').val() : $form.find('[type="submit"]').text()
2232
  };
2233
- if(options.dynamicEvents.hasOwnProperty("signal_form") ) {
2234
- var pixels = Object.keys(options.dynamicEvents.signal_form);
2235
- for (var i = 0; i < pixels.length; i++) {
2236
- var event = Utils.clone(options.dynamicEvents.signal_form[pixels[i]]);
2237
- Utils.copyProperties(params, event.params,)
2238
- Utils.copyProperties(Utils.getRequestParams(), event.params);
2239
- getPixelBySlag(pixels[i]).onFormEvent(event);
2240
 
2241
- }
2242
- }
2243
  if(options.dynamicEvents.hasOwnProperty("automatic_event_form") ) {
2244
  var pixels = Object.keys(options.dynamicEvents.automatic_event_form);
2245
  for (var i = 0; i < pixels.length; i++) {
@@ -2262,15 +2100,7 @@ if (!Array.prototype.includes) {
2262
  form_id: $(formData.target).find('input[name="form_id"]').val(),
2263
  text: $(formData.target).find('.forminator-button-submit').text()
2264
  };
2265
- if(options.dynamicEvents.hasOwnProperty("signal_form") ) {
2266
- var pixels = Object.keys(options.dynamicEvents.signal_form);
2267
- for (var i = 0; i < pixels.length; i++) {
2268
- var event = Utils.clone(options.dynamicEvents.signal_form[pixels[i]]);
2269
- Utils.copyProperties(params, event.params)
2270
- Utils.copyProperties(Utils.getRequestParams(), event.params);
2271
- getPixelBySlag(pixels[i]).onFormEvent(event);
2272
- }
2273
- }
2274
  if(options.dynamicEvents.hasOwnProperty("automatic_event_form") ) {
2275
  var pixels = Object.keys(options.dynamicEvents.automatic_event_form);
2276
  for (var i = 0; i < pixels.length; i++) {
@@ -2289,15 +2119,7 @@ if (!Array.prototype.includes) {
2289
  form_id: data.response.data.form_id,
2290
  text: data.response.data.settings.title
2291
  };
2292
- if(options.dynamicEvents.hasOwnProperty("signal_form") ) {
2293
- var pixels = Object.keys(options.dynamicEvents.signal_form);
2294
- for(var i = 0;i<pixels.length;i++) {
2295
- var event = options.dynamicEvents.signal_form[pixels[i]];
2296
- Utils.copyProperties(params,event.params)
2297
- Utils.copyProperties(Utils.getRequestParams(), event.params);
2298
- getPixelBySlag(pixels[i]).onFormEvent(event);
2299
- }
2300
- }
2301
  if(options.dynamicEvents.hasOwnProperty("automatic_event_form") ) {
2302
  var pixels = Object.keys(options.dynamicEvents.automatic_event_form);
2303
  for(var i = 0;i<pixels.length;i++) {
1357
  let params = {
1358
  event_category: "Key Actions",
1359
  event_action: name,
1360
+ non_interaction: param.non_interaction,
1361
  }
1362
  return params;
1363
  }
1365
  let params = {
1366
  event_category: "Key Actions",
1367
  event_action: name,
1368
+ non_interaction: param.non_interaction,
1369
  }
1370
  var formClass = (typeof param.form_class != 'undefined') ? 'class: ' + param.form_class : '';
1371
  if(formClass != "") {
1378
  event_category: "Key Actions",
1379
  event_action: name,
1380
  event_label: param.download_name,
1381
+ non_interaction: param.non_interaction,
1382
  }
1383
  return params;
1384
  }
1388
  event_category: "Key Actions",
1389
  event_action: name,
1390
  event_label: document.title,
1391
+ non_interaction: param.non_interaction,
1392
  }
1393
  return params;
1394
  }
1397
  event_category: "Key Actions",
1398
  event_action: name,
1399
  event_label: param.search_term,
1400
+ non_interaction: param.non_interaction,
1401
  }
1402
  return params;
1403
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1404
  }
1405
 
1406
  //delete standard params
1685
 
1686
  Utils.setupGdprCallbacks();
1687
  // page scroll event
1688
+ if ( options.dynamicEvents.hasOwnProperty("automatic_event_scroll")
 
1689
  ) {
1690
 
1691
  var singlePageScroll = function () {
1693
 
1694
  var docHeight = $(document).height() - $(window).height();
1695
  var isFired = false;
 
 
 
 
 
1696
 
 
 
 
 
 
 
 
1697
  if (options.dynamicEvents.hasOwnProperty("automatic_event_scroll")) {
1698
  var pixels = Object.keys(options.dynamicEvents.automatic_event_scroll);
1699
  for(var i = 0;i<pixels.length;i++) {
1714
  $(document).on("scroll",singlePageScroll);
1715
  }
1716
 
 
 
 
 
 
 
 
 
 
 
 
1717
 
1718
  if (options.dynamicEvents.hasOwnProperty("automatic_event_time_on_page")) {
1719
  var pixels = Object.keys(options.dynamicEvents.automatic_event_time_on_page);
1728
  }
1729
 
1730
  // setup Click Event
1731
+ if (options.dynamicEvents.hasOwnProperty("automatic_event_download")) {
 
1732
 
1733
  $(document).onFirst('click', 'a, button, input[type="button"], input[type="submit"]', function (e) {
1734
 
1735
  var $elem = $(this);
1736
 
1737
  // Download
1738
+ if(options.dynamicEvents.hasOwnProperty("automatic_event_download")
 
 
1739
  ) {
1740
  var isFired = false;
1741
  if ($elem.is('a')) {
1748
  var track_download = false;
1749
 
1750
  if (extension.length > 0) {
 
 
 
 
 
 
 
 
 
 
 
 
1751
 
 
 
 
 
 
1752
  if(options.dynamicEvents.hasOwnProperty("automatic_event_download") ) {
1753
  var pixels = Object.keys(options.dynamicEvents.automatic_event_download);
1754
  for (var i = 0; i < pixels.length; i++) {
2017
  $('form#edd_checkout_cart_form .edd_cart_remove_item_btn').on("click",function (e) {
2018
 
2019
  var href = $(this).attr('href');
2020
+ if(href) {
2021
+ var key = href.substring(href.indexOf('=') + 1).charAt(0);
2022
+ if (options.dynamicEvents.edd_remove_from_cart.hasOwnProperty(key)) {
2023
+ var events = options.dynamicEvents.edd_remove_from_cart[key];
2024
+ Utils.fireEventForAllPixel("onEddRemoveFromCartEvent",events)
2025
+ }
2026
  }
 
2027
  });
2028
 
2029
  }
2031
  }
2032
 
2033
  // setup Comment Event
2034
+ if (options.dynamicEvents.hasOwnProperty("automatic_event_comment")
 
2035
  ) {
2036
 
2037
  $('form.comment-form').on("submit",function () {
 
 
 
 
 
 
 
 
2038
  if (options.dynamicEvents.hasOwnProperty("automatic_event_comment")) {
2039
  var pixels = Object.keys(options.dynamicEvents.automatic_event_comment);
2040
  for (var i = 0; i < pixels.length; i++) {
2049
 
2050
 
2051
  // setup Form Event
2052
+ if ( options.dynamicEvents.hasOwnProperty("automatic_event_form")) {
 
2053
 
2054
  $(document).onFirst('submit', 'form', function (e) {
2055
 
2077
  text: $form.find('[type="submit"]').is('input') ?
2078
  $form.find('[type="submit"]').val() : $form.find('[type="submit"]').text()
2079
  };
 
 
 
 
 
 
 
2080
 
 
 
2081
  if(options.dynamicEvents.hasOwnProperty("automatic_event_form") ) {
2082
  var pixels = Object.keys(options.dynamicEvents.automatic_event_form);
2083
  for (var i = 0; i < pixels.length; i++) {
2100
  form_id: $(formData.target).find('input[name="form_id"]').val(),
2101
  text: $(formData.target).find('.forminator-button-submit').text()
2102
  };
2103
+
 
 
 
 
 
 
 
 
2104
  if(options.dynamicEvents.hasOwnProperty("automatic_event_form") ) {
2105
  var pixels = Object.keys(options.dynamicEvents.automatic_event_form);
2106
  for (var i = 0; i < pixels.length; i++) {
2119
  form_id: data.response.data.form_id,
2120
  text: data.response.data.settings.title
2121
  };
2122
+
 
 
 
 
 
 
 
 
2123
  if(options.dynamicEvents.hasOwnProperty("automatic_event_form") ) {
2124
  var pixels = Object.keys(options.dynamicEvents.automatic_event_form);
2125
  for(var i = 0;i<pixels.length;i++) {
facebook-pixel-master.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: PixelYourSite
5
  * Plugin URI: http://www.pixelyoursite.com/
6
  * Description: No coding <strong>Meta Pixel (formerly Facebook Pixel), Facebook Converion API,</strong> and <strong>Google Analytics</strong> install. Track key actions with our Automated 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 paid 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: 9.0.0
8
  * Author: PixelYourSite
9
  * Author URI: http://www.pixelyoursite.com
10
  * License: GPLv3
4
  * Plugin Name: PixelYourSite
5
  * Plugin URI: http://www.pixelyoursite.com/
6
  * Description: No coding <strong>Meta Pixel (formerly Facebook Pixel), Facebook Converion API,</strong> and <strong>Google Analytics</strong> install. Track key actions with our Automated 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 paid 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: 9.1.0
8
  * Author: PixelYourSite
9
  * Author URI: http://www.pixelyoursite.com
10
  * License: GPLv3
includes/class-pys.php CHANGED
@@ -180,8 +180,7 @@ final class PYS extends Settings implements Plugin {
180
 
181
  public function userRegisterHandler( $user_id ) {
182
 
183
- if ( PYS()->getOption( 'signal_user_signup_enabled' )
184
- || PYS()->getOption( 'woo_complete_registration_enabled' )
185
  || PYS()->getOption( 'automatic_event_signup_enabled' )
186
  ) {
187
  update_user_meta( $user_id, 'pys_complete_registration', true );
180
 
181
  public function userRegisterHandler( $user_id ) {
182
 
183
+ if ( PYS()->getOption( 'woo_complete_registration_enabled' )
 
184
  || PYS()->getOption( 'automatic_event_signup_enabled' )
185
  ) {
186
  update_user_meta( $user_id, 'pys_complete_registration', true );
includes/events/class-events-signal.php DELETED
@@ -1,204 +0,0 @@
1
- <?php
2
- namespace PixelYourSite;
3
-
4
- /*
5
- * Signal Events we will fire this event in order to capture all actions like clicks, video
6
- views, downloads, comments, forms.
7
- * */
8
-
9
- class EventsSignal extends EventsFactory {
10
- private static $_instance;
11
-
12
- private $events = array(
13
- // 'signal_click' , pro
14
- // 'signal_watch_video',pro
15
- // 'signal_adsense' ,pro
16
- // 'signal_user_signup' ,pro
17
- 'signal_page_scroll' ,//Params: trigger: the percent that triggers the event
18
- 'signal_time_on_page' ,//Params: No specific parameters trigger: the time delay that triggers the event
19
- //'signal_tel' ,pro
20
- //'signal_email',pro
21
- 'signal_form' ,//Params: form_class, form_id, text (the current form_submit_label)
22
- 'signal_download' ,//Params: download_type, download_name, download_URL
23
- 'signal_comment' //Params: No specific parameters
24
- );
25
-
26
- public static function instance() {
27
-
28
- if ( is_null( self::$_instance ) ) {
29
- self::$_instance = new self();
30
- }
31
-
32
- return self::$_instance;
33
-
34
- }
35
-
36
- static function getSlug() {
37
- return "signal";
38
- }
39
-
40
- private function __construct() {
41
- add_filter("pys_event_factory",[$this,"register"]);
42
- }
43
-
44
- function register($list) {
45
- $list[] = $this;
46
- return $list;
47
- }
48
- function getEvents() {
49
- return $this->events;
50
- }
51
-
52
- function getCount() {
53
- $count = 0;
54
- if($this->isEnabled()) {
55
- foreach ($this->events as $event) {
56
- if(PYS()->getOption($event."_enabled")) {
57
- $count++;
58
- }
59
- }
60
- }
61
- return $count;
62
- }
63
-
64
-
65
- function isEnabled() {
66
- return PYS()->getOption("signal_events_enabled");
67
- }
68
-
69
- // return option for js part
70
- function getOptions() {
71
- return array(
72
- ""
73
- );
74
- }
75
-
76
- /**
77
- * Check is event ready for fire
78
- * @param $event
79
- * @return bool
80
- */
81
- function isReadyForFire($event) {
82
-
83
- if(!$this->isEnabled()) return false;
84
-
85
- if(!in_array($event,$this->events)) return false;
86
-
87
- switch($event) {
88
- case 'signal_user_signup' : {
89
- if ( PYS()->getOption( 'signal_user_signup_enabled' ) && $user_id = get_current_user_id() ) {
90
- if ( get_user_meta( $user_id, 'pys_complete_registration', true ) ) {
91
- return true;
92
- }
93
- }
94
- return false;
95
- }
96
- default: {
97
- return PYS()->getOption( $event."_enabled");
98
- }
99
- }
100
- }
101
-
102
- /**
103
- * @param String $event
104
- * @return SingleEvent
105
- */
106
- function getEvent($event) {
107
- $payload = array("name"=>'Signal');
108
- $params = array();
109
- switch ($event) {
110
- case "signal_download": {
111
- $params['event_action'] = 'Download';
112
- $payload["extensions"] = PYS()->getOption( 'download_event_extensions' );
113
- $item = new SingleEvent($event,EventTypes::$DYNAMIC,'signal');
114
- $item->addPayload($payload);
115
- $item->addParams($params);
116
- return $item;
117
- }
118
- case "signal_page_scroll": {
119
-
120
- $payload["scroll_percent"] = PYS()->getOption( 'signal_page_scroll_value' );
121
- $params['event_action'] = 'Scroll '. $payload["scroll_percent"]."%";
122
- $item = new SingleEvent($event,EventTypes::$DYNAMIC,'signal');
123
- $item->addPayload($payload);
124
- $item->addParams($params);
125
- return $item;
126
- }
127
- case "signal_time_on_page": {
128
- $payload["time_on_page"] = PYS()->getOption( 'signal_time_on_page_value' );
129
- $params['event_action'] = 'Time on page '.$payload["time_on_page"]." seconds";
130
- $item = new SingleEvent($event,EventTypes::$DYNAMIC,'signal');
131
- $item->addPayload($payload);
132
- $item->addParams($params);
133
- return $item;
134
- }
135
- case "signal_user_signup": {
136
- $params['event_action'] = 'User Signup';
137
- $item = new SingleEvent($event,EventTypes::$STATIC,'signal');
138
- $item->addPayload($payload);
139
- $item->addParams($params);
140
- return $item;
141
- }
142
-
143
- case "signal_watch_video": {
144
- $params['event_action'] = 'Video ';
145
- $item = new SingleEvent($event,EventTypes::$DYNAMIC,'signal');
146
- $item->addPayload($payload);
147
- $item->addParams($params);
148
- return $item;
149
- }
150
- case "signal_adsense": {
151
- $params['event_action'] = 'Adsense';
152
- $item = new SingleEvent($event,EventTypes::$DYNAMIC,'signal');
153
- $item->addPayload($payload);
154
- $item->addParams($params);
155
- return $item;
156
- }
157
- case "signal_tel": {
158
- $params['event_action'] = 'Tel';
159
- $item = new SingleEvent($event,EventTypes::$DYNAMIC,'signal');
160
- $item->addPayload($payload);
161
- $item->addParams($params);
162
- return $item;
163
- }
164
- case "signal_email": {
165
- $params['event_action'] = 'Email';
166
- $item = new SingleEvent($event,EventTypes::$DYNAMIC,'signal');
167
- $item->addPayload($payload);
168
- $item->addParams($params);
169
- return $item;
170
- }
171
- case "signal_form": {
172
- $params['event_action'] = 'Form';
173
- $item = new SingleEvent($event,EventTypes::$DYNAMIC,'signal');
174
- $item->addPayload($payload);
175
- $item->addParams($params);
176
- return $item;
177
- }
178
- case "signal_comment": {
179
- $params['event_action'] = 'Comment';
180
- $item = new SingleEvent($event,EventTypes::$DYNAMIC,'signal');
181
- $item->addPayload($payload);
182
- $item->addParams($params);
183
- return $item;
184
- }
185
-
186
- default:
187
- {
188
- $item = new SingleEvent($event, EventTypes::$DYNAMIC,'signal');
189
- $item->addPayload($payload);
190
- return $item;
191
- }
192
- }
193
- }
194
-
195
- }
196
-
197
- /**
198
- * @return EventsSignal
199
- */
200
- function EventsSignal() {
201
- return EventsSignal::instance();
202
- }
203
-
204
- EventsSignal();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/functions-migrate.php CHANGED
@@ -17,32 +17,36 @@ function maybeMigrate() {
17
  }
18
 
19
  $pys_free_7_version = get_option( 'pys_core_version', false );
20
- $v5_free = get_option( 'pixel_your_site' );
21
 
22
- if ($pys_free_7_version && version_compare($pys_free_7_version, '7.1.0', '<')) {
 
 
 
 
 
23
 
24
  migrate_7_1_0_bing_defaults();
25
 
26
  update_option( 'pys_core_version', PYS_FREE_VERSION );
27
  update_option( 'pys_updated_at', time() );
28
 
29
- } elseif ( ! $pys_free_7_version && is_array( $v5_free ) ) {
30
- // migrate from FREE 5.x
31
-
32
- migrate_v5_free_options();
33
- migrate_v5_free_events();
34
 
35
- update_option( 'pys_core_version', PYS_FREE_VERSION );
36
- update_option( 'pys_updated_at', time() );
37
-
38
- } elseif ( ! $pys_free_7_version ) {
39
- // first install
40
 
41
- update_option( 'pys_core_version', PYS_FREE_VERSION );
42
- update_option( 'pys_updated_at', time() );
43
-
44
- }
45
-
 
 
 
 
 
 
 
 
46
  }
47
 
48
  function migrate_7_1_0_bing_defaults() {
@@ -57,247 +61,3 @@ function migrate_7_1_0_bing_defaults() {
57
  PYS()->reloadOptions();
58
 
59
  }
60
-
61
- function migrate_v5_free_options() {
62
-
63
- $v5_free = get_option( 'pixel_your_site' );
64
-
65
- $v7_core = array(
66
- 'gdpr_facebook_prior_consent_enabled' => isset( $v5_free['gdpr']['enable_before_consent'] ) ? $v5_free['gdpr']['enable_before_consent'] : null,
67
- 'gdpr_cookiebot_integration_enabled' => isset( $v5_free['gdpr']['cookiebot_enabled'] ) ? $v5_free['gdpr']['cookiebot_enabled'] : null,
68
- 'general_event_name' => isset( $v5_free['general']['general_event_name'] ) ? $v5_free['general']['general_event_name'] : null,
69
- 'general_event_delay' => isset( $v5_free['general']['general_event_delay'] ) ? $v5_free['general']['general_event_delay'] : null,
70
- 'general_event_on_posts_enabled' => isset( $v5_free['general']['general_event_on_posts_enabled'] ) ? $v5_free['general']['general_event_on_posts_enabled'] : null,
71
- 'general_event_on_pages_enabled' => isset( $v5_free['general']['general_event_on_pages_enabled'] ) ? $v5_free['general']['general_event_on_pages_enabled'] : null,
72
- 'general_event_on_tax_enabled' => isset( $v5_free['general']['general_event_on_tax_enabled'] ) ? $v5_free['general']['general_event_on_tax_enabled'] : null,
73
-
74
- 'custom_events_enabled' => isset( $v5_free['std']['enabled'] ) ? $v5_free['std']['enabled'] : null,
75
-
76
- 'woo_enabled' => isset( $v5_free['woo']['enabled'] ) ? $v5_free['woo']['enabled'] : null,
77
- 'woo_add_to_cart_on_button_click' => isset( $v5_free['woo']['on_add_to_cart_btn'] ) ? $v5_free['woo']['on_add_to_cart_btn'] : null,
78
- 'woo_add_to_cart_on_cart_page' => isset( $v5_free['woo']['on_add_to_cart_page'] ) ? $v5_free['woo']['on_add_to_cart_page'] : null,
79
- 'woo_add_to_cart_on_checkout_page' => isset( $v5_free['woo']['on_add_to_cart_checkout'] ) ? $v5_free['woo']['on_add_to_cart_checkout'] : null,
80
-
81
- 'woo_purchase_value_option' => isset( $v5_free['woo']['purchase_value_option'] ) ? $v5_free['woo']['purchase_value_option'] : null,
82
- 'woo_purchase_value_global' => isset( $v5_free['woo']['purchase_global_value'] ) ? $v5_free['woo']['purchase_global_value'] : null,
83
- 'woo_initiate_checkout_value_enabled' => isset( $v5_free['woo']['enable_checkout_value'] ) ? $v5_free['woo']['enable_checkout_value'] : null,
84
- 'woo_initiate_checkout_value_option' => isset( $v5_free['woo']['checkout_value_option'] ) ? $v5_free['woo']['checkout_value_option'] : null,
85
- 'woo_initiate_checkout_value_global' => isset( $v5_free['woo']['checkout_global_value'] ) ? $v5_free['woo']['checkout_global_value'] : null,
86
- 'woo_add_to_cart_value_enabled' => isset( $v5_free['woo']['enable_add_to_cart_value'] ) ? $v5_free['woo']['enable_add_to_cart_value'] : null,
87
- 'woo_add_to_cart_value_option' => isset( $v5_free['woo']['add_to_cart_value_option'] ) ? $v5_free['woo']['add_to_cart_value_option'] : null,
88
- 'woo_add_to_cart_value_global' => isset( $v5_free['woo']['add_to_cart_global_value'] ) ? $v5_free['woo']['add_to_cart_global_value'] : null,
89
- 'woo_view_content_value_enabled' => isset( $v5_free['woo']['enable_view_content_value'] ) ? $v5_free['woo']['enable_view_content_value'] : null,
90
- 'woo_view_content_value_option' => isset( $v5_free['woo']['view_content_value_option'] ) ? $v5_free['woo']['view_content_value_option'] : null,
91
- 'woo_view_content_value_global' => isset( $v5_free['woo']['view_content_global_value'] ) ? $v5_free['woo']['view_content_global_value'] : null,
92
-
93
- 'edd_enabled' => isset( $v5_free['edd']['enabled'] ) ? $v5_free['edd']['enabled'] : null,
94
- 'edd_add_to_cart_on_button_click' => isset( $v5_free['edd']['on_add_to_cart_btn'] ) ? $v5_free['edd']['on_add_to_cart_btn'] : null,
95
- 'edd_add_to_cart_on_checkout_page' => isset( $v5_free['edd']['on_add_to_cart_checkout'] ) ? $v5_free['edd']['on_add_to_cart_checkout'] : null,
96
- 'edd_purchase_value_option' => 'price',
97
- 'edd_purchase_value_global' => isset( $v5_free['edd']['purchase_global_value'] ) ? $v5_free['edd']['purchase_global_value'] : null,
98
- 'edd_initiate_checkout_value_enabled' => isset( $v5_free['edd']['enable_checkout_value'] ) ? $v5_free['edd']['enable_checkout_value'] : null,
99
- 'edd_initiate_checkout_value_option' => 'price',
100
- 'edd_initiate_checkout_value_global' => isset( $v5_free['edd']['checkout_global_value'] ) ? $v5_free['edd']['checkout_global_value'] : null,
101
- 'edd_add_to_cart_value_enabled' => isset( $v5_free['edd']['enable_add_to_cart_value'] ) ? $v5_free['edd']['enable_add_to_cart_value'] : null,
102
- 'edd_add_to_cart_value_option' => 'price',
103
- 'edd_add_to_cart_value_global' => isset( $v5_free['edd']['add_to_cart_global_value'] ) ? $v5_free['edd']['add_to_cart_global_value'] : null,
104
- 'edd_view_content_value_enabled' => isset( $v5_free['edd']['enable_view_content_value'] ) ? $v5_free['edd']['enable_view_content_value'] : null,
105
- 'edd_view_content_value_option' => 'price',
106
- 'edd_view_content_value_global' => isset( $v5_free['edd']['view_content_global_value'] ) ? $v5_free['edd']['view_content_global_value'] : null,
107
-
108
- 'gdpr_ajax_enabled' => isset( $v5_free['gdpr']['gdpr_ajax_enabled'] ) ? $v5_free['gdpr']['gdpr_ajax_enabled']
109
- : null,
110
- );
111
-
112
- global $wp_roles;
113
-
114
- if ( ! isset( $wp_roles ) ) {
115
- $wp_roles = new \WP_Roles();
116
- }
117
-
118
- // 'do_not_track_user_roles'
119
- foreach ( $wp_roles->roles as $role => $options ) {
120
- if ( isset( $v5_free['general'][ 'disable_for_' . $role ] ) && $v5_free['general'][ 'disable_for_' . $role ] ) {
121
- $v7_core['do_not_track_user_roles'][] = $role;
122
- }
123
- }
124
-
125
- // update settings
126
- PYS()->updateOptions( $v7_core );
127
- PYS()->reloadOptions();
128
-
129
- if ( isset( $v5_free['woo']['content_id'] ) ) {
130
- $woo_content_id = $v5_free['woo']['content_id'] == 'id' ? 'product_id' : 'product_sku';
131
- } else {
132
- $woo_content_id = null;
133
- }
134
-
135
- if ( isset( $v5_free['woo']['on_add_to_cart_btn'] ) && $v5_free['woo']['on_add_to_cart_btn'] ) {
136
- $woo_add_to_cart_enabled = true;
137
- } elseif ( isset( $v5_free['woo']['on_add_to_cart_page'] ) && $v5_free['woo']['on_add_to_cart_page'] ) {
138
- $woo_add_to_cart_enabled = true;
139
- } elseif ( isset( $v5_free['woo']['on_add_to_cart_checkout'] ) && $v5_free['woo']['on_add_to_cart_checkout'] ) {
140
- $woo_add_to_cart_enabled = true;
141
- } else {
142
- $woo_add_to_cart_enabled = false;
143
- }
144
-
145
- if ( isset( $v5_free['edd']['content_id'] ) ) {
146
- $edd_content_id = $v5_free['edd']['content_id'] == 'id' ? 'download_id' : 'download_sku';
147
- } else {
148
- $edd_content_id = null;
149
- }
150
-
151
- if ( isset( $v5_free['edd']['on_add_to_cart_btn'] ) && $v5_free['edd']['on_add_to_cart_btn'] ) {
152
- $edd_add_to_cart_enabled = true;
153
- } elseif ( isset( $v5_free['edd']['on_add_to_cart_checkout'] ) && $v5_free['edd']['on_add_to_cart_checkout'] ) {
154
- $edd_add_to_cart_enabled = true;
155
- } else {
156
- $edd_add_to_cart_enabled = false;
157
- }
158
-
159
- $v7_fb = array(
160
- 'enabled' => isset( $v5_free['general']['enabled'] ) ? $v5_free['general']['enabled'] : null,
161
- 'pixel_id' => isset( $v5_free['general']['pixel_id'] ) ? array( $v5_free['general']['pixel_id'] ) : null,
162
- 'general_event_enabled' => isset( $v5_free['general']['general_event_enabled'] ) ? $v5_free['general']['general_event_enabled'] : null,
163
- 'search_event_enabled' => isset( $v5_free['general']['search_event_enabled'] ) ? $v5_free['general']['search_event_enabled'] : null,
164
-
165
- 'woo_variable_as_simple' => isset( $v5_free['woo']['variation_id'] ) && $v5_free['woo']['variation_id'] == 'main',
166
- 'woo_content_id' => $woo_content_id,
167
- 'woo_purchase_enabled' => isset( $v5_free['woo']['on_thank_you_page'] ) ? $v5_free['woo']['on_thank_you_page'] : null,
168
- 'woo_initiate_checkout_enabled' => isset( $v5_free['woo']['on_checkout_page'] ) ? $v5_free['woo']['on_checkout_page'] : null,
169
- 'woo_add_to_cart_enabled' => $woo_add_to_cart_enabled,
170
- 'woo_view_content_enabled' => isset( $v5_free['woo']['on_view_content'] ) ? $v5_free['woo']['on_view_content'] : null,
171
- 'woo_view_category_enabled' => isset( $v5_free['woo']['on_view_category'] ) ? $v5_free['woo']['on_view_category'] : null,
172
-
173
- 'edd_content_id' => $edd_content_id,
174
- 'edd_purchase_enabled' => isset( $v5_free['edd']['on_success_page'] ) ? $v5_free['edd']['on_success_page'] : null,
175
- 'edd_initiate_checkout_enabled' => isset( $v5_free['edd']['on_checkout_page'] ) ? $v5_free['edd']['on_checkout_page'] : null,
176
- 'edd_add_to_cart_enabled' => $edd_add_to_cart_enabled,
177
- 'edd_view_content_enabled' => isset( $v5_free['edd']['on_view_content'] ) ? $v5_free['edd']['on_view_content'] : null,
178
- 'edd_view_category_enabled' => isset( $v5_free['edd']['on_view_category'] ) ? $v5_free['edd']['on_view_category'] : null,
179
- );
180
-
181
- // update settings
182
- Facebook()->updateOptions( $v7_fb );
183
- Facebook()->reloadOptions();
184
-
185
- }
186
-
187
- function migrate_v5_free_events() {
188
-
189
- $v5_free_events = get_option( 'pixel_your_site_std_events' );
190
-
191
- if ( ! is_array( $v5_free_events ) ) {
192
- return;
193
- }
194
-
195
- foreach ( $v5_free_events as $v5_free_event ) {
196
-
197
- if ( empty( $v5_free_event['pageurl'] ) ) {
198
- continue;
199
- }
200
-
201
- if ( $v5_free_event['eventtype'] == 'CustomCode' ) {
202
- continue;
203
- }
204
-
205
- $std_events = array(
206
- 'ViewContent',
207
- 'Search',
208
- 'AddToCart',
209
- 'AddToWishlist',
210
- 'InitiateCheckout',
211
- 'AddPaymentInfo',
212
- 'Purchase',
213
- 'Lead',
214
- 'CompleteRegistration',
215
- );
216
-
217
- if ( ! in_array( $v5_free_event['eventtype'], $std_events ) ) {
218
- $fb_event_type = 'CustomEvent';
219
- $fb_custom_event_type = $v5_free_event['custom_name'];
220
- } else {
221
- $fb_event_type = $v5_free_event['eventtype'];
222
- $fb_custom_event_type = null;
223
- }
224
-
225
- $fb_params = array(
226
- 'value' => $v5_free_event['value'],
227
- // 'currency' => $currency,
228
- 'content_name' => $v5_free_event['content_name'],
229
- 'content_ids' => $v5_free_event['content_ids'],
230
- 'content_type' => $v5_free_event['content_type'],
231
- 'content_category' => $v5_free_event['content_category'],
232
- 'num_items' => $v5_free_event['num_items'],
233
- 'order_id' => $v5_free_event['order_id'],
234
- 'search_string' => $v5_free_event['search_string'],
235
- 'status' => $v5_free_event['status'],
236
- );
237
-
238
- if ( $v5_free_event['custom_currency'] == true ) {
239
- $fb_params['currency'] = 'custom';
240
- $fb_params['custom_currency'] = $v5_free_event['currency'];
241
- } elseif ( isset( $v5_free_event['currency'] ) ) {
242
- $fb_params['currency'] = $v5_free_event['currency'];
243
- $fb_params['custom_currency'] = null;
244
- }
245
-
246
- $fb_custom_params = array();
247
-
248
- foreach ( $v5_free_event as $param => $value ) {
249
-
250
- // skip standard params
251
- if ( array_key_exists( $param, $fb_params ) ) {
252
- continue;
253
- }
254
-
255
- // skip system params
256
- if ( in_array( $param, array( 'pageurl', 'eventtype', 'custom_currency', 'code', 'custom_name' ) ) ) {
257
- continue;
258
- }
259
-
260
- $fb_custom_params[] = array(
261
- 'name' => $param,
262
- 'value' => $value
263
- );
264
-
265
- }
266
-
267
- if ( endsWith( $v5_free_event['pageurl'], '*' ) ) {
268
- $triggers = array(
269
- array(
270
- 'rule' => 'contains',
271
- 'value' => rtrim( $v5_free_event['pageurl'], '*' ),
272
- ),
273
- );
274
- } else {
275
- $triggers = array(
276
- array(
277
- 'rule' => 'match',
278
- 'value' => $v5_free_event['pageurl'],
279
- ),
280
- );
281
- }
282
-
283
- $customEvent = array(
284
- 'title' => 'Untitled',
285
- 'enabled' => true,
286
- 'delay' => null,
287
- 'trigger_type' => 'page_visit',
288
- 'triggers' => array(),
289
- 'url_filters' => array(),
290
- 'page_visit_triggers' => $triggers,
291
- 'facebook_enabled' => true,
292
- 'facebook_event_type' => $fb_event_type,
293
- 'facebook_custom_event_type' => $fb_custom_event_type,
294
- 'facebook_params_enabled' => empty( $fb_params ) && empty( $fb_custom_params ) ? false : true,
295
- 'facebook_params' => $fb_params,
296
- 'facebook_custom_params' => $fb_custom_params,
297
- );
298
-
299
- CustomEventFactory::create( $customEvent );
300
-
301
- }
302
-
303
- }
17
  }
18
 
19
  $pys_free_7_version = get_option( 'pys_core_version', false );
 
20
 
21
+ if ($pys_free_7_version && version_compare($pys_free_7_version, '9.0.0', '<') ) {
22
+ migrate_9_0_0();
23
+
24
+ update_option( 'pys_core_version', PYS_VERSION );
25
+ update_option( 'pys_updated_at', time() );
26
+ } elseif ($pys_free_7_version && version_compare($pys_free_7_version, '7.1.0', '<')) {
27
 
28
  migrate_7_1_0_bing_defaults();
29
 
30
  update_option( 'pys_core_version', PYS_FREE_VERSION );
31
  update_option( 'pys_updated_at', time() );
32
 
33
+ }
 
 
 
 
34
 
35
+ }
 
 
 
 
36
 
37
+ function migrate_9_0_0() {
38
+ $globalOptions = [
39
+ "automatic_events_enabled" => PYS()->getOption("signal_events_enabled") || PYS()->getOption("automatic_events_enabled"),
40
+ "automatic_event_form_enabled" => PYS()->getOption("signal_form_enabled"),
41
+ "automatic_event_download_enabled" => PYS()->getOption("signal_download_enabled"),
42
+ "automatic_event_comment_enabled" => PYS()->getOption("signal_comment_enabled"),
43
+ "automatic_event_scroll_enabled" => PYS()->getOption("signal_page_scroll_enabled"),
44
+ "automatic_event_time_on_page_enabled" => PYS()->getOption("signal_time_on_page_enabled"),
45
+ "automatic_event_scroll_value" => PYS()->getOption("signal_page_scroll_value"),
46
+ "automatic_event_time_on_page_value" => PYS()->getOption("signal_time_on_page_value"),
47
+ "automatic_event_download_extensions" => PYS()->getOption("download_event_extensions"),
48
+ ];
49
+ PYS()->updateOptions($globalOptions);
50
  }
51
 
52
  function migrate_7_1_0_bing_defaults() {
61
  PYS()->reloadOptions();
62
 
63
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/options_defaults.json CHANGED
@@ -6,16 +6,7 @@
6
  "general_event_on_tax_enabled": true,
7
  "general_event_on_woo_enabled": true,
8
  "general_event_on_edd_enabled": true,
9
- "download_event_extensions": [
10
- "doc",
11
- "exe",
12
- "js",
13
- "pdf",
14
- "ppt",
15
- "tgz",
16
- "zip",
17
- "xls"
18
- ],
19
 
20
  "debug_enabled": false,
21
  "do_not_track_user_roles": [],
@@ -78,15 +69,6 @@
78
  "woo_add_to_cart_value_cog": "",
79
  "woo_initiate_checkout_value_cog": "",
80
 
81
- "signal_events_enabled": true,
82
- "signal_page_scroll_enabled": false,
83
- "signal_page_scroll_value": 50,
84
- "signal_time_on_page_enabled": false,
85
- "signal_time_on_page_value" : 30,
86
- "signal_form_enabled": true,
87
- "signal_download_enabled": true,
88
- "signal_comment_enabled": true,
89
-
90
  "fdp_enabled": false,
91
  "edd_purchase_enabled": true,
92
  "edd_initiate_checkout_enabled": true,
6
  "general_event_on_tax_enabled": true,
7
  "general_event_on_woo_enabled": true,
8
  "general_event_on_edd_enabled": true,
9
+
 
 
 
 
 
 
 
 
 
10
 
11
  "debug_enabled": false,
12
  "do_not_track_user_roles": [],
69
  "woo_add_to_cart_value_cog": "",
70
  "woo_initiate_checkout_value_cog": "",
71
 
 
 
 
 
 
 
 
 
 
72
  "fdp_enabled": false,
73
  "edd_purchase_enabled": true,
74
  "edd_initiate_checkout_enabled": true,
includes/options_fields.json CHANGED
@@ -6,7 +6,7 @@
6
  "general_event_on_tax_enabled": "checkbox",
7
  "general_event_on_woo_enabled": "checkbox",
8
  "general_event_on_edd_enabled": "checkbox",
9
- "download_event_extensions": "tag_select",
10
 
11
  "debug_enabled": "checkbox",
12
  "do_not_track_user_roles": "multi_select",
@@ -67,15 +67,6 @@
67
  "woo_add_to_cart_value_cog": "radio",
68
  "woo_initiate_checkout_value_cog": "radio",
69
 
70
- "signal_events_enabled": "checkbox",
71
- "signal_page_scroll_enabled": "checkbox",
72
- "signal_page_scroll_value": "number",
73
- "signal_time_on_page_enabled": "checkbox",
74
- "signal_time_on_page_value" : "number",
75
- "signal_form_enabled": "checkbox",
76
- "signal_download_enabled": "checkbox",
77
- "signal_comment_enabled": "checkbox",
78
-
79
  "fdp_enabled": "checkbox",
80
  "edd_purchase_enabled":"checkbox",
81
  "edd_initiate_checkout_enabled":"checkbox",
6
  "general_event_on_tax_enabled": "checkbox",
7
  "general_event_on_woo_enabled": "checkbox",
8
  "general_event_on_edd_enabled": "checkbox",
9
+
10
 
11
  "debug_enabled": "checkbox",
12
  "do_not_track_user_roles": "multi_select",
67
  "woo_add_to_cart_value_cog": "radio",
68
  "woo_initiate_checkout_value_cog": "radio",
69
 
 
 
 
 
 
 
 
 
 
70
  "fdp_enabled": "checkbox",
71
  "edd_purchase_enabled":"checkbox",
72
  "edd_initiate_checkout_enabled":"checkbox",
includes/views/html-main-general.php CHANGED
@@ -239,20 +239,24 @@ if ( ! defined( 'ABSPATH' ) ) {
239
  <p><a href="https://www.youtube.com/watch?v=uXTpgFu2V-E" target="_blank">How to configure Facebook Conversion API (2:51 min) - watch now</a></p>
240
  <p><a href="https://www.youtube.com/watch?v=DZzFP4pSitU" target="_blank">Meta Pixel (formerly Facebook Pixel), CAPI, and PixelYourSite MUST WATCH (8:19) - watch now</a></p>
241
  <p><a href="https://www.youtube.com/watch?v=QqAIO1ONc0I" target="_blank">How to test Facebook Conversion API (10:16 min) - watch now</a></p>
242
- <p><a href="https://www.youtube.com/watch?v=1W1yA9L-6F8" target="_blank">Meta Pixel (formerly Facebook Pixel) Events and Parameters (12:05 min) - watch now</a></p>
243
  <p><a href="https://www.youtube.com/watch?v=sM9yNkBK6Eg" target="_blank">Potentially Violating Personal Data Sent to Facebook (7:30 min) - watch now</a></p>
244
  <p><a href="https://www.youtube.com/watch?v=PsKdCkKNeLU" target="_blank">Facebook Conversion API and the Consent Problem (9:25 min) - watch now</a></p>
245
-
246
- <p><a href="https://www.youtube.com/watch?v=jJlhnF_QNxk" target="_blank">What you MUST know about Facebook Attribution Settings (8:49) - watch now</a></p>
247
- <p><a href="https://www.youtube.com/watch?v=hbecImCa9d0" target="_blank">Google Ads DATA-DRIVEN Attribution (8:14) - watch now</a></p>
248
  <p><a href="https://www.youtube.com/watch?v=kEp5BDg7dP0" target="_blank">How to fire EVENTS with PixelYourSite (22:28) - watch now</a></p>
249
-
250
- <p><a href="https://www.youtube.com/watch?v=HM98mGZshvc" target="_blank">Multiple Meta Pixel (formerly Facebook Pixel)s with CAPI events for WordPress and WooCommerce (12:20) - watch now</a></p>
251
- <p><a href="https://www.youtube.com/watch?v=JUuss5sewxg" target="_blank">Multiple Google Analytics properties on WordPress and WooCommerce (6:17) - watch now</a></p>
252
- <p><a href="https://www.youtube.com/watch?v=vWRZc66eaPo" target="_blank">How to install the TikTok Tag on WordPress with PixelYourSite - WooCommerce Support (9:11) - watch now</a></p>
253
- <p><a href="https://www.youtube.com/watch?v=3soI_Fl0JQw" target="_blank">Facebook Event Matching and EMQ: How to IMPROVE it</a></p>
254
  <p><a href="https://www.youtube.com/watch?v=zkb67djRnd0" target="_blank">FIX IT: PixelYourSite high number of admin-ajax requests (9:04) - watch now</a></p>
255
-
 
 
 
 
 
 
 
 
 
 
 
 
 
256
  </div>
257
  </div>
258
  <div class="row">
@@ -265,148 +269,6 @@ if ( ! defined( 'ABSPATH' ) ) {
265
  </div>
266
  </div>
267
 
268
- <!-- Signal Events -->
269
- <div class="card">
270
- <div class="card-header has_switch">
271
- <?php PYS()->render_switcher_input('signal_events_enabled');?>Track key actions with the Signal event <?php cardCollapseBtn(); ?>
272
- </div>
273
- <div class="card-body">
274
- <?php if ( Facebook()->enabled() ) : ?>
275
- <div class="row">
276
- <div class="col">
277
- <?php Facebook()->render_switcher_input( 'signal_events_enabled' ); ?>
278
- <h4 class="switcher-label">Enable on Facebook</h4>
279
- </div>
280
- </div>
281
- <?php endif; ?>
282
-
283
- <?php if ( GA()->enabled() ) : ?>
284
- <div class="row">
285
- <div class="col">
286
- <?php GA()->render_switcher_input( 'signal_events_enabled' ); ?>
287
- <h4 class="switcher-label">Enable on Google Analytics</h4>
288
- </div>
289
- </div>
290
- <div class="row mb-2">
291
- <div class="col col-offset-left">
292
- <?php GA()->render_checkbox_input( 'signal_events_non_interactive',
293
- 'Non-interactive event' ); ?>
294
- </div>
295
- </div>
296
- <?php endif; ?>
297
-
298
- <?php if ( Bing()->enabled() ) : ?>
299
- <div class="row">
300
- <div class="col">
301
- <?php Bing()->render_switcher_input( 'signal_events_enabled' ); ?>
302
- <h4 class="switcher-label">Enable on Bing</h4>
303
- </div>
304
- </div>
305
- <?php endif; ?>
306
-
307
- <hr class="mb-2"/>
308
-
309
- <h4 class="label">Actions:</h4>
310
- <div class="row mt-4">
311
- <div class="col">
312
- <?php PYS()->render_checkbox_input( 'signal_click_enabled' ,"Internal Clicks/External Clicks",true); ?>
313
- <?php renderProBadge(); ?>
314
- <div class="col-offset-left">
315
- <small> Specific parameters: <i>text, target_url</i></small>
316
- </div>
317
- </div>
318
- </div>
319
-
320
- <div class="row mt-3">
321
- <div class="col">
322
- <?php PYS()->render_checkbox_input( 'signal_watch_video_enabled','Watch Video (YouTube and Vimeo embedded videos)',true ); ?>
323
- <?php renderProBadge(); ?>
324
- <div class="col-offset-left">
325
- <small> Specific parameters: <i> video_type, video_title, video_id</i></small>
326
- </div>
327
- </div>
328
- </div>
329
-
330
- <div class="row mt-3">
331
- <div class="col">
332
- <?php PYS()->render_checkbox_input( 'signal_tel_enabled',"Telephone links clicks",true ); ?>
333
- <?php renderProBadge(); ?>
334
- </div>
335
- </div>
336
-
337
- <div class="row mt-3">
338
- <div class="col">
339
- <?php PYS()->render_checkbox_input( 'signal_email_enabled' ,"Email links clicks",true); ?>
340
- <?php renderProBadge(); ?>
341
- </div>
342
- </div>
343
-
344
- <div class="row mt-3">
345
- <div class="col">
346
- <?php PYS()->render_checkbox_input( 'signal_form_enabled',"Forms" ); ?>
347
- <div class="col-offset-left">
348
- <small> Specific parameters: <i>text, from_class, form_id</i></small>
349
- </div>
350
- </div>
351
- </div>
352
- <div class="row mt-3">
353
- <div class="col">
354
- <?php PYS()->render_checkbox_input( 'signal_user_signup_enabled',"User signups",true ); ?>
355
- <?php renderProBadge(); ?>
356
- </div>
357
- </div>
358
- <div class="row mt-3">
359
- <div class="col">
360
- <?php PYS()->render_checkbox_input( 'signal_download_enabled' ,"Downloads"); ?>
361
- <div class="col-offset-left">
362
- <h4 class="label">Extension of files to track as downloads:</h4>
363
- <?php PYS()->render_tags_select_input( 'download_event_extensions' ); ?>
364
- <small> Specific parameters: <i>download_type, download_name, download_url</i></small>
365
- </div>
366
- </div>
367
- </div>
368
-
369
- <div class="row mt-3">
370
- <div class="col">
371
- <?php PYS()->render_checkbox_input( 'signal_comment_enabled',"Comments" ); ?>
372
- </div>
373
- </div>
374
-
375
- <div class="row mt-3">
376
- <div class="col">
377
- <?php PYS()->render_checkbox_input( 'signal_adsense_enabled',"AdSense click" ,true); ?>
378
- <?php renderProBadge(); ?>
379
- <div class="col-offset-left">
380
- <small> Is not fired for Google, because Google has it's own support for AdSense</small>
381
- </div>
382
- </div>
383
- </div>
384
-
385
- <div class="row mt-3">
386
- <div class="col">
387
-
388
- <div class=" form-inline">
389
- <?php PYS()->render_checkbox_input( 'signal_page_scroll_enabled',"trigger for scroll value:" ); ?>
390
- <?php PYS()->render_number_input( 'signal_page_scroll_value','',false,100 ); ?>
391
- <div>% (add %)</div>
392
- </div>
393
-
394
- </div>
395
- </div>
396
-
397
- <div class="row mt-3">
398
- <div class="col">
399
- <div class="form-inline">
400
- <?php PYS()->render_checkbox_input( 'signal_time_on_page_enabled',"trigger for time on page value:" ); ?>
401
- <?php PYS()->render_number_input( 'signal_time_on_page_value' ); ?>
402
- <div> seconds (add seconds)</div>
403
- </div>
404
-
405
- </div>
406
- </div>
407
-
408
- </div>
409
- </div>
410
  <!-- Global Events -->
411
  <div class="card">
412
  <div class="card-header has_switch">
@@ -472,6 +334,12 @@ if ( ! defined( 'ABSPATH' ) ) {
472
  <h4 class="switcher-label">Enable on Google Analytics</h4>
473
  </div>
474
  </div>
 
 
 
 
 
 
475
  <?php endif; ?>
476
 
477
  <?php if ( Bing()->enabled()) : ?>
@@ -793,7 +661,7 @@ if ( ! defined( 'ABSPATH' ) ) {
793
  <?php
794
  $customCount = EventsCustom()->getCount();
795
  //$customFdp = EventsFdp()->getCount();
796
- $signalEvents = EventsSignal()->getCount();
797
  $wooEvents = EventsWoo()->getCount();
798
  $eddEvents = EventsEdd()->getCount();
799
 
@@ -839,7 +707,7 @@ if ( ! defined( 'ABSPATH' ) ) {
839
 
840
  <p>The Search event has the specific search parameter.</p>
841
 
842
- <p>The Signal event has various specific parameters, depending on the action that fires the event.</p>
843
  </div>
844
  </div>
845
 
@@ -1075,6 +943,13 @@ if ( ! defined( 'ABSPATH' ) ) {
1075
  <h4 class="switcher-label">Enable on Google Analytics</h4>
1076
  </div>
1077
  </div>
 
 
 
 
 
 
 
1078
  <?php endif; ?>
1079
 
1080
 
239
  <p><a href="https://www.youtube.com/watch?v=uXTpgFu2V-E" target="_blank">How to configure Facebook Conversion API (2:51 min) - watch now</a></p>
240
  <p><a href="https://www.youtube.com/watch?v=DZzFP4pSitU" target="_blank">Meta Pixel (formerly Facebook Pixel), CAPI, and PixelYourSite MUST WATCH (8:19) - watch now</a></p>
241
  <p><a href="https://www.youtube.com/watch?v=QqAIO1ONc0I" target="_blank">How to test Facebook Conversion API (10:16 min) - watch now</a></p>
 
242
  <p><a href="https://www.youtube.com/watch?v=sM9yNkBK6Eg" target="_blank">Potentially Violating Personal Data Sent to Facebook (7:30 min) - watch now</a></p>
243
  <p><a href="https://www.youtube.com/watch?v=PsKdCkKNeLU" target="_blank">Facebook Conversion API and the Consent Problem (9:25 min) - watch now</a></p>
 
 
 
244
  <p><a href="https://www.youtube.com/watch?v=kEp5BDg7dP0" target="_blank">How to fire EVENTS with PixelYourSite (22:28) - watch now</a></p>
 
 
 
 
 
245
  <p><a href="https://www.youtube.com/watch?v=zkb67djRnd0" target="_blank">FIX IT: PixelYourSite high number of admin-ajax requests (9:04) - watch now</a></p>
246
+ <p><a href="https://www.youtube.com/watch?v=EvzGMAvBnbs" target="_blank">
247
+ How to create Meta (Facebook) Custom Audiences & Lookalikes based on Events & Parameters (21:53) - watch now
248
+ </a>
249
+ </p>
250
+ <p>
251
+ <a href="https://www.youtube.com/watch?v=w97FATUy7ok" target="_blank">
252
+ How to configure Custom Conversions on Meta (Facebook) based on Events & Parameters (11:03) - watch now
253
+ </a>
254
+ </p>
255
+ <p>
256
+ <a href="https://www.youtube.com/watch?v=a5jPcLbdgy0" target="_blank">
257
+ How to run A/B tests with Google Optimize and GA4 (6:07)
258
+ </a>
259
+ </p>
260
  </div>
261
  </div>
262
  <div class="row">
269
  </div>
270
  </div>
271
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  <!-- Global Events -->
273
  <div class="card">
274
  <div class="card-header has_switch">
334
  <h4 class="switcher-label">Enable on Google Analytics</h4>
335
  </div>
336
  </div>
337
+ <div class="row mt-2">
338
+ <div class="col col-offset-left">
339
+ <?php GA()->render_checkbox_input("automatic_event_signup_non_interactive_enabled",
340
+ 'Non-interactive event'); ?>
341
+ </div>
342
+ </div>
343
  <?php endif; ?>
344
 
345
  <?php if ( Bing()->enabled()) : ?>
661
  <?php
662
  $customCount = EventsCustom()->getCount();
663
  //$customFdp = EventsFdp()->getCount();
664
+ $signalEvents = EventsAutomatic()->getCount();
665
  $wooEvents = EventsWoo()->getCount();
666
  $eddEvents = EventsEdd()->getCount();
667
 
707
 
708
  <p>The Search event has the specific search parameter.</p>
709
 
710
+ <p>The automatic events have various specific parameters, depending on the action that fires the event.</p>
711
  </div>
712
  </div>
713
 
943
  <h4 class="switcher-label">Enable on Google Analytics</h4>
944
  </div>
945
  </div>
946
+ <div class="row mt-2">
947
+ <?php $interactive = str_replace("_enabled","_non_interactive_enabled",$event)?>
948
+ <div class="col col-offset-left">
949
+ <?php GA()->render_checkbox_input($interactive,
950
+ 'Non-interactive event'); ?>
951
+ </div>
952
+ </div>
953
  <?php endif; ?>
954
 
955
 
modules/facebook/facebook.php CHANGED
@@ -173,16 +173,6 @@ class Facebook extends Settings implements Pixel {
173
  $isActive = $this->getOption($event->getId().'_enabled');
174
  }break;
175
 
176
- //Signal events
177
- case "signal_page_scroll":
178
- case "signal_time_on_page":
179
- case "signal_form":
180
- case "signal_download":
181
- case "signal_comment": {
182
- $isActive = $this->getOption('signal_events_enabled');
183
- }break;
184
-
185
-
186
  case 'init_event':{
187
  $eventData = $this->getPageViewEventParams();
188
  if($eventData) {
173
  $isActive = $this->getOption($event->getId().'_enabled');
174
  }break;
175
 
 
 
 
 
 
 
 
 
 
 
176
  case 'init_event':{
177
  $eventData = $this->getPageViewEventParams();
178
  if($eventData) {
modules/facebook/options_defaults.json CHANGED
@@ -62,7 +62,6 @@
62
  "woo_complete_registration_custom_value_old": "",
63
  "woo_complete_registration_send_from_server": true,
64
 
65
- "signal_events_enabled": true,
66
  "verify_meta_tag": "",
67
 
68
  "automatic_event_form_enabled": true,
62
  "woo_complete_registration_custom_value_old": "",
63
  "woo_complete_registration_send_from_server": true,
64
 
 
65
  "verify_meta_tag": "",
66
 
67
  "automatic_event_form_enabled": true,
modules/facebook/options_fields.json CHANGED
@@ -61,7 +61,6 @@
61
  "woo_complete_registration_custom_value_old": "radio",
62
  "woo_complete_registration_send_from_server": "checkbox",
63
 
64
- "signal_events_enabled": "checkbox",
65
  "verify_meta_tag": "array_textarea",
66
 
67
  "automatic_event_form_enabled": "checkbox",
61
  "woo_complete_registration_custom_value_old": "radio",
62
  "woo_complete_registration_send_from_server": "checkbox",
63
 
 
64
  "verify_meta_tag": "array_textarea",
65
 
66
  "automatic_event_form_enabled": "checkbox",
modules/google_analytics/ga.php CHANGED
@@ -149,15 +149,20 @@ class GA extends Settings implements Pixel {
149
 
150
  case 'automatic_event_signup' : {
151
  $event->addPayload(["name" => "sign_up"]);
 
152
  $isActive = $this->getOption($event->getId().'_enabled');
153
  } break;
154
  case 'automatic_event_login' :{
155
  $event->addPayload(["name" => "login"]);
 
156
  $isActive = $this->getOption($event->getId().'_enabled');
157
  } break;
158
  case 'automatic_event_search' :{
159
  $event->addPayload(["name" => "search"]);
160
- $event->addParams(["search_term" => empty( $_GET['s'] ) ? null : $_GET['s']]);
 
 
 
161
  $isActive = $this->getOption($event->getId().'_enabled');
162
  } break;
163
 
@@ -166,17 +171,10 @@ class GA extends Settings implements Pixel {
166
  case 'automatic_event_comment' :
167
  case 'automatic_event_scroll' :
168
  case 'automatic_event_time_on_page' : {
 
169
  $isActive = $this->getOption($event->getId().'_enabled');
170
  }break;
171
 
172
- case "signal_page_scroll":
173
- case "signal_time_on_page":
174
- case "signal_form":
175
- case "signal_download":
176
- case "signal_comment": {
177
- $isActive = $this->getOption('signal_events_enabled');
178
- $event->addParams(array('non_interaction'=>$this->getOption("signal_events_non_interactive")));
179
- }break;
180
 
181
  case 'init_event': {
182
  $eventData = $this->getPageViewEventParams();
149
 
150
  case 'automatic_event_signup' : {
151
  $event->addPayload(["name" => "sign_up"]);
152
+ $event->addParams(array('non_interaction'=>$this->getOption($event->getId()."_non_interactive_enabled")));
153
  $isActive = $this->getOption($event->getId().'_enabled');
154
  } break;
155
  case 'automatic_event_login' :{
156
  $event->addPayload(["name" => "login"]);
157
+ $event->addParams(array('non_interaction'=>$this->getOption($event->getId()."_non_interactive_enabled")));
158
  $isActive = $this->getOption($event->getId().'_enabled');
159
  } break;
160
  case 'automatic_event_search' :{
161
  $event->addPayload(["name" => "search"]);
162
+ $event->addParams([
163
+ "search_term" => empty( $_GET['s'] ) ? null : $_GET['s'],
164
+ 'non_interaction' => $this->getOption($event->getId()."_non_interactive_enabled")
165
+ ]);
166
  $isActive = $this->getOption($event->getId().'_enabled');
167
  } break;
168
 
171
  case 'automatic_event_comment' :
172
  case 'automatic_event_scroll' :
173
  case 'automatic_event_time_on_page' : {
174
+ $event->addParams(array('non_interaction'=>$this->getOption($event->getId()."_non_interactive_enabled")));
175
  $isActive = $this->getOption($event->getId().'_enabled');
176
  }break;
177
 
 
 
 
 
 
 
 
 
178
 
179
  case 'init_event': {
180
  $eventData = $this->getPageViewEventParams();
modules/google_analytics/options_defaults.json CHANGED
@@ -55,8 +55,6 @@
55
  "disable_advertising_features": false,
56
  "disable_advertising_personalization": false,
57
 
58
- "signal_events_enabled": true,
59
-
60
  "automatic_event_form_enabled": true,
61
  "automatic_event_signup_enabled": true,
62
  "automatic_event_login_enabled": true,
@@ -64,5 +62,14 @@
64
  "automatic_event_comment_enabled": true,
65
  "automatic_event_scroll_enabled": true,
66
  "automatic_event_time_on_page_enabled": true,
67
- "automatic_event_search_enabled": true
 
 
 
 
 
 
 
 
 
68
  }
55
  "disable_advertising_features": false,
56
  "disable_advertising_personalization": false,
57
 
 
 
58
  "automatic_event_form_enabled": true,
59
  "automatic_event_signup_enabled": true,
60
  "automatic_event_login_enabled": true,
62
  "automatic_event_comment_enabled": true,
63
  "automatic_event_scroll_enabled": true,
64
  "automatic_event_time_on_page_enabled": true,
65
+ "automatic_event_search_enabled": true,
66
+
67
+ "automatic_event_form_non_interactive_enabled": false,
68
+ "automatic_event_signup_non_interactive_enabled": false,
69
+ "automatic_event_login_non_interactive_enabled": false,
70
+ "automatic_event_download_non_interactive_enabled": false,
71
+ "automatic_event_comment_non_interactive_enabled": false,
72
+ "automatic_event_scroll_non_interactive_enabled": false,
73
+ "automatic_event_time_on_page_non_interactive_enabled": false,
74
+ "automatic_event_search_non_interactive_enabled": false
75
  }
modules/google_analytics/options_fields.json CHANGED
@@ -55,8 +55,6 @@
55
  "disable_advertising_features": "checkbox",
56
  "disable_advertising_personalization": "checkbox",
57
 
58
- "signal_events_enabled": "checkbox",
59
-
60
  "automatic_event_form_enabled": "checkbox",
61
  "automatic_event_signup_enabled": "checkbox",
62
  "automatic_event_login_enabled": "checkbox",
@@ -64,5 +62,14 @@
64
  "automatic_event_comment_enabled": "checkbox",
65
  "automatic_event_scroll_enabled": "checkbox",
66
  "automatic_event_time_on_page_enabled": "checkbox",
67
- "automatic_event_search_enabled": "checkbox"
 
 
 
 
 
 
 
 
 
68
  }
55
  "disable_advertising_features": "checkbox",
56
  "disable_advertising_personalization": "checkbox",
57
 
 
 
58
  "automatic_event_form_enabled": "checkbox",
59
  "automatic_event_signup_enabled": "checkbox",
60
  "automatic_event_login_enabled": "checkbox",
62
  "automatic_event_comment_enabled": "checkbox",
63
  "automatic_event_scroll_enabled": "checkbox",
64
  "automatic_event_time_on_page_enabled": "checkbox",
65
+ "automatic_event_search_enabled": "checkbox",
66
+
67
+ "automatic_event_form_non_interactive_enabled": "checkbox",
68
+ "automatic_event_signup_non_interactive_enabled": "checkbox",
69
+ "automatic_event_login_non_interactive_enabled": "checkbox",
70
+ "automatic_event_download_non_interactive_enabled": "checkbox",
71
+ "automatic_event_comment_non_interactive_enabled": "checkbox",
72
+ "automatic_event_scroll_non_interactive_enabled": "checkbox",
73
+ "automatic_event_time_on_page_non_interactive_enabled": "checkbox",
74
+ "automatic_event_search_non_interactive_enabled": "checkbox"
75
  }
modules/google_analytics/views/html-settings.php CHANGED
@@ -75,11 +75,20 @@ use PixelYourSite\GA\Helpers;
75
  <h4 class="switcher-label">Enable Google Optimize</h4>
76
  </div>
77
  </div>
78
- <div class="row">
79
  <div class="col">
80
  <?php renderDummyTextInput('Enter Optimize ID'); ?>
81
  </div>
82
  </div>
 
 
 
 
 
 
 
 
 
83
  </div>
84
  </div>
85
 
75
  <h4 class="switcher-label">Enable Google Optimize</h4>
76
  </div>
77
  </div>
78
+ <div class="row mb-3">
79
  <div class="col">
80
  <?php renderDummyTextInput('Enter Optimize ID'); ?>
81
  </div>
82
  </div>
83
+ <div class="row ">
84
+ <div class="col">
85
+ <p>
86
+ Learn how to configure Google Optimize:
87
+ <a href="https://www.youtube.com/watch?v=a5jPcLbdgy0" target="_blank">watch
88
+ video</a>
89
+ </p>
90
+ </div>
91
+ </div>
92
  </div>
93
  </div>
94
 
pixelyoursite.php CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
- define( 'PYS_FREE_VERSION', '9.0.0' );
8
  define( 'PYS_FREE_PINTEREST_MIN_VERSION', '3.2.5' );
9
  define( 'PYS_FREE_BING_MIN_VERSION', '2.2.2' );
10
  define( 'PYS_FREE_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
@@ -26,7 +26,6 @@ require_once PYS_FREE_PATH.'/includes/events/class-event.php';
26
  require_once PYS_FREE_PATH.'/includes/events/interface-events.php';
27
  require_once PYS_FREE_PATH.'/includes/events/class-event-single.php';
28
  require_once PYS_FREE_PATH.'/includes/events/class-event-grouped.php';
29
- require_once PYS_FREE_PATH.'/includes/events/class-events-signal.php';
30
  require_once PYS_FREE_PATH.'/includes/events/class-events-automatic.php';
31
  require_once PYS_FREE_PATH.'/includes/events/class-events-woo.php';
32
  require_once PYS_FREE_PATH.'/includes/events/class-events-edd.php';
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
+ define( 'PYS_FREE_VERSION', '9.1.0' );
8
  define( 'PYS_FREE_PINTEREST_MIN_VERSION', '3.2.5' );
9
  define( 'PYS_FREE_BING_MIN_VERSION', '2.2.2' );
10
  define( 'PYS_FREE_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
26
  require_once PYS_FREE_PATH.'/includes/events/interface-events.php';
27
  require_once PYS_FREE_PATH.'/includes/events/class-event-single.php';
28
  require_once PYS_FREE_PATH.'/includes/events/class-event-grouped.php';
 
29
  require_once PYS_FREE_PATH.'/includes/events/class-events-automatic.php';
30
  require_once PYS_FREE_PATH.'/includes/events/class-events-woo.php';
31
  require_once PYS_FREE_PATH.'/includes/events/class-events-edd.php';
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: Meta Pixel, Facebook Pixel, Facebook Conversion API, CAPI, Facebook Pixel
4
  Requires at least: 3.0.1
5
  Requires PHP: 5.4
6
  Tested up to: 6.0
7
- Stable tag: 9.0.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -464,6 +464,17 @@ NO, absolutely not! We don't track any type of data about your website. We simpl
464
  == Changelog ==
465
 
466
 
 
 
 
 
 
 
 
 
 
 
 
467
  = PixelYourSite 9.0.0 =
468
 
469
  * [WATCH THIS VIDEO](https://www.youtube.com/watch?v=625_GpjqEZE) to find out more about this update. We are replacing the Signal event with individual automatic events tracking each action. These events are reported by Google Analytics 4 and can be used for audiences or conversions on Meta (Facebook), Google Analytics, Google Ads, and for audiences on Pinterest, Bing, or TikTok. This version still fires the old Signal event by default and you need to manually turn it OFF and enable the automatic events. Version 9.1 will completely remove the Signal event and enable the automatic events by default. If you have audiences or conversions based on the Signal events, replace them using the new events.
4
  Requires at least: 3.0.1
5
  Requires PHP: 5.4
6
  Tested up to: 6.0
7
+ Stable tag: 9.1.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
464
  == Changelog ==
465
 
466
 
467
+ = PixelYourSite 9.1.0 =
468
+
469
+ * Automated events are turned ON by default.
470
+
471
+ * The legacy Signal event is removed.
472
+
473
+ * Video links updated.
474
+
475
+ * Code refactoring.
476
+
477
+
478
  = PixelYourSite 9.0.0 =
479
 
480
  * [WATCH THIS VIDEO](https://www.youtube.com/watch?v=625_GpjqEZE) to find out more about this update. We are replacing the Signal event with individual automatic events tracking each action. These events are reported by Google Analytics 4 and can be used for audiences or conversions on Meta (Facebook), Google Analytics, Google Ads, and for audiences on Pinterest, Bing, or TikTok. This version still fires the old Signal event by default and you need to manually turn it OFF and enable the automatic events. Version 9.1 will completely remove the Signal event and enable the automatic events by default. If you have audiences or conversions based on the Signal events, replace them using the new events.