Version Description
Download this release
Release Info
Developer | PixelYourSite |
Plugin | PixelYourSite – Facebook Pixel (Events, WooCommerce & Easy Digital Downloads) |
Version | 9.2.2 |
Comparing to | |
See all releases |
Code changes from version 9.2.1 to 9.2.2
- dist/scripts/public.bundle.js +1 -1
- dist/scripts/public.js +25 -9
- facebook-pixel-master.php +2 -2
- includes/class-events-manager.php +45 -32
- includes/class-pys.php +61 -3
- includes/class-settings.php +6 -5
- includes/functions-license.php +44 -21
- includes/options_defaults.json +3 -0
- includes/options_fields.json +4 -0
- includes/views/html-licenses.php +0 -6
- includes/views/html-main-general.php +18 -0
- includes/views/html-main-woo.php +1 -0
- notices/fixed.php +28 -8
- pixelyoursite.php +1 -1
- readme.txt +24 -2
dist/scripts/public.bundle.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(()=>{function e(e){for(var t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".split(""),n=[],o=0;o<e;o++){var a=(Math.random()*(t.length-1)).toFixed(0);n[o]=t[a]}return n.join("")}function t(e){switch(e){case"facebook":return window.pys.Facebook;case"ga":return window.pys.Analytics;case"bing":return window.pys.Bing;case"pinterest":return window.pys.Pinterest}}Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),o=n.length>>>0;if(0===o)return!1;for(var a,i,r=0|t,s=Math.max(r>=0?r:o-Math.abs(r),0);s<o;){if((a=n[s])===(i=e)||"number"==typeof a&&"number"==typeof i&&isNaN(a)&&isNaN(i))return!0;s++}return!1}}),function(o,a){a.debug&&console.log("PYS:",a);var i={isEnabled:function(){},disable:function(){},loadPixel:function(){},fireEvent:function(e,t){return!1},onCommentEvent:function(){},onDownloadEvent:function(e){},onFormEvent:function(e){},onWooAddToCartOnButtonEvent:function(e){},onWooAddToCartOnSingleEvent:function(e,t,n,o,a){},onWooRemoveFromCartEvent:function(e){},onEddAddToCartOnButtonEvent:function(e,t,n){},onEddRemoveFromCartEvent:function(e){},onPageScroll:function(e){},onTime:function(e){}},r={isEnabled:function(){},disable:function(){},loadPixel:function(){},fireEvent:function(e,t){return!1},onAdSenseEvent:function(){},onClickEvent:function(e){},onWatchVideo:function(e){},onCommentEvent:function(){},onFormEvent:function(e){},onDownloadEvent:function(e){},onWooAddToCartOnButtonEvent:function(e){},onWooAddToCartOnSingleEvent:function(e,t,n,o,a){},onWooRemoveFromCartEvent:function(e){},onWooAffiliateEvent:function(e){},onWooPayPalEvent:function(){},onEddAddToCartOnButtonEvent:function(e,t,n){},onEddRemoveFromCartEvent:function(e){},onPageScroll:function(e){},onTime:function(e){}},s=function(e){var t=i,n=r,a=!1;let l=function(){let t=6e4*e.last_visit_duration;if(void 0===Cookies.get("pys_start_session")||void 0===Cookies.get("pys_session_limit")){var n=new Date;return n.setTime(n.getTime()+t),Cookies.set("pys_session_limit",!0,{expires:n}),Cookies.set("pys_start_session",!0),!0}return!1}(),_=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],u=["fbadid","gadid","padid","bingid"];function p(){e.gdpr.all_disabled_by_api||(e.gdpr.facebook_disabled_by_api||c.loadPixel(),e.gdpr.analytics_disabled_by_api||d.loadPixel(),e.gdpr.pinterest_disabled_by_api||t.loadPixel(),e.gdpr.bing_disabled_by_api||n.loadPixel())}function f(){try{let n,o=document.referrer.toString(),a=0===o.length,i=!a&&0===o.indexOf(e.siteUrl);return n=!1==(!a&&!i)?"direct":o,"direct"!==n?-1!==(t=(t=n).replace(/(https?:\/\/)?(www.)?/i,"")).indexOf("/")?t.split("/")[0]:t:n}catch(e){return console.error(e),"direct"}var t}function m(e=!1){try{let t="pys_",n=[];return e&&(t="last_pys_"),o.each(u,(function(e,o){Cookies.get(t+o)&&(n[o]=Cookies.get(t+o))})),n}catch(e){return console.error(e),[]}}function v(e=!1){try{let t="pys_";e&&(t="last_pys_");let n=[];return o.each(_,(function(e,o){if(Cookies.get(t+o)){let e=Cookies.get(t+o);n[o]=function(e){return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)?void 0:e}(e)}})),n}catch(e){return console.error(e),[]}}return{PRODUCT_SIMPLE:0,PRODUCT_VARIABLE:1,PRODUCT_BUNDLE:2,PRODUCT_GROUPED:3,fireEventForAllPixel:function(e,o){o.hasOwnProperty(c.tag())&&c[e](o[c.tag()]),o.hasOwnProperty(d.tag())&&d[e](o[d.tag()]),o.hasOwnProperty(t.tag())&&t[e](o[t.tag()]),o.hasOwnProperty(n.tag())&&n[e](o[n.tag()])},setupPinterestObject:function(){return t=window.pys.Pinterest||t},setupBingObject:function(){return n=window.pys.Bing||n},copyProperties:function(e,t){for(var n in e)"function"!=typeof e[n]&&(t[n]=e[n]);return t},manageCookies:function(){let t=parseInt(e.cookie_duration),n=function(){try{var e={},t=[];return window.location.search.substr(1).split("&").forEach((function(n){(t=n.split("=")).length>1&&(e[t[0]]=t[1])})),e}catch(e){return console.error(e),{}}}(),a=window.location.href.split("?")[0];try{void 0===Cookies.get("pys_first_visit")&&(Cookies.set("pys_first_visit",!0,{expires:t}),Cookies.set("pysTrafficSource",f(),{expires:t}),Cookies.set("pys_landing_page",a,{expires:t}),o.each(_,(function(e,o){n.hasOwnProperty(o)?Cookies.set("pys_"+o,n[o],{expires:t}):Cookies.remove("pys_"+o)})),o.each(u,(function(e,o){n.hasOwnProperty(o)?Cookies.set("pys_"+o,n[o],{expires:t}):Cookies.remove("pys_"+o)}))),l&&(Cookies.set("last_pysTrafficSource",f(),{expires:t}),o.each(_,(function(e,o){n.hasOwnProperty(o)?Cookies.set("last_pys_"+o,n[o],{expires:t}):Cookies.remove("last_pys_"+o)})),o.each(u,(function(e,o){n.hasOwnProperty(o)?Cookies.set("last_pys_"+o,n[o],{expires:t}):Cookies.remove("last_pys_"+o)})),Cookies.set("last_pys_landing_page",a,{expires:t}))}catch(e){console.error(e)}},clone:function(e){var t;if(null==e||"object"!=typeof e)return e;if(e instanceof Date)return(t=new Date).setTime(e.getTime()),t;if(e instanceof Array){t=[];for(var n=0,o=e.length;n<o;n++)"function"!=typeof e[n]&&(t[n]=s.clone(e[n]));return t}if(e instanceof Object){for(var a in t={},e)if(e.hasOwnProperty(a)){if("function"==typeof e[a])continue;t[a]=s.clone(e[a])}return t}return e},getTagsAsArray:function(e){return[].slice.call(document.getElementsByTagName(e))},getRequestParams:function(){return[]},setupMouseOverClickEvents:function(e,t){o(document).onFirst("mouseover",t.join(","),(function(){if(o(this).hasClass("pys-mouse-over-"+e))return!0;o(this).addClass("pys-mouse-over-"+e),s.fireDynamicEvent(e)}))},setupCSSClickEvents:function(e,t){o(document).onFirst("click",t.join(","),(function(){s.fireTriggerEvent(e)}))},setupURLClickEvents:function(){o("a[data-pys-event-id]").onFirst("click",(function(e){o(this).attr("data-pys-event-id").split(",").forEach((function(e){e=parseInt(e),!1===isNaN(e)&&s.fireTriggerEvent(e)}))}))},setupScrollPosEvents:function(e,t){var n={},a=o(document).height()-o(window).height();o.each(t,(function(t,o){o=a*o/100,o=Math.round(o),n[o]=e})),o(document).on("scroll",(function(){var e=o(window).scrollTop();o.each(n,(function(t,o){return e<=t||null===o||(n[t]=null,void s.fireTriggerEvent(o))}))}))},setupCommentEvents:function(e,t){o("form.comment-form").on("submit",(function(){s.fireTriggerEvent(e)}))},fireTriggerEvent:function(o){if(e.triggerEvents.hasOwnProperty(o)){var a={},i=e.triggerEvents[o];i.hasOwnProperty("facebook")&&(a=i.facebook,c.fireEvent(a.name,a)),i.hasOwnProperty("ga")&&(a=i.ga,d.fireEvent(a.name,a)),i.hasOwnProperty("pinterest")&&(a=i.pinterest,t.fireEvent(a.name,a)),i.hasOwnProperty("bing")&&(a=i.bing,n.fireEvent(a.name,a))}},fireStaticEvents:function(a){e.staticEvents.hasOwnProperty(a)&&o.each(e.staticEvents[a],(function(e,i){o.each(i,(function(e,o){if(o.fired=o.fired||!1,!o.fired){var i=!1;"facebook"===a?i=c.fireEvent(o.name,o):"ga"===a?i=d.fireEvent(o.name,o):"pinterest"===a?i=t.fireEvent(o.name,o):"bing"===a&&(i=n.fireEvent(o.name,o)),o.fired=i}}))}))},loadGoogleTag:function(e){a||(function(e,t,n){var o=t.createElement("script"),a=t.getElementsByTagName("script")[0];o.async=1,o.src=n,a.parentNode.insertBefore(o,a)}(window,document,"//www.googletagmanager.com/gtag/js?id="+e),window.dataLayer=window.dataLayer||[],window.gtag=window.gtag||function(){dataLayer.push(arguments)},gtag("js",new Date),a=!0)},loadPixels:function(){e.gdpr.ajax_enabled&&!e.gdpr.consent_magic_integration_enabled?o.get({url:e.ajaxUrl,dataType:"json",data:{action:"pys_get_gdpr_filters_values"},success:function(t){t.success&&(e.gdpr.all_disabled_by_api=t.data.all_disabled_by_api,e.gdpr.facebook_disabled_by_api=t.data.facebook_disabled_by_api,e.gdpr.analytics_disabled_by_api=t.data.analytics_disabled_by_api,e.gdpr.google_ads_disabled_by_api=t.data.google_ads_disabled_by_api,e.gdpr.pinterest_disabled_by_api=t.data.pinterest_disabled_by_api,e.gdpr.bing_disabled_by_api=t.data.bing_disabled_by_api),p()}}):p()},consentGiven:function(t){if(e.gdpr.consent_magic_integration_enabled&&"undefined"!=typeof CS_Data){var n=Cookies.get("cs_viewed_cookie_policy"+test_prefix);if(e.gdpr[t+"_prior_consent_enabled"]){if(void 0===n||"yes"===n)return!0}else if(void 0===n||"yes"===n)return!0;return!1}if(e.gdpr.real_cookie_banner_integration_enabled){var o=window.consentApi;if(o)switch(t){case"analytics":return o.consentSync("http","_ga","*").cookieOptIn;case"facebook":return o.consentSync("http","_fbp","*").cookieOptIn;case"pinterest":return o.consentSync("http","_pinterest_sess",".pinterest.com").cookieOptIn;default:return!0}}if(e.gdpr.cookiebot_integration_enabled&&"undefined"!=typeof Cookiebot){var a=e.gdpr["cookiebot_"+t+"_consent_category"];if(e.gdpr[t+"_prior_consent_enabled"]){if(!1===Cookiebot.consented||Cookiebot.consent[a])return!0}else if(Cookiebot.consent[a])return!0;return!1}if(e.gdpr.cookie_notice_integration_enabled&&"undefined"!=typeof cnArgs){var i=Cookies.get(cnArgs.cookieName);if(e.gdpr[t+"_prior_consent_enabled"]){if(void 0===i||"true"===i)return!0}else if("true"===i)return!0;return!1}if(e.gdpr.cookie_law_info_integration_enabled){var r=Cookies.get("viewed_cookie_policy");if(e.gdpr[t+"_prior_consent_enabled"]){if(void 0===r||"yes"===r)return!0}else if("yes"===r)return!0;return!1}return!0},setupGdprCallbacks:function(){if(e.gdpr.consent_magic_integration_enabled&&"undefined"!=typeof CS_Data){var a=CS_Data.test_prefix,i=!1;if(1==CS_Data.cs_refresh_after_consent&&(i=CS_Data.cs_refresh_after_consent),!i){for(var r=document.cookie.split(";"),s=1;s<=r.length;s++)if(-1!==r[s-1].indexOf("cs_enabled_cookie_term")){var l=r[s-1].replace("cs_enabled_cookie_term"+a+"_","");l=Number(l.replace(/\D+/g,"")),"yes"==Cookies.get("cs_enabled_cookie_term"+a+"_"+l)?(l===CS_Data.cs_script_cat.facebook&&c.loadPixel(),l===CS_Data.cs_script_cat.bing&&n.loadPixel(),l===CS_Data.cs_script_cat.analytics&&d.loadPixel(),l===CS_Data.cs_script_cat.pinterest&&t.loadPixel()):(l===CS_Data.cs_script_cat.facebook&&c.disable(),l===CS_Data.cs_script_cat.bing&&n.disable(),l===CS_Data.cs_script_cat.analytics&&d.disable(),l===CS_Data.cs_script_cat.pinterest&&t.disable()),"yes"==Cookies.get("cs_enabled_advanced_matching")&&c.loadPixel()}o(document).on("click",".cs_action_btn",(function(e){e.preventDefault();var a=o(this).attr("data-cs_action");"allow_all"===a?(c.loadPixel(),n.loadPixel(),d.loadPixel(),t.loadPixel()):"disable_all"===a&&(c.disable(),n.disable(),d.disable(),t.disable())}))}}if(e.gdpr.real_cookie_banner_integration_enabled){var _=window.consentApi;_&&(_.consent("http","_ga","*").then(d.loadPixel.bind(d),d.disable.bind(d)),_.consent("http","_fbp","*").then(c.loadPixel.bind(c),c.disable.bind(c)),_.consent("http","_pinterest_sess",".pinterest.com").then(t.loadPixel.bind(t),t.disable.bind(t)))}e.gdpr.cookiebot_integration_enabled&&"undefined"!=typeof Cookiebot&&window.addEventListener("CookiebotOnConsentReady",(function(){Cookiebot.consent.marketing&&(c.loadPixel(),n.loadPixel(),t.loadPixel()),Cookiebot.consent.statistics&&d.loadPixel(),Cookiebot.consent.marketing||(c.disable(),t.disable(),n.disable()),Cookiebot.consent.statistics||d.disable()})),e.gdpr.cookie_notice_integration_enabled&&(o(document).onFirst("click",".cn-set-cookie",(function(){"accept"===o(this).data("cookie-set")?(c.loadPixel(),d.loadPixel(),t.loadPixel(),n.loadPixel()):(c.disable(),d.disable(),t.disable(),n.disable())})),o(document).onFirst("click",".cn-revoke-cookie",(function(){c.disable(),d.disable(),t.disable(),n.disable()}))),e.gdpr.cookie_law_info_integration_enabled&&(o(document).onFirst("click","#cookie_action_close_header",(function(){c.loadPixel(),d.loadPixel(),t.loadPixel(),n.loadPixel()})),o(document).onFirst("click","#cookie_action_close_header_reject",(function(){c.disable(),d.disable(),t.disable(),n.disable()})))},getLinkExtension:function(e){return(e=(e=(e=e.substring(0,-1===e.indexOf("#")?e.length:e.indexOf("#"))).substring(0,-1===e.indexOf("?")?e.length:e.indexOf("?"))).substring(e.lastIndexOf("/")+1,e.length)).length>0&&-1!==e.indexOf(".")?e=e.substring(e.indexOf(".")+1):""},getLinkFilename:function(e){return(e=(e=(e=e.substring(0,-1===e.indexOf("#")?e.length:e.indexOf("#"))).substring(0,-1===e.indexOf("?")?e.length:e.indexOf("?"))).substring(e.lastIndexOf("/")+1,e.length)).length>0&&-1!==e.indexOf(".")?e:""},isCheckoutPage:function(){return o("body").hasClass("woocommerce-checkout")||o("body").hasClass("edd-checkout")},addCheckoutFields:function(){var e="",t=v();o.each(_,(function(n,o){n>0&&(e+="|"),e+=o+":"+t[o]}));var n="",a=m();o.each(u,(function(e,t){e>0&&(n+="|"),n+=t+":"+a[t]}));var i="",r=m(!0);o.each(u,(function(e,t){e>0&&(i+="|"),i+=t+":"+r[t]}));var s="",c=v(!0);o.each(_,(function(e,t){e>0&&(s+="|"),s+=t+":"+c[t]}));var d=function(){var e=new Array,t=new Date;return e.push(["00-01","01-02","02-03","03-04","04-05","05-06","06-07","07-08","08-09","09-10","10-11","11-12","12-13","13-14","14-15","15-16","16-17","17-18","18-19","19-20","20-21","21-22","22-23","23-24"][t.getHours()]),e.push(["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][t.getDay()]),e.push(["January","February","March","April","May","June","July","August","September","October","November","December"][t.getMonth()]),e}(),l=Cookies.get("pys_landing_page"),p=Cookies.get("last_pys_landing_page"),f=Cookies.get("pysTrafficSource"),y=Cookies.get("last_pysTrafficSource"),g=null;g=o("body").hasClass("woocommerce-checkout")?o("form.woocommerce-checkout"):o("#edd_purchase_form");var b={pys_utm:e,pys_utm_id:n,pys_browser_time:d.join("|"),pys_landing:l,pys_source:f,pys_order_type:o(".wcf-optin-form").length>0?"wcf-optin":"normal",last_pys_landing:p,last_pys_source:y,last_pys_utm:s,last_pys_utm_id:i};Object.keys(b).forEach((function(e,t){g.append("<input type='hidden' name='"+e+"' value='"+b[e]+"' /> ")}))}}}(a),c=function(t){var a=["PageView","ViewContent","Search","AddToCart","AddToWishlist","InitiateCheckout","AddPaymentInfo","Purchase","Lead","Subscribe","CustomizeProduct","FindLocation","StartTrial","SubmitApplication","Schedule","Contact","Donate"],i=!1,r=t.gdpr.all_disabled_by_api||t.gdpr.facebook_disabled_by_api||t.gdpr.cookiebot_integration_enabled||t.gdpr.consent_magic_integration_enabled||t.gdpr.cookie_notice_integration_enabled||t.gdpr.cookie_law_info_integration_enabled;function d(o,i){if("function"==typeof window.pys_event_data_filter&&window.pys_disable_event_filter(o,"facebook"))return;var d=a.includes(o)?"track":"trackCustom",l=i.params,_={},u={};s.copyProperties(l,_);let p=function(o,a,i){let s=null;if(t.facebook.serverApiEnabled){if("woo_remove_from_cart"===o.e_id||"woo_add_to_cart_on_button_click"===o.e_id)(t.woo.hasOwnProperty("addToCartCatchMethod")&&"add_cart_js"===t.woo.addToCartCatchMethod||"woo_add_to_cart_on_button_click"!==o.e_id)&&(c.updateEventId(o.name),o.eventID=c.getEventId(o.name));else if(t.facebook.ajaxForServerEvent||r||o.delay>0||"static"!==o.type){o.eventID=e(36);var d={action:"pys_api_event",pixel:"facebook",event:a,data:i,ids:t.facebook.pixelIds,eventID:o.eventID,url:window.location.href};if(o.hasOwnProperty("woo_order")&&(d.woo_order=o.woo_order),o.hasOwnProperty("edd_order")&&(d.edd_order=o.edd_order),"PageView"==a){let e=parseInt(t.cookie_duration);var l=Date.now(),_=Math.floor(1e9+9e9*Math.random());timeoutDelay=0,o.delay>0&&(timeoutDelay=o.delay),Cookies.get("_fbp")||(timeoutDelay=100),n("fbclid")&&!Cookies.get("_fbc")&&(timeoutDelay=100),setTimeout((function(){Cookies.get("_fbp")||Cookies.set("_fbp","fb.1."+l+"."+_,{expires:e}),n("fbclid")&&!Cookies.get("_fbc")&&Cookies.set("_fbc","fb.1."+l+"."+n("fbclid"),{expires:e}),jQuery.ajax({type:"POST",url:t.ajaxUrl,data:d,headers:{"Cache-Control":"no-cache"},success:function(){}})}),timeoutDelay)}else jQuery.ajax({type:"POST",url:t.ajaxUrl,data:d,headers:{"Cache-Control":"no-cache"},success:function(){}})}s=o.eventID}return s}(i,o,_);"hCR"!==o&&(t.debug&&console.log("[Facebook] "+o,_,"eventID",p),null!=p&&(u.eventID=p),fbq(d,o,_,u))}return{tag:function(){return"facebook"},isEnabled:function(){return t.hasOwnProperty("facebook")},disable:function(){i=!1},loadPixel:function(){var e,n,o,a,r,c;!i&&this.isEnabled()&&s.consentGiven("facebook")&&(e=window,n=document,o="script",e.fbq||(a=e.fbq=function(){a.callMethod?a.callMethod.apply(a,arguments):a.queue.push(arguments)},e._fbq||(e._fbq=a),a.push=a,a.loaded=!0,a.version="2.0",a.agent="dvpixelyoursite",a.queue=[],(r=n.createElement(o)).async=!0,r.src="https://connect.facebook.net/en_US/fbevents.js",(c=n.getElementsByTagName(o)[0]).parentNode.insertBefore(r,c)),t.facebook.pixelIds.forEach((function(e){if(t.facebook.removeMetadata&&fbq("set","autoConfig",!1,e),t.gdpr.consent_magic_integration_enabled&&"undefined"!=typeof CS_Data)if(0===t.facebook.advancedMatching.length)fbq("init",e);else{var n=Cookies.get("cs_enabled_advanced_matching"+test_prefix);jQuery("#cs_enabled_advanced_matching"+test_prefix).length>0?"yes"==n?fbq("init",e,t.facebook.advancedMatching):fbq("init",e):fbq("init",e,t.facebook.advancedMatching)}else 0===t.facebook.advancedMatching.length?fbq("init",e):fbq("init",e,t.facebook.advancedMatching)})),i=!0,s.fireStaticEvents("facebook"))},fireEvent:function(e,t){return!(!i||!this.isEnabled()||(t.delay=t.delay||0,t.params=t.params||{},0===t.delay?d(e,t):setTimeout((function(e,t){d(e,t)}),1e3*t.delay,e,t),0))},onCommentEvent:function(e){this.fireEvent(e.name,e)},onDownloadEvent:function(e){this.fireEvent(e.name,e)},onFormEvent:function(e){this.fireEvent(e.name,e)},onWooAddToCartOnButtonEvent:function(e){if(t.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())){var n=t.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()];window.pysWooProductData.hasOwnProperty(e)&&window.pysWooProductData[e].hasOwnProperty("facebook")&&(n=s.copyProperties(n,{}),s.copyProperties(window.pysWooProductData[e].facebook.params,n.params),this.fireEvent(n.name,n))}},onWooAddToCartOnSingleEvent:function(e,n,a,i){if(window.pysWooProductData=window.pysWooProductData||[],t.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())){var r=s.clone(t.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);if(a!==s.PRODUCT_VARIABLE||t.facebook.wooVariableAsSimple||(e=parseInt(i.find('input[name="variation_id"]').val())),window.pysWooProductData.hasOwnProperty(e)&&window.pysWooProductData[e].hasOwnProperty("facebook")){s.copyProperties(window.pysWooProductData[e].facebook.params,r.params);var c=0;if(a===s.PRODUCT_GROUPED&&(i.find(".woocommerce-grouped-product-list .qty").each((function(t){var n=o(this).attr("name").replaceAll("quantity[","").replaceAll("]",""),a=parseInt(o(this).val());isNaN(a)&&(a=0);var i=window.pysWooProductData[e].facebook.grouped[n];0==a&&r.params.content_ids.forEach((function(e,t,n){e==i.content_id&&n.splice(t,1)})),r.params.hasOwnProperty("contents")&&r.params.contents.forEach((function(e,t,n){e.id==i.content_id&&(a>0?e.quantity=a:n.splice(t,1))})),c+=i.price*a})),0==c))return;if(t.woo.addToCartOnButtonValueEnabled&&"global"!==t.woo.addToCartOnButtonValueOption)if(a===s.PRODUCT_GROUPED)r.params.value=c;else if(a===s.PRODUCT_BUNDLE){var d=o(".bundle_form .bundle_data").data("bundle_form_data"),l=function(e){var t=0;return jQuery(".bundle_form .bundled_product").each((function(n){var o=jQuery(this).find(".cart").data("bundled_item_id"),a=e.prices[o],i=jQuery(this).find(".bundled_qty").val();jQuery(this).hasClass("bundled_item_optional")&&!jQuery(this).find(".bundled_product_optional_checkbox input").prop("checked")||(t+=a*i)})),t}(d);r.params.value=(parseInt(d.base_price)+l)*n}else r.params.value=r.params.value*n;r.params.hasOwnProperty("contents")&&a!==s.PRODUCT_GROUPED&&(r.params.contents[0].quantity=n),this.fireEvent(r.name,r)}}},onWooRemoveFromCartEvent:function(e){this.fireEvent(e.name,e)},onEddAddToCartOnButtonEvent:function(e,n,o){if(t.dynamicEvents.edd_add_to_cart_on_button_click.hasOwnProperty(this.tag())){var a,i=s.clone(t.dynamicEvents.edd_add_to_cart_on_button_click[this.tag()]);if(window.pysEddProductData.hasOwnProperty(e)&&(a=n?e+"_"+n:e,window.pysEddProductData[e].hasOwnProperty(a)&&window.pysEddProductData[e][a].hasOwnProperty("facebook"))){s.copyProperties(window.pysEddProductData[e][a].facebook.params,i.params),t.edd.addToCartOnButtonValueEnabled&&"global"!==t.edd.addToCartOnButtonValueOption&&(i.params.value=i.params.value*o);var r=i.params.contents;r[0].quantity=o,i.params.contents=r,this.fireEvent(i.name,i)}}},onEddRemoveFromCartEvent:function(e){this.fireEvent(e.name,e)},onPageScroll:function(e){this.fireEvent(e.name,e)},onTime:function(e){this.fireEvent(e.name,e)},initEventIdCookies:function(t){var n={};n[t]=e(36),Cookies.set("pys_fb_event_id",JSON.stringify(n))},updateEventId:function(t){var n=Cookies.get("pys_fb_event_id");if(void 0===n)this.initEventIdCookies(t);else{var o=JSON.parse(n);o[t]=e(36),Cookies.set("pys_fb_event_id",JSON.stringify(o))}},getEventId:function(e){var t=Cookies.get("pys_fb_event_id");return void 0===t&&(this.initEventIdCookies(e),t=Cookies.get("pys_fb_event_id")),JSON.parse(t)[e]}}}(a),d=function(e){var t=!1;function n(t,n){if("function"!=typeof window.pys_event_data_filter||!window.pys_disable_event_filter(t,"ga")){var o=s.copyProperties(n,{});e.ga.trackingIds.forEach((function(n){var i=s.copyProperties(o,{}),r=function(e,t,n){if(delete n.page_title,delete n.event_url,delete n.landing_page,a(e))delete n.traffic_source,delete n.event_category,delete n.event_label,delete n.ecomm_prodid,delete n.ecomm_pagetype,delete n.ecomm_totalvalue,"search"===t&&(n.search=n.search_term,delete n.search_term,delete n.non_interaction,delete n.dynx_itemid,delete n.dynx_pagetype,delete n.dynx_totalvalue);else{switch(t){case"Comment":case"login":case"sign_up":case"EmailClick":case"TelClick":return{event_category:"Key Actions",event_action:t,non_interaction:n.non_interaction};case"Form":{let e={event_category:"Key Actions",event_action:t,non_interaction:n.non_interaction};var o=void 0!==n.form_class?"class: "+n.form_class:"";return""!=o&&(e.event_label=o),e}case"Download":return{event_category:"Key Actions",event_action:t,event_label:n.download_name,non_interaction:n.non_interaction};case"TimeOnPage":case"PageScroll":return{event_category:"Key Actions",event_action:t,event_label:document.title,non_interaction:n.non_interaction};case"search":return{event_category:"Key Actions",event_action:t,event_label:n.search_term,non_interaction:n.non_interaction}}delete n.post_type,delete n.post_id,delete n.plugin,delete n.user_role,delete n.cartlows,delete n.cartflows_flow,delete n.cartflows_step}return n}(n,t,i);!function(t,n,o){o.send_to=t,e.debug&&console.log("[Google Analytics #"+t+"] "+n,o),gtag("event",n,o)}(n,t,r)}))}}function a(e){return 0===e.indexOf("G")}return{tag:function(){return"ga"},isEnabled:function(){return e.hasOwnProperty("ga")},disable:function(){t=!1},loadPixel:function(){if(!t&&this.isEnabled()&&s.consentGiven("analytics")){s.loadGoogleTag(e.ga.trackingIds[0]);var n={link_attribution:e.ga.enhanceLinkAttr,anonymize_ip:e.ga.anonimizeIP};e.ga.crossDomainEnabled&&(n.linker={accept_incoming:e.ga.crossDomainAcceptIncoming,domains:e.ga.crossDomainDomains}),e.ga.trackingIds.forEach((function(t,o){n.debug_mode=e.ga.isDebugEnabled.includes("index_"+o),a(t)&&(e.ga.disableAdvertisingFeatures&&(n.allow_google_signals=!1),e.ga.disableAdvertisingPersonalization&&(n.allow_ad_personalization_signals=!1)),gtag("config",t,n)})),t=!0,s.fireStaticEvents("ga")}},fireEvent:function(e,o){return!(!t||!this.isEnabled()||(o.delay=o.delay||0,o.params=o.params||{},0===o.delay?n(e,o.params):setTimeout((function(e,t){n(e,t)}),1e3*o.delay,e,o.params),0))},onCommentEvent:function(e){this.fireEvent(e.name,e)},onDownloadEvent:function(e){this.fireEvent(e.name,e)},onFormEvent:function(e){this.fireEvent(e.name,e)},onWooAddToCartOnButtonEvent:function(t){if(e.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())){var n=s.clone(e.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);window.pysWooProductData.hasOwnProperty(t)&&window.pysWooProductData[t].hasOwnProperty("ga")&&(s.copyProperties(window.pysWooProductData[t].ga.params,n.params),this.fireEvent(n.name,n))}},onWooAddToCartOnSingleEvent:function(t,n,a,i){if(window.pysWooProductData=window.pysWooProductData||[],e.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())){var r=s.clone(e.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);if(a!==s.PRODUCT_VARIABLE||e.ga.wooVariableAsSimple||(t=parseInt(i.find('input[name="variation_id"]').val())),window.pysWooProductData.hasOwnProperty(t)&&window.pysWooProductData[t].hasOwnProperty("ga")){if(s.copyProperties(window.pysWooProductData[t].ga.params,r.params),a===s.PRODUCT_GROUPED){var c=0;if(i.find(".woocommerce-grouped-product-list .qty").each((function(e){var n=o(this).attr("name").replaceAll("quantity[","").replaceAll("]",""),a=parseInt(o(this).val());isNaN(a)&&(a=0);var i=window.pysWooProductData[t].ga.grouped[n];r.params.items.forEach((function(e,t,n){e.id==i.content_id&&(a>0?e.quantity=a:n.splice(t,1))})),c+=i.price*a})),e.woo.addToCartOnButtonValueEnabled&&"global"!==e.woo.addToCartOnButtonValueOption&&r.params.hasOwnProperty("ecomm_totalvalue")&&(r.params.ecomm_totalvalue=c),0==c)return}else r.params.items[0].quantity=n;e.woo.addToCartOnButtonValueEnabled&&"global"!==e.woo.addToCartOnButtonValueOption&&a!==s.PRODUCT_GROUPED&&r.params.hasOwnProperty("ecomm_totalvalue")&&(r.params.ecomm_totalvalue=r.params.items[0].price*n),this.fireEvent(r.name,r)}}},onWooRemoveFromCartEvent:function(e){this.fireEvent(e.name,e)},onEddAddToCartOnButtonEvent:function(t,n,o){if(e.dynamicEvents.edd_add_to_cart_on_button_click.hasOwnProperty(this.tag())){var a,i=s.clone(e.dynamicEvents.edd_add_to_cart_on_button_click[this.tag()]);window.pysEddProductData.hasOwnProperty(t)&&(a=n?t+"_"+n:t,window.pysEddProductData[t].hasOwnProperty(a)&&window.pysEddProductData[t][a].hasOwnProperty("ga")&&(s.copyProperties(window.pysEddProductData[t][a].ga.params,i.params),i.params.items[0].quantity=o,this.fireEvent(i.name,i)))}},onEddRemoveFromCartEvent:function(e){this.fireEvent(e.name,e)},onPageScroll:function(e){this.fireEvent(e.name,e)},onTime:function(e){this.fireEvent(e.name,e)}}}(a);window.pys=window.pys||{},window.pys.Facebook=c,window.pys.Analytics=d,window.pys.Utils=s,o(document).ready((function(){if(o("#pys_late_event").length>0){var e=JSON.parse(o("#pys_late_event").attr("dir"));for(var n in e){var i={};i[e[n].e_id]=[e[n]],a.staticEvents.hasOwnProperty(n)?Object.assign(a.staticEvents[n],i):a.staticEvents[n]=i}}var r=s.setupPinterestObject(),l=s.setupBingObject();if(s.manageCookies(),s.setupGdprCallbacks(),a.dynamicEvents.hasOwnProperty("automatic_event_scroll")){var _=function(){var e=o(document).height()-o(window).height(),n=!1;if(a.dynamicEvents.hasOwnProperty("automatic_event_scroll"))for(var i=Object.keys(a.dynamicEvents.automatic_event_scroll),r=0;r<i.length;r++){var c=s.clone(a.dynamicEvents.automatic_event_scroll[i[r]]);Math.round(e*c.scroll_percent/100)<o(window).scrollTop()&&(s.copyProperties(s.getRequestParams(),c.params),t(i[r]).onPageScroll(c),n=!0)}n&&o(document).off("scroll",_)};o(document).on("scroll",_)}if(a.dynamicEvents.hasOwnProperty("automatic_event_time_on_page")){var u=Object.keys(a.dynamicEvents.automatic_event_time_on_page),p=a.dynamicEvents.automatic_event_time_on_page[u[0]].time_on_page;setTimeout((function(){for(var e=0;e<u.length;e++){var n=s.clone(a.dynamicEvents.automatic_event_time_on_page[u[e]]);s.copyProperties(s.getRequestParams(),n.params),t(u[e]).onTime(n)}}),1e3*p)}a.dynamicEvents.hasOwnProperty("automatic_event_download")&&o(document).onFirst("click",'a, button, input[type="button"], input[type="submit"]',(function(e){var n=o(this);if(a.dynamicEvents.hasOwnProperty("automatic_event_download")){var i=!1;if(n.is("a")){var r=n.attr("href");if("string"!=typeof r)return;r=r.trim();var c=s.getLinkExtension(r);if(c.length>0&&a.dynamicEvents.hasOwnProperty("automatic_event_download"))for(var d=Object.keys(a.dynamicEvents.automatic_event_download),l=0;l<d.length;l++){var _=s.clone(a.dynamicEvents.automatic_event_download[d[l]]);_.extensions.includes(c)&&("tiktok"==d[l]?t(d[l]).fireEvent(tikEvent.name,_):(a.enable_remove_download_url_param&&(r=r.split("?")[0]),_.params.download_url=r,_.params.download_type=c,_.params.download_name=s.getLinkFilename(r),t(d[l]).onDownloadEvent(_)),i=!0)}}if(i)return}})),o.each(a.triggerEventTypes,(function(e,t){o.each(t,(function(t,n){switch(e){case"url_click":break;case"css_click":s.setupCSSClickEvents(t,n);break;case"css_mouseover":s.setupMouseOverClickEvents(t,n);break;case"scroll_pos":s.setupScrollPosEvents(t,n);break;case"comment":s.setupCommentEvents(t,n)}}))})),a.woo.enabled&&(a.dynamicEvents.hasOwnProperty("woo_add_to_cart_on_button_click")&&a.woo.hasOwnProperty("addToCartCatchMethod")&&"add_cart_js"===a.woo.addToCartCatchMethod&&(o(".add_to_cart_button:not(.product_type_variable,.product_type_bundle,.single_add_to_cart_button)").on("click",(function(e){var t=o(this).data("product_id");void 0!==t&&(c.onWooAddToCartOnButtonEvent(t),d.onWooAddToCartOnButtonEvent(t),r.onWooAddToCartOnButtonEvent(t),l.onWooAddToCartOnButtonEvent(t))})),o("body").onFirst("click","button.single_add_to_cart_button,.single_add_to_cart_button",(function(e){var t=o(this);if(!t.hasClass("disabled")){var n=t.closest("form"),a=s.PRODUCT_SIMPLE;if(0!==n.length){var i,_;if(n.hasClass("variations_form")?a=s.PRODUCT_VARIABLE:n.hasClass("bundle_form")?a=s.PRODUCT_BUNDLE:n.hasClass("grouped_form")&&(a=s.PRODUCT_GROUPED),a===s.PRODUCT_GROUPED)_=1,i=parseInt(n.find('*[name="add-to-cart"]').val());else if(a===s.PRODUCT_VARIABLE)i=parseInt(n.find('*[name="add-to-cart"]').val()),(u=n.find('input[name="quantity"]')).length<=0&&(u=n.find('select[name="quantity"]')),_=parseInt(u.val());else{var u;i=parseInt(n.find('*[name="add-to-cart"]').val()),(u=n.find('input[name="quantity"]')).length<=0&&(u=n.find('select[name="quantity"]')),_=parseInt(u.val())}c.onWooAddToCartOnSingleEvent(i,_,a,n),d.onWooAddToCartOnSingleEvent(i,_,a,n),r.onWooAddToCartOnSingleEvent(i,_,a,!1,n),l.onWooAddToCartOnSingleEvent(i,_,a,!1,n)}}}))),a.dynamicEvents.hasOwnProperty("woo_remove_from_cart")&&o("body").on("click",a.woo.removeFromCartSelector,(function(e){var t=o(e.currentTarget).attr("href"),n=new RegExp("[\\?&]remove_item=([^&#]*)").exec(t);if(null!==n){var i=n[1];if(a.dynamicEvents.woo_remove_from_cart.hasOwnProperty(i)){var r=a.dynamicEvents.woo_remove_from_cart[i];s.fireEventForAllPixel("onWooRemoveFromCartEvent",r)}}}))),a.edd.enabled&&(a.dynamicEvents.hasOwnProperty("edd_add_to_cart_on_button_click")&&o("form.edd_download_purchase_form .edd-add-to-cart").on("click",(function(e){var t,n,a=o(this),i=a.closest("form"),s=a.data("variablePrice"),_=a.data("priceMode"),u=[],p=[];"yes"===s&&"multi"===_?(n=i.find('input[name="download_id"]').val(),o.each(i.find('input[name="edd_options[price_id][]"]:checked'),(function(e,t){u.push(n+"_"+o(t).val())})),o.each(u,(function(e,n){var o=n.split("_",2);void 0!==(t=i.find('input[name="edd_download_quantity_'+o[1]+'"]').val())?p.push(t):p.push(1)}))):"yes"===s&&"single"===_?(n=i.find('input[name="download_id"]').val(),u.push(n+"_"+i.find('input[name="edd_options[price_id][]"]:checked').val()),void 0!==(t=i.find('input[name="edd_download_quantity"]').val())?p.push(t):p.push(1)):(u.push(a.data("downloadId")),void 0!==(t=i.find('input[name="edd_download_quantity"]').val())?p.push(t):p.push(1)),o.each(u,(function(e,t){var n,o=parseInt(p[e]),a=t.toString().split("_",2);2===a.length&&(t=a[0],n=a[1]),c.onEddAddToCartOnButtonEvent(t,n,o),d.onEddAddToCartOnButtonEvent(t,n,o),r.onEddAddToCartOnButtonEvent(t,n,o),l.onEddAddToCartOnButtonEvent(t,n,o)}))})),a.dynamicEvents.hasOwnProperty("edd_remove_from_cart")&&o("form#edd_checkout_cart_form .edd_cart_remove_item_btn").on("click",(function(e){var t=o(this).attr("href");if(t){var n=t.substring(t.indexOf("=")+1).charAt(0);if(a.dynamicEvents.edd_remove_from_cart.hasOwnProperty(n)){var i=a.dynamicEvents.edd_remove_from_cart[n];s.fireEventForAllPixel("onEddRemoveFromCartEvent",i)}}}))),a.dynamicEvents.hasOwnProperty("automatic_event_comment")&&o("form.comment-form").on("submit",(function(){if(a.dynamicEvents.hasOwnProperty("automatic_event_comment"))for(var e=Object.keys(a.dynamicEvents.automatic_event_comment),n=0;n<e.length;n++){var o=s.clone(a.dynamicEvents.automatic_event_comment[e[n]]);s.copyProperties(s.getRequestParams(),o.params),t(e[n]).onCommentEvent(o)}})),a.dynamicEvents.hasOwnProperty("automatic_event_form")&&(o(document).onFirst("submit","form",(function(e){var n=o(this);if(!n.hasClass("comment-form")&&!n.hasClass("search-form")&&"adminbarsearch"!==n.attr("id")&&!(n.hasClass("woocommerce-product-search")||n.hasClass("cart")||n.hasClass("woocommerce-cart-form")||n.hasClass("woocommerce-shipping-calculator")||n.hasClass("checkout")||n.hasClass("checkout_coupon")||n.hasClass("edd_form")||n.hasClass("edd_download_purchase_form"))){var i={form_id:n.attr("id"),form_class:n.attr("class"),text:n.find('[type="submit"]').is("input")?n.find('[type="submit"]').val():n.find('[type="submit"]').text()};if(a.dynamicEvents.hasOwnProperty("automatic_event_form"))for(var r=Object.keys(a.dynamicEvents.automatic_event_form),c=0;c<r.length;c++){var d=s.clone(a.dynamicEvents.automatic_event_form[r[c]]);"tiktok"===r[c]?t(r[c]).fireEvent(d.name,d):(s.copyProperties(i,d.params),s.copyProperties(s.getRequestParams(),d.params),t(r[c]).onFormEvent(d))}}})),o(document).on("forminator:form:submit:success",(function(e){var n={form_id:o(e.target).find('input[name="form_id"]').val(),text:o(e.target).find(".forminator-button-submit").text()};if(a.dynamicEvents.hasOwnProperty("automatic_event_form"))for(var i=Object.keys(a.dynamicEvents.automatic_event_form),r=0;r<i.length;r++){var c=s.clone(a.dynamicEvents.automatic_event_form[i[r]]);s.copyProperties(n,c.params),s.copyProperties(s.getRequestParams(),c.params),t(i[r]).onFormEvent(c)}})),o(document).onFirst("nfFormSubmitResponse",(function(e,n){var o={form_id:n.response.data.form_id,text:n.response.data.settings.title};if(a.dynamicEvents.hasOwnProperty("automatic_event_form"))for(var i=Object.keys(a.dynamicEvents.automatic_event_form),r=0;r<i.length;r++){var c=a.dynamicEvents.automatic_event_form[i[r]];s.copyProperties(o,c.params),s.copyProperties(s.getRequestParams(),c.params),t(i[r]).onFormEvent(c)}}))),s.loadPixels(),s.isCheckoutPage()&&s.addCheckoutFields()}))}(jQuery,pysOptions);var n=function(e){var t,n,o=window.location.search.substring(1).split("&");for(n=0;n<o.length;n++)if((t=o[n].split("="))[0]===e)return void 0===t[1]||decodeURIComponent(t[1]);return!1}})();
|
1 |
+
(()=>{function e(e){for(var t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".split(""),n=[],o=0;o<e;o++){var a=(Math.random()*(t.length-1)).toFixed(0);n[o]=t[a]}return n.join("")}function t(e){switch(e){case"facebook":return window.pys.Facebook;case"ga":return window.pys.Analytics;case"bing":return window.pys.Bing;case"pinterest":return window.pys.Pinterest}}Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),o=n.length>>>0;if(0===o)return!1;for(var a,i,r=0|t,s=Math.max(r>=0?r:o-Math.abs(r),0);s<o;){if((a=n[s])===(i=e)||"number"==typeof a&&"number"==typeof i&&isNaN(a)&&isNaN(i))return!0;s++}return!1}}),function(o,a){a.debug&&console.log("PYS:",a);var i={isEnabled:function(){},disable:function(){},loadPixel:function(){},fireEvent:function(e,t){return!1},onCommentEvent:function(){},onDownloadEvent:function(e){},onFormEvent:function(e){},onWooAddToCartOnButtonEvent:function(e){},onWooAddToCartOnSingleEvent:function(e,t,n,o,a){},onWooRemoveFromCartEvent:function(e){},onEddAddToCartOnButtonEvent:function(e,t,n){},onEddRemoveFromCartEvent:function(e){},onPageScroll:function(e){},onTime:function(e){}},r={isEnabled:function(){},disable:function(){},loadPixel:function(){},fireEvent:function(e,t){return!1},onAdSenseEvent:function(){},onClickEvent:function(e){},onWatchVideo:function(e){},onCommentEvent:function(){},onFormEvent:function(e){},onDownloadEvent:function(e){},onWooAddToCartOnButtonEvent:function(e){},onWooAddToCartOnSingleEvent:function(e,t,n,o,a){},onWooRemoveFromCartEvent:function(e){},onWooAffiliateEvent:function(e){},onWooPayPalEvent:function(){},onEddAddToCartOnButtonEvent:function(e,t,n){},onEddRemoveFromCartEvent:function(e){},onPageScroll:function(e){},onTime:function(e){}},s=function(e){var t=i,n=r,a=!1;let l=function(){let t=6e4*e.last_visit_duration;if(void 0===Cookies.get("pys_start_session")||void 0===Cookies.get("pys_session_limit")){var n=new Date;return n.setTime(n.getTime()+t),Cookies.set("pys_session_limit",!0,{expires:n}),Cookies.set("pys_start_session",!0),!0}return!1}(),_=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],u=["fbadid","gadid","padid","bingid"];function p(){e.gdpr.all_disabled_by_api||(e.gdpr.facebook_disabled_by_api||c.loadPixel(),e.gdpr.analytics_disabled_by_api||d.loadPixel(),e.gdpr.pinterest_disabled_by_api||t.loadPixel(),e.gdpr.bing_disabled_by_api||n.loadPixel()),e.gdpr.consent_magic_integration_enabled&&"undefined"!=typeof CS_Data&&void 0!==CS_Data.cs_google_analytics_consent_mode&&1==CS_Data.cs_google_analytics_consent_mode&&d.loadPixel()}function f(){try{let n,o=document.referrer.toString(),a=0===o.length,i=!a&&0===o.indexOf(e.siteUrl);return n=!1==(!a&&!i)?"direct":o,"direct"!==n?-1!==(t=(t=n).replace(/(https?:\/\/)?(www.)?/i,"")).indexOf("/")?t.split("/")[0]:t:n}catch(e){return console.error(e),"direct"}var t}function m(e=!1){try{let t="pys_",n=[];return e&&(t="last_pys_"),o.each(u,(function(e,o){Cookies.get(t+o)&&(n[o]=Cookies.get(t+o))})),n}catch(e){return console.error(e),[]}}function v(e=!1){try{let t="pys_";e&&(t="last_pys_");let n=[];return o.each(_,(function(e,o){if(Cookies.get(t+o)){let e=Cookies.get(t+o);n[o]=function(e){return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)?void 0:e}(e)}})),n}catch(e){return console.error(e),[]}}return{PRODUCT_SIMPLE:0,PRODUCT_VARIABLE:1,PRODUCT_BUNDLE:2,PRODUCT_GROUPED:3,fireEventForAllPixel:function(e,o){o.hasOwnProperty(c.tag())&&c[e](o[c.tag()]),o.hasOwnProperty(d.tag())&&d[e](o[d.tag()]),o.hasOwnProperty(t.tag())&&t[e](o[t.tag()]),o.hasOwnProperty(n.tag())&&n[e](o[n.tag()])},setupPinterestObject:function(){return t=window.pys.Pinterest||t},setupBingObject:function(){return n=window.pys.Bing||n},copyProperties:function(e,t){for(var n in e)"function"!=typeof e[n]&&(t[n]=e[n]);return t},manageCookies:function(){let t=parseInt(e.cookie_duration),n=function(){try{var e={},t=[];return window.location.search.substr(1).split("&").forEach((function(n){(t=n.split("=")).length>1&&(e[t[0]]=t[1])})),e}catch(e){return console.error(e),{}}}(),a=window.location.href.split("?")[0];try{void 0===Cookies.get("pys_first_visit")&&(Cookies.set("pys_first_visit",!0,{expires:t}),Cookies.set("pysTrafficSource",f(),{expires:t}),Cookies.set("pys_landing_page",a,{expires:t}),o.each(_,(function(e,o){n.hasOwnProperty(o)?Cookies.set("pys_"+o,n[o],{expires:t}):Cookies.remove("pys_"+o)})),o.each(u,(function(e,o){n.hasOwnProperty(o)?Cookies.set("pys_"+o,n[o],{expires:t}):Cookies.remove("pys_"+o)}))),l&&(Cookies.set("last_pysTrafficSource",f(),{expires:t}),o.each(_,(function(e,o){n.hasOwnProperty(o)?Cookies.set("last_pys_"+o,n[o],{expires:t}):Cookies.remove("last_pys_"+o)})),o.each(u,(function(e,o){n.hasOwnProperty(o)?Cookies.set("last_pys_"+o,n[o],{expires:t}):Cookies.remove("last_pys_"+o)})),Cookies.set("last_pys_landing_page",a,{expires:t}))}catch(e){console.error(e)}},clone:function(e){var t;if(null==e||"object"!=typeof e)return e;if(e instanceof Date)return(t=new Date).setTime(e.getTime()),t;if(e instanceof Array){t=[];for(var n=0,o=e.length;n<o;n++)"function"!=typeof e[n]&&(t[n]=s.clone(e[n]));return t}if(e instanceof Object){for(var a in t={},e)if(e.hasOwnProperty(a)){if("function"==typeof e[a])continue;t[a]=s.clone(e[a])}return t}return e},getTagsAsArray:function(e){return[].slice.call(document.getElementsByTagName(e))},getRequestParams:function(){return[]},setupMouseOverClickEvents:function(e,t){o(document).onFirst("mouseover",t.join(","),(function(){if(o(this).hasClass("pys-mouse-over-"+e))return!0;o(this).addClass("pys-mouse-over-"+e),s.fireDynamicEvent(e)}))},setupCSSClickEvents:function(e,t){o(document).onFirst("click",t.join(","),(function(){s.fireTriggerEvent(e)}))},setupURLClickEvents:function(){o("a[data-pys-event-id]").onFirst("click",(function(e){o(this).attr("data-pys-event-id").split(",").forEach((function(e){e=parseInt(e),!1===isNaN(e)&&s.fireTriggerEvent(e)}))}))},setupScrollPosEvents:function(e,t){var n={},a=o(document).height()-o(window).height();o.each(t,(function(t,o){o=a*o/100,o=Math.round(o),n[o]=e})),o(document).on("scroll",(function(){var e=o(window).scrollTop();o.each(n,(function(t,o){return e<=t||null===o||(n[t]=null,void s.fireTriggerEvent(o))}))}))},setupCommentEvents:function(e,t){o("form.comment-form").on("submit",(function(){s.fireTriggerEvent(e)}))},fireTriggerEvent:function(o){if(e.triggerEvents.hasOwnProperty(o)){var a={},i=e.triggerEvents[o];i.hasOwnProperty("facebook")&&(a=i.facebook,c.fireEvent(a.name,a)),i.hasOwnProperty("ga")&&(a=i.ga,d.fireEvent(a.name,a)),i.hasOwnProperty("pinterest")&&(a=i.pinterest,t.fireEvent(a.name,a)),i.hasOwnProperty("bing")&&(a=i.bing,n.fireEvent(a.name,a))}},fireStaticEvents:function(a){e.staticEvents.hasOwnProperty(a)&&o.each(e.staticEvents[a],(function(e,i){o.each(i,(function(e,o){if(o.fired=o.fired||!1,!o.fired){var i=!1;"facebook"===a?i=c.fireEvent(o.name,o):"ga"===a?i=d.fireEvent(o.name,o):"pinterest"===a?i=t.fireEvent(o.name,o):"bing"===a&&(i=n.fireEvent(o.name,o)),o.fired=i}}))}))},loadGoogleTag:function(e){a||(function(e,t,n){var o=t.createElement("script"),a=t.getElementsByTagName("script")[0];o.async=1,o.src=n,a.parentNode.insertBefore(o,a)}(window,document,"//www.googletagmanager.com/gtag/js?id="+e),window.dataLayer=window.dataLayer||[],window.gtag=window.gtag||function(){dataLayer.push(arguments)},gtag("js",new Date),a=!0)},loadPixels:function(){e.gdpr.ajax_enabled&&!e.gdpr.consent_magic_integration_enabled?o.get({url:e.ajaxUrl,dataType:"json",data:{action:"pys_get_gdpr_filters_values"},success:function(t){t.success&&(e.gdpr.all_disabled_by_api=t.data.all_disabled_by_api,e.gdpr.facebook_disabled_by_api=t.data.facebook_disabled_by_api,e.gdpr.analytics_disabled_by_api=t.data.analytics_disabled_by_api,e.gdpr.google_ads_disabled_by_api=t.data.google_ads_disabled_by_api,e.gdpr.pinterest_disabled_by_api=t.data.pinterest_disabled_by_api,e.gdpr.bing_disabled_by_api=t.data.bing_disabled_by_api),p()}}):p()},consentGiven:function(t){if(e.gdpr.consent_magic_integration_enabled&&"undefined"!=typeof CS_Data){var n=Cookies.get("cs_viewed_cookie_policy"+test_prefix);if(e.gdpr[t+"_prior_consent_enabled"]){if(void 0===n||"yes"===n)return!0}else if(void 0===n||"yes"===n)return!0;if(e.gdpr.consent_magic_integration_enabled&&"undefined"!=typeof CS_Data){if(void 0!==CS_Data.cs_google_analytics_consent_mode&&1==CS_Data.cs_google_analytics_consent_mode&&"analytics"==t)return!0;if(void 0!==CS_Data.cs_google_ads_consent_mode&&1==CS_Data.cs_google_ads_consent_mode&&"google_ads"==t)return!0}return!1}if(e.gdpr.real_cookie_banner_integration_enabled){var o=window.consentApi;if(o)switch(t){case"analytics":return o.consentSync("http","_ga","*").cookieOptIn;case"facebook":return o.consentSync("http","_fbp","*").cookieOptIn;case"pinterest":return o.consentSync("http","_pinterest_sess",".pinterest.com").cookieOptIn;default:return!0}}if(e.gdpr.cookiebot_integration_enabled&&"undefined"!=typeof Cookiebot){var a=e.gdpr["cookiebot_"+t+"_consent_category"];if(e.gdpr[t+"_prior_consent_enabled"]){if(!1===Cookiebot.consented||Cookiebot.consent[a])return!0}else if(Cookiebot.consent[a])return!0;return!1}if(e.gdpr.cookie_notice_integration_enabled&&"undefined"!=typeof cnArgs){var i=Cookies.get(cnArgs.cookieName);if(e.gdpr[t+"_prior_consent_enabled"]){if(void 0===i||"true"===i)return!0}else if("true"===i)return!0;return!1}if(e.gdpr.cookie_law_info_integration_enabled){var r=Cookies.get("viewed_cookie_policy");if(e.gdpr[t+"_prior_consent_enabled"]){if(void 0===r||"yes"===r)return!0}else if("yes"===r)return!0;return!1}return!0},setupGdprCallbacks:function(){if(e.gdpr.consent_magic_integration_enabled&&"undefined"!=typeof CS_Data){var a=CS_Data.test_prefix,i=!1;if(1==CS_Data.cs_refresh_after_consent&&(i=CS_Data.cs_refresh_after_consent),!i){for(var r=document.cookie.split(";"),s=1;s<=r.length;s++)if(-1!==r[s-1].indexOf("cs_enabled_cookie_term")){var l=r[s-1].replace("cs_enabled_cookie_term"+a+"_","");l=Number(l.replace(/\D+/g,"")),"yes"==Cookies.get("cs_enabled_cookie_term"+a+"_"+l)?(l===CS_Data.cs_script_cat.facebook&&c.loadPixel(),l===CS_Data.cs_script_cat.bing&&n.loadPixel(),(l===CS_Data.cs_script_cat.analytics||void 0!==CS_Data.cs_google_analytics_consent_mode&&1==CS_Data.cs_google_analytics_consent_mode)&&d.loadPixel(),l===CS_Data.cs_script_cat.pinterest&&t.loadPixel()):(l===CS_Data.cs_script_cat.facebook&&c.disable(),l===CS_Data.cs_script_cat.bing&&n.disable(),l!==CS_Data.cs_script_cat.analytics||void 0!==CS_Data.cs_google_analytics_consent_mode&&0!=CS_Data.cs_google_analytics_consent_mode||d.disable(),l===CS_Data.cs_script_cat.pinterest&&t.disable()),"yes"==Cookies.get("cs_enabled_advanced_matching")&&c.loadPixel()}o(document).on("click",".cs_action_btn",(function(e){e.preventDefault();var a=o(this).attr("data-cs_action");"allow_all"===a?(c.loadPixel(),n.loadPixel(),d.loadPixel(),t.loadPixel()):"disable_all"===a&&(c.disable(),n.disable(),0!=CS_Data.cs_google_analytics_consent_mode&&void 0!==CS_Data.cs_google_analytics_consent_mode||d.disable(),t.disable())}))}}if(e.gdpr.real_cookie_banner_integration_enabled){var _=window.consentApi;_&&(_.consent("http","_ga","*").then(d.loadPixel.bind(d),d.disable.bind(d)),_.consent("http","_fbp","*").then(c.loadPixel.bind(c),c.disable.bind(c)),_.consent("http","_pinterest_sess",".pinterest.com").then(t.loadPixel.bind(t),t.disable.bind(t)))}e.gdpr.cookiebot_integration_enabled&&"undefined"!=typeof Cookiebot&&window.addEventListener("CookiebotOnConsentReady",(function(){Cookiebot.consent.marketing&&(c.loadPixel(),n.loadPixel(),t.loadPixel()),Cookiebot.consent.statistics&&d.loadPixel(),Cookiebot.consent.marketing||(c.disable(),t.disable(),n.disable()),Cookiebot.consent.statistics||d.disable()})),e.gdpr.cookie_notice_integration_enabled&&(o(document).onFirst("click",".cn-set-cookie",(function(){"accept"===o(this).data("cookie-set")?(c.loadPixel(),d.loadPixel(),t.loadPixel(),n.loadPixel()):(c.disable(),d.disable(),t.disable(),n.disable())})),o(document).onFirst("click",".cn-revoke-cookie",(function(){c.disable(),d.disable(),t.disable(),n.disable()}))),e.gdpr.cookie_law_info_integration_enabled&&(o(document).onFirst("click","#cookie_action_close_header",(function(){c.loadPixel(),d.loadPixel(),t.loadPixel(),n.loadPixel()})),o(document).onFirst("click","#cookie_action_close_header_reject",(function(){c.disable(),d.disable(),t.disable(),n.disable()})))},getLinkExtension:function(e){return(e=(e=(e=e.substring(0,-1===e.indexOf("#")?e.length:e.indexOf("#"))).substring(0,-1===e.indexOf("?")?e.length:e.indexOf("?"))).substring(e.lastIndexOf("/")+1,e.length)).length>0&&-1!==e.indexOf(".")?e=e.substring(e.indexOf(".")+1):""},getLinkFilename:function(e){return(e=(e=(e=e.substring(0,-1===e.indexOf("#")?e.length:e.indexOf("#"))).substring(0,-1===e.indexOf("?")?e.length:e.indexOf("?"))).substring(e.lastIndexOf("/")+1,e.length)).length>0&&-1!==e.indexOf(".")?e:""},isCheckoutPage:function(){return o("body").hasClass("woocommerce-checkout")||o("body").hasClass("edd-checkout")},addCheckoutFields:function(){var e="",t=v();o.each(_,(function(n,o){n>0&&(e+="|"),e+=o+":"+t[o]}));var n="",a=m();o.each(u,(function(e,t){e>0&&(n+="|"),n+=t+":"+a[t]}));var i="",r=m(!0);o.each(u,(function(e,t){e>0&&(i+="|"),i+=t+":"+r[t]}));var s="",c=v(!0);o.each(_,(function(e,t){e>0&&(s+="|"),s+=t+":"+c[t]}));var d=function(){var e=new Array,t=new Date;return e.push(["00-01","01-02","02-03","03-04","04-05","05-06","06-07","07-08","08-09","09-10","10-11","11-12","12-13","13-14","14-15","15-16","16-17","17-18","18-19","19-20","20-21","21-22","22-23","23-24"][t.getHours()]),e.push(["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][t.getDay()]),e.push(["January","February","March","April","May","June","July","August","September","October","November","December"][t.getMonth()]),e}(),l=Cookies.get("pys_landing_page"),p=Cookies.get("last_pys_landing_page"),f=Cookies.get("pysTrafficSource"),y=Cookies.get("last_pysTrafficSource"),g=null;g=o("body").hasClass("woocommerce-checkout")?o("form.woocommerce-checkout"):o("#edd_purchase_form");var b={pys_utm:e,pys_utm_id:n,pys_browser_time:d.join("|"),pys_landing:l,pys_source:f,pys_order_type:o(".wcf-optin-form").length>0?"wcf-optin":"normal",last_pys_landing:p,last_pys_source:y,last_pys_utm:s,last_pys_utm_id:i};Object.keys(b).forEach((function(e,t){g.append("<input type='hidden' name='"+e+"' value='"+b[e]+"' /> ")}))}}}(a),c=function(t){var a=["PageView","ViewContent","Search","AddToCart","AddToWishlist","InitiateCheckout","AddPaymentInfo","Purchase","Lead","Subscribe","CustomizeProduct","FindLocation","StartTrial","SubmitApplication","Schedule","Contact","Donate"],i=!1,r=t.gdpr.all_disabled_by_api||t.gdpr.facebook_disabled_by_api||t.gdpr.cookiebot_integration_enabled||t.gdpr.consent_magic_integration_enabled||t.gdpr.cookie_notice_integration_enabled||t.gdpr.cookie_law_info_integration_enabled;function d(o,i){if("function"==typeof window.pys_event_data_filter&&window.pys_disable_event_filter(o,"facebook"))return;var d=a.includes(o)?"track":"trackCustom",l=i.params,_={},u={};s.copyProperties(l,_);let p=function(o,a,i){let s=null;if(t.facebook.serverApiEnabled){if("woo_remove_from_cart"===o.e_id||"woo_add_to_cart_on_button_click"===o.e_id)(t.woo.hasOwnProperty("addToCartCatchMethod")&&"add_cart_js"===t.woo.addToCartCatchMethod||"woo_add_to_cart_on_button_click"!==o.e_id)&&(c.updateEventId(o.name),o.eventID=c.getEventId(o.name));else if(t.facebook.ajaxForServerEvent||r||o.delay>0||"static"!==o.type){o.eventID=e(36);var d={action:"pys_api_event",pixel:"facebook",event:a,data:i,ids:t.facebook.pixelIds,eventID:o.eventID,url:window.location.href};if(o.hasOwnProperty("woo_order")&&(d.woo_order=o.woo_order),o.hasOwnProperty("edd_order")&&(d.edd_order=o.edd_order),"PageView"==a){let e=parseInt(t.cookie_duration);var l=Date.now(),_=Math.floor(1e9+9e9*Math.random());timeoutDelay=0,o.delay>0&&(timeoutDelay=o.delay),Cookies.get("_fbp")||(timeoutDelay=100),n("fbclid")&&!Cookies.get("_fbc")&&(timeoutDelay=100),setTimeout((function(){Cookies.get("_fbp")||Cookies.set("_fbp","fb.1."+l+"."+_,{expires:e}),n("fbclid")&&!Cookies.get("_fbc")&&Cookies.set("_fbc","fb.1."+l+"."+n("fbclid"),{expires:e}),jQuery.ajax({type:"POST",url:t.ajaxUrl,data:d,headers:{"Cache-Control":"no-cache"},success:function(){}})}),timeoutDelay)}else jQuery.ajax({type:"POST",url:t.ajaxUrl,data:d,headers:{"Cache-Control":"no-cache"},success:function(){}})}s=o.eventID}return s}(i,o,_);"hCR"!==o&&(t.debug&&console.log("[Facebook] "+o,_,"eventID",p),null!=p&&(u.eventID=p),fbq(d,o,_,u))}return{tag:function(){return"facebook"},isEnabled:function(){return t.hasOwnProperty("facebook")},disable:function(){i=!1},loadPixel:function(){var e,n,o,a,r,c;!i&&this.isEnabled()&&s.consentGiven("facebook")&&(e=window,n=document,o="script",e.fbq||(a=e.fbq=function(){a.callMethod?a.callMethod.apply(a,arguments):a.queue.push(arguments)},e._fbq||(e._fbq=a),a.push=a,a.loaded=!0,a.version="2.0",a.agent="dvpixelyoursite",a.queue=[],(r=n.createElement(o)).async=!0,r.src="https://connect.facebook.net/en_US/fbevents.js",(c=n.getElementsByTagName(o)[0]).parentNode.insertBefore(r,c)),t.facebook.pixelIds.forEach((function(e){if(t.facebook.removeMetadata&&fbq("set","autoConfig",!1,e),t.gdpr.consent_magic_integration_enabled&&"undefined"!=typeof CS_Data)if(0===t.facebook.advancedMatching.length)fbq("init",e);else{var n=Cookies.get("cs_enabled_advanced_matching"+test_prefix);jQuery("#cs_enabled_advanced_matching"+test_prefix).length>0?"yes"==n?fbq("init",e,t.facebook.advancedMatching):fbq("init",e):fbq("init",e,t.facebook.advancedMatching)}else 0===t.facebook.advancedMatching.length?fbq("init",e):fbq("init",e,t.facebook.advancedMatching)})),i=!0,s.fireStaticEvents("facebook"))},fireEvent:function(e,t){return!(!i||!this.isEnabled()||(t.delay=t.delay||0,t.params=t.params||{},0===t.delay?d(e,t):setTimeout((function(e,t){d(e,t)}),1e3*t.delay,e,t),0))},onCommentEvent:function(e){this.fireEvent(e.name,e)},onDownloadEvent:function(e){this.fireEvent(e.name,e)},onFormEvent:function(e){this.fireEvent(e.name,e)},onWooAddToCartOnButtonEvent:function(e){if(t.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())){var n=t.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()];window.pysWooProductData.hasOwnProperty(e)&&window.pysWooProductData[e].hasOwnProperty("facebook")&&(n=s.copyProperties(n,{}),s.copyProperties(window.pysWooProductData[e].facebook.params,n.params),this.fireEvent(n.name,n))}},onWooAddToCartOnSingleEvent:function(e,n,a,i){if(window.pysWooProductData=window.pysWooProductData||[],t.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())){var r=s.clone(t.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);if(a!==s.PRODUCT_VARIABLE||t.facebook.wooVariableAsSimple||(e=parseInt(i.find('input[name="variation_id"]').val())),window.pysWooProductData.hasOwnProperty(e)&&window.pysWooProductData[e].hasOwnProperty("facebook")){s.copyProperties(window.pysWooProductData[e].facebook.params,r.params);var c=0;if(a===s.PRODUCT_GROUPED&&(i.find(".woocommerce-grouped-product-list .qty").each((function(t){var n=o(this).attr("name").replaceAll("quantity[","").replaceAll("]",""),a=parseInt(o(this).val());isNaN(a)&&(a=0);var i=window.pysWooProductData[e].facebook.grouped[n];0==a&&r.params.content_ids.forEach((function(e,t,n){e==i.content_id&&n.splice(t,1)})),r.params.hasOwnProperty("contents")&&r.params.contents.forEach((function(e,t,n){e.id==i.content_id&&(a>0?e.quantity=a:n.splice(t,1))})),c+=i.price*a})),0==c))return;if(t.woo.addToCartOnButtonValueEnabled&&"global"!==t.woo.addToCartOnButtonValueOption)if(a===s.PRODUCT_GROUPED)r.params.value=c;else if(a===s.PRODUCT_BUNDLE){var d=o(".bundle_form .bundle_data").data("bundle_form_data"),l=function(e){var t=0;return jQuery(".bundle_form .bundled_product").each((function(n){var o=jQuery(this).find(".cart").data("bundled_item_id"),a=e.prices[o],i=jQuery(this).find(".bundled_qty").val();jQuery(this).hasClass("bundled_item_optional")&&!jQuery(this).find(".bundled_product_optional_checkbox input").prop("checked")||(t+=a*i)})),t}(d);r.params.value=(parseInt(d.base_price)+l)*n}else r.params.value=r.params.value*n;r.params.hasOwnProperty("contents")&&a!==s.PRODUCT_GROUPED&&(r.params.contents[0].quantity=n),this.fireEvent(r.name,r)}}},onWooRemoveFromCartEvent:function(e){this.fireEvent(e.name,e)},onEddAddToCartOnButtonEvent:function(e,n,o){if(t.dynamicEvents.edd_add_to_cart_on_button_click.hasOwnProperty(this.tag())){var a,i=s.clone(t.dynamicEvents.edd_add_to_cart_on_button_click[this.tag()]);if(window.pysEddProductData.hasOwnProperty(e)&&(a=n?e+"_"+n:e,window.pysEddProductData[e].hasOwnProperty(a)&&window.pysEddProductData[e][a].hasOwnProperty("facebook"))){s.copyProperties(window.pysEddProductData[e][a].facebook.params,i.params),t.edd.addToCartOnButtonValueEnabled&&"global"!==t.edd.addToCartOnButtonValueOption&&(i.params.value=i.params.value*o);var r=i.params.contents;r[0].quantity=o,i.params.contents=r,this.fireEvent(i.name,i)}}},onEddRemoveFromCartEvent:function(e){this.fireEvent(e.name,e)},onPageScroll:function(e){this.fireEvent(e.name,e)},onTime:function(e){this.fireEvent(e.name,e)},initEventIdCookies:function(t){var n={};n[t]=e(36),Cookies.set("pys_fb_event_id",JSON.stringify(n))},updateEventId:function(t){var n=Cookies.get("pys_fb_event_id");if(void 0===n)this.initEventIdCookies(t);else{var o=JSON.parse(n);o[t]=e(36),Cookies.set("pys_fb_event_id",JSON.stringify(o))}},getEventId:function(e){var t=Cookies.get("pys_fb_event_id");return void 0===t&&(this.initEventIdCookies(e),t=Cookies.get("pys_fb_event_id")),JSON.parse(t)[e]}}}(a),d=function(e){var t=!1;function n(t,n){if("function"!=typeof window.pys_event_data_filter||!window.pys_disable_event_filter(t,"ga")){var o=s.copyProperties(n,{});e.ga.trackingIds.forEach((function(n){var i=s.copyProperties(o,{}),r=function(e,t,n){if(delete n.page_title,delete n.event_url,delete n.landing_page,a(e))delete n.traffic_source,delete n.event_category,delete n.event_label,delete n.ecomm_prodid,delete n.ecomm_pagetype,delete n.ecomm_totalvalue,"search"===t&&(n.search=n.search_term,delete n.search_term,delete n.non_interaction,delete n.dynx_itemid,delete n.dynx_pagetype,delete n.dynx_totalvalue);else{switch(t){case"Comment":case"login":case"sign_up":case"EmailClick":case"TelClick":return{event_category:"Key Actions",event_action:t,non_interaction:n.non_interaction};case"Form":{let e={event_category:"Key Actions",event_action:t,non_interaction:n.non_interaction};var o=void 0!==n.form_class?"class: "+n.form_class:"";return""!=o&&(e.event_label=o),e}case"Download":return{event_category:"Key Actions",event_action:t,event_label:n.download_name,non_interaction:n.non_interaction};case"TimeOnPage":case"PageScroll":return{event_category:"Key Actions",event_action:t,event_label:document.title,non_interaction:n.non_interaction};case"search":return{event_category:"Key Actions",event_action:t,event_label:n.search_term,non_interaction:n.non_interaction}}delete n.post_type,delete n.post_id,delete n.plugin,delete n.user_role,delete n.cartlows,delete n.cartflows_flow,delete n.cartflows_step}return n}(n,t,i);!function(t,n,o){o.send_to=t,e.debug&&console.log("[Google Analytics #"+t+"] "+n,o),gtag("event",n,o)}(n,t,r)}))}}function a(e){return 0===e.indexOf("G")}return{tag:function(){return"ga"},isEnabled:function(){return e.hasOwnProperty("ga")},disable:function(){t=!1},loadPixel:function(){if(!t&&this.isEnabled()&&s.consentGiven("analytics")){s.loadGoogleTag(e.ga.trackingIds[0]);var n={link_attribution:e.ga.enhanceLinkAttr,anonymize_ip:e.ga.anonimizeIP};e.ga.crossDomainEnabled&&(n.linker={accept_incoming:e.ga.crossDomainAcceptIncoming,domains:e.ga.crossDomainDomains}),e.ga.trackingIds.forEach((function(t,o){n.debug_mode=e.ga.isDebugEnabled.includes("index_"+o),a(t)&&(e.ga.disableAdvertisingFeatures&&(n.allow_google_signals=!1),e.ga.disableAdvertisingPersonalization&&(n.allow_ad_personalization_signals=!1)),gtag("config",t,n)})),t=!0,s.fireStaticEvents("ga")}},fireEvent:function(e,o){return!(!t||!this.isEnabled()||(o.delay=o.delay||0,o.params=o.params||{},0===o.delay?n(e,o.params):setTimeout((function(e,t){n(e,t)}),1e3*o.delay,e,o.params),0))},onCommentEvent:function(e){this.fireEvent(e.name,e)},onDownloadEvent:function(e){this.fireEvent(e.name,e)},onFormEvent:function(e){this.fireEvent(e.name,e)},onWooAddToCartOnButtonEvent:function(t){if(e.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())){var n=s.clone(e.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);window.pysWooProductData.hasOwnProperty(t)&&window.pysWooProductData[t].hasOwnProperty("ga")&&(s.copyProperties(window.pysWooProductData[t].ga.params,n.params),this.fireEvent(n.name,n))}},onWooAddToCartOnSingleEvent:function(t,n,a,i){if(window.pysWooProductData=window.pysWooProductData||[],e.dynamicEvents.woo_add_to_cart_on_button_click.hasOwnProperty(this.tag())){var r=s.clone(e.dynamicEvents.woo_add_to_cart_on_button_click[this.tag()]);if(a!==s.PRODUCT_VARIABLE||e.ga.wooVariableAsSimple||(t=parseInt(i.find('input[name="variation_id"]').val())),window.pysWooProductData.hasOwnProperty(t)&&window.pysWooProductData[t].hasOwnProperty("ga")){if(s.copyProperties(window.pysWooProductData[t].ga.params,r.params),a===s.PRODUCT_GROUPED){var c=0;if(i.find(".woocommerce-grouped-product-list .qty").each((function(e){var n=o(this).attr("name").replaceAll("quantity[","").replaceAll("]",""),a=parseInt(o(this).val());isNaN(a)&&(a=0);var i=window.pysWooProductData[t].ga.grouped[n];r.params.items.forEach((function(e,t,n){e.id==i.content_id&&(a>0?e.quantity=a:n.splice(t,1))})),c+=i.price*a})),e.woo.addToCartOnButtonValueEnabled&&"global"!==e.woo.addToCartOnButtonValueOption&&r.params.hasOwnProperty("ecomm_totalvalue")&&(r.params.ecomm_totalvalue=c),0==c)return}else r.params.items[0].quantity=n;e.woo.addToCartOnButtonValueEnabled&&"global"!==e.woo.addToCartOnButtonValueOption&&a!==s.PRODUCT_GROUPED&&r.params.hasOwnProperty("ecomm_totalvalue")&&(r.params.ecomm_totalvalue=r.params.items[0].price*n),this.fireEvent(r.name,r)}}},onWooRemoveFromCartEvent:function(e){this.fireEvent(e.name,e)},onEddAddToCartOnButtonEvent:function(t,n,o){if(e.dynamicEvents.edd_add_to_cart_on_button_click.hasOwnProperty(this.tag())){var a,i=s.clone(e.dynamicEvents.edd_add_to_cart_on_button_click[this.tag()]);window.pysEddProductData.hasOwnProperty(t)&&(a=n?t+"_"+n:t,window.pysEddProductData[t].hasOwnProperty(a)&&window.pysEddProductData[t][a].hasOwnProperty("ga")&&(s.copyProperties(window.pysEddProductData[t][a].ga.params,i.params),i.params.items[0].quantity=o,this.fireEvent(i.name,i)))}},onEddRemoveFromCartEvent:function(e){this.fireEvent(e.name,e)},onPageScroll:function(e){this.fireEvent(e.name,e)},onTime:function(e){this.fireEvent(e.name,e)}}}(a);window.pys=window.pys||{},window.pys.Facebook=c,window.pys.Analytics=d,window.pys.Utils=s,o(document).ready((function(){if(o("#pys_late_event").length>0){var e=JSON.parse(o("#pys_late_event").attr("dir"));for(var n in e){var i={};i[e[n].e_id]=[e[n]],a.staticEvents.hasOwnProperty(n)?Object.assign(a.staticEvents[n],i):a.staticEvents[n]=i}}var r=s.setupPinterestObject(),l=s.setupBingObject();if(s.manageCookies(),s.setupGdprCallbacks(),a.dynamicEvents.hasOwnProperty("automatic_event_scroll")){var _=function(){var e=o(document).height()-o(window).height(),n=!1;if(a.dynamicEvents.hasOwnProperty("automatic_event_scroll"))for(var i=Object.keys(a.dynamicEvents.automatic_event_scroll),r=0;r<i.length;r++){var c=s.clone(a.dynamicEvents.automatic_event_scroll[i[r]]);Math.round(e*c.scroll_percent/100)<o(window).scrollTop()&&(s.copyProperties(s.getRequestParams(),c.params),t(i[r]).onPageScroll(c),n=!0)}n&&o(document).off("scroll",_)};o(document).on("scroll",_)}if(a.dynamicEvents.hasOwnProperty("automatic_event_time_on_page")){var u=Object.keys(a.dynamicEvents.automatic_event_time_on_page),p=a.dynamicEvents.automatic_event_time_on_page[u[0]].time_on_page;setTimeout((function(){for(var e=0;e<u.length;e++){var n=s.clone(a.dynamicEvents.automatic_event_time_on_page[u[e]]);s.copyProperties(s.getRequestParams(),n.params),t(u[e]).onTime(n)}}),1e3*p)}a.dynamicEvents.hasOwnProperty("automatic_event_download")&&o(document).onFirst("click",'a, button, input[type="button"], input[type="submit"]',(function(e){var n=o(this);if(a.dynamicEvents.hasOwnProperty("automatic_event_download")){var i=!1;if(n.is("a")){var r=n.attr("href");if("string"!=typeof r)return;r=r.trim();var c=s.getLinkExtension(r);if(c.length>0&&a.dynamicEvents.hasOwnProperty("automatic_event_download"))for(var d=Object.keys(a.dynamicEvents.automatic_event_download),l=0;l<d.length;l++){var _=s.clone(a.dynamicEvents.automatic_event_download[d[l]]);_.extensions.includes(c)&&("tiktok"==d[l]?t(d[l]).fireEvent(tikEvent.name,_):(a.enable_remove_download_url_param&&(r=r.split("?")[0]),_.params.download_url=r,_.params.download_type=c,_.params.download_name=s.getLinkFilename(r),t(d[l]).onDownloadEvent(_)),i=!0)}}if(i)return}})),o.each(a.triggerEventTypes,(function(e,t){o.each(t,(function(t,n){switch(e){case"url_click":break;case"css_click":s.setupCSSClickEvents(t,n);break;case"css_mouseover":s.setupMouseOverClickEvents(t,n);break;case"scroll_pos":s.setupScrollPosEvents(t,n);break;case"comment":s.setupCommentEvents(t,n)}}))})),a.woo.enabled&&(a.dynamicEvents.hasOwnProperty("woo_add_to_cart_on_button_click")&&a.woo.hasOwnProperty("addToCartCatchMethod")&&"add_cart_js"===a.woo.addToCartCatchMethod&&(o(".add_to_cart_button:not(.product_type_variable,.product_type_bundle,.single_add_to_cart_button)").on("click",(function(e){var t=o(this).data("product_id");void 0!==t&&(c.onWooAddToCartOnButtonEvent(t),d.onWooAddToCartOnButtonEvent(t),r.onWooAddToCartOnButtonEvent(t),l.onWooAddToCartOnButtonEvent(t))})),o("body").onFirst("click","button.single_add_to_cart_button,.single_add_to_cart_button",(function(e){var t=o(this);if(!t.hasClass("disabled")){var n=t.closest("form"),a=s.PRODUCT_SIMPLE;if(0!==n.length){var i,_;if(n.hasClass("variations_form")?a=s.PRODUCT_VARIABLE:n.hasClass("bundle_form")?a=s.PRODUCT_BUNDLE:n.hasClass("grouped_form")&&(a=s.PRODUCT_GROUPED),a===s.PRODUCT_GROUPED)_=1,i=parseInt(n.find('*[name="add-to-cart"]').val());else if(a===s.PRODUCT_VARIABLE)i=parseInt(n.find('*[name="add-to-cart"]').val()),(u=n.find('input[name="quantity"]')).length<=0&&(u=n.find('select[name="quantity"]')),_=parseInt(u.val());else{var u;i=parseInt(n.find('*[name="add-to-cart"]').val()),(u=n.find('input[name="quantity"]')).length<=0&&(u=n.find('select[name="quantity"]')),_=parseInt(u.val())}c.onWooAddToCartOnSingleEvent(i,_,a,n),d.onWooAddToCartOnSingleEvent(i,_,a,n),r.onWooAddToCartOnSingleEvent(i,_,a,!1,n),l.onWooAddToCartOnSingleEvent(i,_,a,!1,n)}}}))),a.dynamicEvents.hasOwnProperty("woo_remove_from_cart")&&o("body").on("click",a.woo.removeFromCartSelector,(function(e){var t=o(e.currentTarget).attr("href"),n=new RegExp("[\\?&]remove_item=([^&#]*)").exec(t);if(null!==n){var i=n[1];if(a.dynamicEvents.woo_remove_from_cart.hasOwnProperty(i)){var r=a.dynamicEvents.woo_remove_from_cart[i];s.fireEventForAllPixel("onWooRemoveFromCartEvent",r)}}}))),a.edd.enabled&&(a.dynamicEvents.hasOwnProperty("edd_add_to_cart_on_button_click")&&o("form.edd_download_purchase_form .edd-add-to-cart").on("click",(function(e){var t,n,a=o(this),i=a.closest("form"),s=a.data("variablePrice"),_=a.data("priceMode"),u=[],p=[];"yes"===s&&"multi"===_?(n=i.find('input[name="download_id"]').val(),o.each(i.find('input[name="edd_options[price_id][]"]:checked'),(function(e,t){u.push(n+"_"+o(t).val())})),o.each(u,(function(e,n){var o=n.split("_",2);void 0!==(t=i.find('input[name="edd_download_quantity_'+o[1]+'"]').val())?p.push(t):p.push(1)}))):"yes"===s&&"single"===_?(n=i.find('input[name="download_id"]').val(),u.push(n+"_"+i.find('input[name="edd_options[price_id][]"]:checked').val()),void 0!==(t=i.find('input[name="edd_download_quantity"]').val())?p.push(t):p.push(1)):(u.push(a.data("downloadId")),void 0!==(t=i.find('input[name="edd_download_quantity"]').val())?p.push(t):p.push(1)),o.each(u,(function(e,t){var n,o=parseInt(p[e]),a=t.toString().split("_",2);2===a.length&&(t=a[0],n=a[1]),c.onEddAddToCartOnButtonEvent(t,n,o),d.onEddAddToCartOnButtonEvent(t,n,o),r.onEddAddToCartOnButtonEvent(t,n,o),l.onEddAddToCartOnButtonEvent(t,n,o)}))})),a.dynamicEvents.hasOwnProperty("edd_remove_from_cart")&&o("form#edd_checkout_cart_form .edd_cart_remove_item_btn").on("click",(function(e){var t=o(this).attr("href");if(t){var n=t.substring(t.indexOf("=")+1).charAt(0);if(a.dynamicEvents.edd_remove_from_cart.hasOwnProperty(n)){var i=a.dynamicEvents.edd_remove_from_cart[n];s.fireEventForAllPixel("onEddRemoveFromCartEvent",i)}}}))),a.dynamicEvents.hasOwnProperty("automatic_event_comment")&&o("form.comment-form").on("submit",(function(){if(a.dynamicEvents.hasOwnProperty("automatic_event_comment"))for(var e=Object.keys(a.dynamicEvents.automatic_event_comment),n=0;n<e.length;n++){var o=s.clone(a.dynamicEvents.automatic_event_comment[e[n]]);s.copyProperties(s.getRequestParams(),o.params),t(e[n]).onCommentEvent(o)}})),a.dynamicEvents.hasOwnProperty("automatic_event_form")&&(o(document).onFirst("submit","form",(function(e){var n=o(this);if(!n.hasClass("comment-form")&&!n.hasClass("search-form")&&"adminbarsearch"!==n.attr("id")&&!(n.hasClass("woocommerce-product-search")||n.hasClass("cart")||n.hasClass("woocommerce-cart-form")||n.hasClass("woocommerce-shipping-calculator")||n.hasClass("checkout")||n.hasClass("checkout_coupon")||n.hasClass("edd_form")||n.hasClass("edd_download_purchase_form"))){var i={form_id:n.attr("id"),form_class:n.attr("class"),text:n.find('[type="submit"]').is("input")?n.find('[type="submit"]').val():n.find('[type="submit"]').text()};if(a.dynamicEvents.hasOwnProperty("automatic_event_form"))for(var r=Object.keys(a.dynamicEvents.automatic_event_form),c=0;c<r.length;c++){var d=s.clone(a.dynamicEvents.automatic_event_form[r[c]]);"tiktok"===r[c]?t(r[c]).fireEvent(d.name,d):(s.copyProperties(i,d.params),s.copyProperties(s.getRequestParams(),d.params),t(r[c]).onFormEvent(d))}}})),o(document).on("forminator:form:submit:success",(function(e){var n={form_id:o(e.target).find('input[name="form_id"]').val(),text:o(e.target).find(".forminator-button-submit").text()};if(a.dynamicEvents.hasOwnProperty("automatic_event_form"))for(var i=Object.keys(a.dynamicEvents.automatic_event_form),r=0;r<i.length;r++){var c=s.clone(a.dynamicEvents.automatic_event_form[i[r]]);s.copyProperties(n,c.params),s.copyProperties(s.getRequestParams(),c.params),t(i[r]).onFormEvent(c)}})),o(document).onFirst("nfFormSubmitResponse",(function(e,n){var o={form_id:n.response.data.form_id,text:n.response.data.settings.title};if(a.dynamicEvents.hasOwnProperty("automatic_event_form"))for(var i=Object.keys(a.dynamicEvents.automatic_event_form),r=0;r<i.length;r++){var c=a.dynamicEvents.automatic_event_form[i[r]];s.copyProperties(o,c.params),s.copyProperties(s.getRequestParams(),c.params),t(i[r]).onFormEvent(c)}}))),s.loadPixels(),s.isCheckoutPage()&&s.addCheckoutFields()}))}(jQuery,pysOptions);var n=function(e){var t,n,o=window.location.search.substring(1).split("&");for(n=0;n<o.length;n++)if((t=o[n].split("="))[0]===e)return void 0===t[1]||decodeURIComponent(t[1]);return!1}})();
|
dist/scripts/public.js
CHANGED
@@ -228,6 +228,11 @@ if (!Array.prototype.includes) {
|
|
228 |
Bing.loadPixel();
|
229 |
}
|
230 |
}
|
|
|
|
|
|
|
|
|
|
|
231 |
|
232 |
}
|
233 |
|
@@ -777,7 +782,15 @@ if (!Array.prototype.includes) {
|
|
777 |
return true;
|
778 |
}
|
779 |
}
|
|
|
|
|
|
|
|
|
780 |
|
|
|
|
|
|
|
|
|
781 |
return false;
|
782 |
|
783 |
}
|
@@ -895,11 +908,12 @@ if (!Array.prototype.includes) {
|
|
895 |
|
896 |
if (categoryCookie === CS_Data.cs_script_cat.bing) {
|
897 |
Bing.loadPixel();
|
898 |
-
}
|
899 |
-
|
900 |
-
if (categoryCookie === CS_Data.cs_script_cat.analytics) {
|
|
|
901 |
Analytics.loadPixel();
|
902 |
-
}
|
903 |
|
904 |
if (categoryCookie === CS_Data.cs_script_cat.pinterest) {
|
905 |
Pinterest.loadPixel();
|
@@ -911,11 +925,10 @@ if (!Array.prototype.includes) {
|
|
911 |
|
912 |
if (categoryCookie === CS_Data.cs_script_cat.bing) {
|
913 |
Bing.disable();
|
914 |
-
}
|
915 |
-
|
916 |
-
if (categoryCookie === CS_Data.cs_script_cat.analytics) {
|
917 |
Analytics.disable();
|
918 |
-
}
|
919 |
|
920 |
if (categoryCookie === CS_Data.cs_script_cat.pinterest) {
|
921 |
Pinterest.disable();
|
@@ -940,7 +953,10 @@ if (!Array.prototype.includes) {
|
|
940 |
} else if(button_action === 'disable_all') {
|
941 |
Facebook.disable();
|
942 |
Bing.disable();
|
943 |
-
|
|
|
|
|
|
|
944 |
Pinterest.disable();
|
945 |
}
|
946 |
});
|
228 |
Bing.loadPixel();
|
229 |
}
|
230 |
}
|
231 |
+
if (options.gdpr.consent_magic_integration_enabled && typeof CS_Data !== "undefined") {
|
232 |
+
if (typeof CS_Data.cs_google_analytics_consent_mode !== "undefined" && CS_Data.cs_google_analytics_consent_mode == 1) {
|
233 |
+
Analytics.loadPixel();
|
234 |
+
}
|
235 |
+
}
|
236 |
|
237 |
}
|
238 |
|
782 |
return true;
|
783 |
}
|
784 |
}
|
785 |
+
if (options.gdpr.consent_magic_integration_enabled && typeof CS_Data !== "undefined") {
|
786 |
+
if ((typeof CS_Data.cs_google_analytics_consent_mode !== "undefined" && CS_Data.cs_google_analytics_consent_mode == 1) && pixel == 'analytics') {
|
787 |
+
return true;
|
788 |
+
}
|
789 |
|
790 |
+
if ((typeof CS_Data.cs_google_ads_consent_mode !== "undefined" && CS_Data.cs_google_ads_consent_mode == 1) && pixel == 'google_ads') {
|
791 |
+
return true;
|
792 |
+
}
|
793 |
+
}
|
794 |
return false;
|
795 |
|
796 |
}
|
908 |
|
909 |
if (categoryCookie === CS_Data.cs_script_cat.bing) {
|
910 |
Bing.loadPixel();
|
911 |
+
}
|
912 |
+
|
913 |
+
if (categoryCookie === CS_Data.cs_script_cat.analytics || (typeof CS_Data.cs_google_analytics_consent_mode !== "undefined" && CS_Data.cs_google_analytics_consent_mode == 1)) {
|
914 |
+
|
915 |
Analytics.loadPixel();
|
916 |
+
}
|
917 |
|
918 |
if (categoryCookie === CS_Data.cs_script_cat.pinterest) {
|
919 |
Pinterest.loadPixel();
|
925 |
|
926 |
if (categoryCookie === CS_Data.cs_script_cat.bing) {
|
927 |
Bing.disable();
|
928 |
+
}
|
929 |
+
if (categoryCookie === CS_Data.cs_script_cat.analytics && (typeof CS_Data.cs_google_analytics_consent_mode == "undefined" || CS_Data.cs_google_analytics_consent_mode == 0)) {
|
|
|
930 |
Analytics.disable();
|
931 |
+
}
|
932 |
|
933 |
if (categoryCookie === CS_Data.cs_script_cat.pinterest) {
|
934 |
Pinterest.disable();
|
953 |
} else if(button_action === 'disable_all') {
|
954 |
Facebook.disable();
|
955 |
Bing.disable();
|
956 |
+
if(CS_Data.cs_google_analytics_consent_mode == 0 || typeof CS_Data.cs_google_analytics_consent_mode == "undefined")
|
957 |
+
{
|
958 |
+
Analytics.disable();
|
959 |
+
}
|
960 |
Pinterest.disable();
|
961 |
}
|
962 |
});
|
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.2.
|
8 |
* Author: PixelYourSite
|
9 |
* Author URI: http://www.pixelyoursite.com
|
10 |
* License: GPLv3
|
@@ -13,7 +13,7 @@
|
|
13 |
* Tested up to: 6.3
|
14 |
*
|
15 |
* WC requires at least: 2.6.0
|
16 |
-
* WC tested up to: 7.
|
17 |
*
|
18 |
* Text Domain: pys
|
19 |
*/
|
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.2.2
|
8 |
* Author: PixelYourSite
|
9 |
* Author URI: http://www.pixelyoursite.com
|
10 |
* License: GPLv3
|
13 |
* Tested up to: 6.3
|
14 |
*
|
15 |
* WC requires at least: 2.6.0
|
16 |
+
* WC tested up to: 7.1
|
17 |
*
|
18 |
* Text Domain: pys
|
19 |
*/
|
includes/class-events-manager.php
CHANGED
@@ -409,36 +409,47 @@ class EventsManager {
|
|
409 |
}
|
410 |
|
411 |
public static function setupWooSingleProductData() {
|
412 |
-
|
413 |
|
414 |
-
if($product
|
415 |
|
416 |
-
|
417 |
-
if ( isWooCommerceVersionGte( '2.6' ) ) {
|
418 |
-
$product_id = $product->get_id();
|
419 |
-
} else {
|
420 |
-
$product_id = $product->post->ID;
|
421 |
-
}
|
422 |
|
423 |
-
|
424 |
-
|
|
|
|
|
|
|
|
|
425 |
|
426 |
-
|
427 |
-
|
|
|
|
|
|
|
428 |
$product_ids = array_merge($product_ids, $product->get_children());
|
429 |
-
|
430 |
|
431 |
-
|
432 |
-
$eventType = 'woo_add_to_cart_on_button_click';
|
433 |
-
$event = new SingleEvent($eventType,EventTypes::$STATIC,'woo');
|
434 |
-
$event->args = ['productId' => $product_id,'quantity' => 1];
|
435 |
|
436 |
-
|
437 |
-
foreach ( PYS()->getRegisteredPixels() as $pixel ) {
|
438 |
-
/** @var Pixel|Settings $pixel */
|
439 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
|
441 |
-
$events
|
442 |
foreach ($events as $event) {
|
443 |
// prepare event data
|
444 |
$eventData = $event->getData();
|
@@ -446,25 +457,27 @@ class EventsManager {
|
|
446 |
|
447 |
$params[ $product_id ][ $pixel->getSlug() ] = $eventData; // replace (use only one event for product)
|
448 |
}
|
449 |
-
}
|
450 |
-
}
|
451 |
|
452 |
-
|
453 |
-
return;
|
454 |
-
}
|
455 |
|
456 |
-
|
457 |
|
458 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
/* <![CDATA[ */
|
460 |
window.pysWooProductData = window.pysWooProductData || [];
|
461 |
-
|
462 |
window.pysWooProductData[<?php echo $product_id; ?>] = <?php echo json_encode( $product_data ); ?>;
|
463 |
-
|
464 |
/* ]]> */
|
465 |
-
|
466 |
|
467 |
-
|
468 |
|
469 |
}
|
470 |
|
409 |
}
|
410 |
|
411 |
public static function setupWooSingleProductData() {
|
412 |
+
global $product;
|
413 |
|
414 |
+
if ( ! is_object( $product)) $product = wc_get_product( get_the_ID() );
|
415 |
|
416 |
+
if(!$product || !is_a($product,"WC_Product") ) return;
|
|
|
|
|
|
|
|
|
|
|
417 |
|
418 |
+
if ( wooProductIsType( $product, 'external' ) ) {
|
419 |
+
$eventType = 'woo_affiliate';
|
420 |
+
} else {
|
421 |
+
$eventType = 'woo_add_to_cart_on_button_click';
|
422 |
+
}
|
423 |
+
$product_id = $product->get_id();
|
424 |
|
425 |
+
// main product id
|
426 |
+
$product_ids[] = $product_id;
|
427 |
+
|
428 |
+
// variations ids
|
429 |
+
if ( wooProductIsType( $product, 'variable' ) ) {
|
430 |
$product_ids = array_merge($product_ids, $product->get_children());
|
431 |
+
}
|
432 |
|
433 |
+
$params = array();
|
|
|
|
|
|
|
434 |
|
435 |
+
foreach ( $product_ids as $product_id ) {
|
|
|
|
|
436 |
|
437 |
+
foreach ( PYS()->getRegisteredPixels() as $pixel ) {
|
438 |
+
/** @var Pixel|Settings $pixel */
|
439 |
+
$initEvent = new SingleEvent($eventType,EventTypes::$STATIC,"woo");
|
440 |
+
$initEvent->args = ['productId' => $product_id,'quantity' => 1];
|
441 |
+
$events = [];
|
442 |
+
if(method_exists($pixel,'generateEvents')) {
|
443 |
+
add_filter('pys_conditional_post_id', function($id) use ($product_id) { return $product_id; });
|
444 |
+
$events = $pixel->generateEvents( $initEvent );
|
445 |
+
remove_all_filters('pys_conditional_post_id',10);
|
446 |
+
} else {
|
447 |
+
if( $pixel->addParamsToEvent( $initEvent )) {
|
448 |
+
$events[] = $initEvent;
|
449 |
+
}
|
450 |
+
}
|
451 |
|
452 |
+
if(count($events) == 0) continue;
|
453 |
foreach ($events as $event) {
|
454 |
// prepare event data
|
455 |
$eventData = $event->getData();
|
457 |
|
458 |
$params[ $product_id ][ $pixel->getSlug() ] = $eventData; // replace (use only one event for product)
|
459 |
}
|
|
|
|
|
460 |
|
461 |
+
}
|
|
|
|
|
462 |
|
463 |
+
}
|
464 |
|
465 |
+
if ( empty( $params ) ) {
|
466 |
+
return;
|
467 |
+
}
|
468 |
+
|
469 |
+
?>
|
470 |
+
|
471 |
+
<script type="application/javascript" style="display:none">
|
472 |
/* <![CDATA[ */
|
473 |
window.pysWooProductData = window.pysWooProductData || [];
|
474 |
+
<?php foreach ( $params as $product_id => $product_data ) : ?>
|
475 |
window.pysWooProductData[<?php echo $product_id; ?>] = <?php echo json_encode( $product_data ); ?>;
|
476 |
+
<?php endforeach; ?>
|
477 |
/* ]]> */
|
478 |
+
</script>
|
479 |
|
480 |
+
<?php
|
481 |
|
482 |
}
|
483 |
|
includes/class-pys.php
CHANGED
@@ -241,6 +241,19 @@ final class PYS extends Settings implements Plugin {
|
|
241 |
if (function_exists('et_core_is_fb_enabled') && et_core_is_fb_enabled()) {
|
242 |
return;
|
243 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
|
245 |
// output debug info
|
246 |
add_action( 'wp_head', function() {
|
@@ -250,7 +263,8 @@ final class PYS extends Settings implements Plugin {
|
|
250 |
if ( isDisabledForCurrentRole() ) {
|
251 |
return;
|
252 |
}
|
253 |
-
|
|
|
254 |
// at least one pixel should be configured
|
255 |
if ( ! Facebook()->configured() && ! GA()->configured() && ! Pinterest()->configured() && ! Bing()->configured() ) {
|
256 |
|
@@ -262,9 +276,53 @@ final class PYS extends Settings implements Plugin {
|
|
262 |
|
263 |
}
|
264 |
|
265 |
-
// setup events
|
266 |
-
$this->eventsManager = new EventsManager();
|
267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
}
|
269 |
|
270 |
public function ajaxGetGdprFiltersValues() {
|
241 |
if (function_exists('et_core_is_fb_enabled') && et_core_is_fb_enabled()) {
|
242 |
return;
|
243 |
}
|
244 |
+
if(PYS()->getOption( 'block_robot_enabled') && $this->is_user_agent_bot())
|
245 |
+
{
|
246 |
+
return;
|
247 |
+
}
|
248 |
+
if(PYS()->getOption( 'block_ip_enabled') && in_array($this->get_user_ip(), PYS()->getOption('blocked_ips')))
|
249 |
+
{
|
250 |
+
return;
|
251 |
+
}
|
252 |
+
|
253 |
+
$theme = wp_get_theme(); // gets the current theme
|
254 |
+
if ( ('Bricks' == $theme->name || 'Bricks' == $theme->parent_theme) && $_GET['bricks']=='run') {
|
255 |
+
return;
|
256 |
+
}
|
257 |
|
258 |
// output debug info
|
259 |
add_action( 'wp_head', function() {
|
263 |
if ( isDisabledForCurrentRole() ) {
|
264 |
return;
|
265 |
}
|
266 |
+
// setup events
|
267 |
+
$this->eventsManager = new EventsManager();
|
268 |
// at least one pixel should be configured
|
269 |
if ( ! Facebook()->configured() && ! GA()->configured() && ! Pinterest()->configured() && ! Bing()->configured() ) {
|
270 |
|
276 |
|
277 |
}
|
278 |
|
|
|
|
|
279 |
|
280 |
+
|
281 |
+
}
|
282 |
+
|
283 |
+
function get_user_ip(){
|
284 |
+
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
|
285 |
+
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
286 |
+
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
287 |
+
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
288 |
+
} else {
|
289 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
290 |
+
}
|
291 |
+
return $ip;
|
292 |
+
}
|
293 |
+
|
294 |
+
function is_user_agent_bot(){
|
295 |
+
if (!empty($_SERVER['HTTP_USER_AGENT'])) {
|
296 |
+
$options = array(
|
297 |
+
'YandexBot', 'YandexAccessibilityBot', 'YandexMobileBot','YandexDirectDyn',
|
298 |
+
'YandexScreenshotBot', 'YandexImages', 'YandexVideo', 'YandexVideoParser',
|
299 |
+
'YandexMedia', 'YandexBlogs', 'YandexFavicons', 'YandexWebmaster',
|
300 |
+
'YandexPagechecker', 'YandexImageResizer','YandexAdNet', 'YandexDirect',
|
301 |
+
'YaDirectFetcher', 'YandexCalendar', 'YandexSitelinks', 'YandexMetrika',
|
302 |
+
'YandexNews', 'YandexNewslinks', 'YandexCatalog', 'YandexAntivirus',
|
303 |
+
'YandexMarket', 'YandexVertis', 'YandexForDomain', 'YandexSpravBot',
|
304 |
+
'YandexSearchShop', 'YandexMedianaBot', 'YandexOntoDB', 'YandexOntoDBAPI',
|
305 |
+
'Googlebot', 'Googlebot-Image', 'Googlebot-News', 'Googlebot-Video',
|
306 |
+
'Mediapartners-Google', 'AdsBot-Google', 'Chrome-Lighthouse', 'Lighthouse',
|
307 |
+
'Mail.RU_Bot', 'bingbot', 'Accoona', 'ia_archiver', 'Ask Jeeves',
|
308 |
+
'OmniExplorer_Bot', 'W3C_Validator', 'WebAlta', 'YahooFeedSeeker', 'Yahoo!',
|
309 |
+
'Ezooms', '', 'Tourlentabot', 'MJ12bot', 'AhrefsBot', 'SearchBot', 'SiteStatus',
|
310 |
+
'Nigma.ru', 'Baiduspider', 'Statsbot', 'SISTRIX', 'AcoonBot', 'findlinks',
|
311 |
+
'proximic', 'OpenindexSpider','statdom.ru', 'Exabot', 'Spider', 'SeznamBot',
|
312 |
+
'oBot', 'C-T bot', 'Updownerbot', 'Snoopy', 'heritrix', 'Yeti',
|
313 |
+
'DomainVader', 'DCPbot', 'PaperLiBot', 'APIs-Google', 'AdsBot-Google-Mobile',
|
314 |
+
'AdsBot-Google-Mobile', 'AdsBot-Google-Mobile-Apps', 'FeedFetcher-Google',
|
315 |
+
'Google-Read-Aloud', 'DuplexWeb-Google', 'Storebot-Google'
|
316 |
+
);
|
317 |
+
|
318 |
+
foreach($options as $row) {
|
319 |
+
if (stripos($_SERVER['HTTP_USER_AGENT'], $row) !== false) {
|
320 |
+
return true;
|
321 |
+
}
|
322 |
+
}
|
323 |
+
}
|
324 |
+
|
325 |
+
return false;
|
326 |
}
|
327 |
|
328 |
public function ajaxGetGdprFiltersValues() {
|
includes/class-settings.php
CHANGED
@@ -230,7 +230,7 @@ abstract class Settings {
|
|
230 |
return $this->sanitize_text_field( $value );
|
231 |
|
232 |
}
|
233 |
-
|
234 |
/**
|
235 |
* Output text input
|
236 |
*
|
@@ -238,12 +238,13 @@ abstract class Settings {
|
|
238 |
* @param string $placeholder
|
239 |
* @param bool $disabled
|
240 |
* @param bool $hidden
|
|
|
241 |
*/
|
242 |
-
|
243 |
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
|
248 |
$classes = array( 'form-control' );
|
249 |
|
230 |
return $this->sanitize_text_field( $value );
|
231 |
|
232 |
}
|
233 |
+
|
234 |
/**
|
235 |
* Output text input
|
236 |
*
|
238 |
* @param string $placeholder
|
239 |
* @param bool $disabled
|
240 |
* @param bool $hidden
|
241 |
+
* @param bool $empty
|
242 |
*/
|
243 |
+
public function render_text_input( $key, $placeholder = '', $disabled = false, $hidden = false, $empty = false) {
|
244 |
|
245 |
+
$attr_name = "pys[$this->slug][$key]";
|
246 |
+
$attr_id = 'pys_' . $this->slug . '_' . $key;
|
247 |
+
$attr_value = $empty == false ? $this->getOption( $key ) : "";
|
248 |
|
249 |
$classes = array( 'form-control' );
|
250 |
|
includes/functions-license.php
CHANGED
@@ -18,20 +18,30 @@ function renderLicenseControls( $plugin ) {
|
|
18 |
|
19 |
?>
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
<?php
|
37 |
|
@@ -79,6 +89,7 @@ function renderLicenseControls( $plugin ) {
|
|
79 |
<p>Your license key <strong>expires
|
80 |
on <?php echo date( get_option( 'date_format' ), $license_expires ); ?></strong>. Make sure
|
81 |
you keep everything updated and in order.</p>
|
|
|
82 |
<p class="mb-0"><a href="https://www.pixelyoursite.com/checkout/?edd_license_key=<?php esc_attr_e(
|
83 |
$license_key ); ?>&utm_campaign=admin&utm_source=licenses&utm_medium=renew" target="_blank"><strong>Click here to renew your license now for a 40% discount</strong></a></p>
|
84 |
</div>
|
@@ -96,6 +107,7 @@ function renderLicenseControls( $plugin ) {
|
|
96 |
<div class="alert alert-danger mb-0">
|
97 |
<p><strong>Your license key is expired</strong>, so you no longer get any updates. Don't miss our
|
98 |
latest improvements and make sure that everything works smoothly.</p>
|
|
|
99 |
<p class="mb-0"><a href="https://www.pixelyoursite.com/checkout/?edd_license_key=<?php esc_attr_e(
|
100 |
$license_key ); ?>&utm_campaign=admin&utm_source=licenses&utm_medium=renew" target="_blank"><strong>Click here to renew your license now</strong></a></p>
|
101 |
</div>
|
@@ -113,7 +125,7 @@ function renderLicenseControls( $plugin ) {
|
|
113 |
function updateLicense( $plugin ) {
|
114 |
|
115 |
$slug = $plugin->getSlug();
|
116 |
-
|
117 |
// nothing to do...
|
118 |
if( ! isset( $_POST['pys'][ $slug ]['license_action'] ) ) {
|
119 |
return;
|
@@ -128,12 +140,23 @@ function updateLicense( $plugin ) {
|
|
128 |
|
129 |
|
130 |
// activate/deactivate license
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
$license_status = $plugin->getOption( 'license_status' );
|
138 |
$license_expires = $plugin->getOption( 'license_expires' );
|
139 |
|
18 |
|
19 |
?>
|
20 |
|
21 |
+
<div class="row">
|
22 |
+
<?php if( $license_status == 'valid' ) : ?>
|
23 |
+
<div class="col-3">
|
24 |
+
<?php $plugin->render_text_input( 'license_key', 'Enter your license key', true, true, false); ?>
|
25 |
+
<button class="btn btn-block btn-sm btn-primary" name="<?php esc_attr_e( $input_name ); ?>"
|
26 |
+
value="reactivate">Reactivate License</button>
|
27 |
+
</div>
|
28 |
+
<?php else : ?>
|
29 |
+
<div class="col-9">
|
30 |
+
<?php $plugin->render_text_input( 'license_key', 'Enter your license key', false, false, true ); ?>
|
31 |
+
</div>
|
32 |
+
|
33 |
+
<?php endif; ?>
|
34 |
+
|
35 |
+
<div class="col-3">
|
36 |
+
<?php if( $license_status == 'valid' ) : ?>
|
37 |
+
<button class="btn btn-block btn-sm btn-danger" name="<?php esc_attr_e( $input_name ); ?>"
|
38 |
+
value="deactivate">Deactivate License</button>
|
39 |
+
<?php else : ?>
|
40 |
+
<button class="btn btn-block btn-sm btn-primary" name="<?php esc_attr_e( $input_name ); ?>"
|
41 |
+
value="activate">Activate License</button>
|
42 |
+
<?php endif; ?>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
|
46 |
<?php
|
47 |
|
89 |
<p>Your license key <strong>expires
|
90 |
on <?php echo date( get_option( 'date_format' ), $license_expires ); ?></strong>. Make sure
|
91 |
you keep everything updated and in order.</p>
|
92 |
+
<p>If you renewed your license but you still see this message, click on the "Reactivate License" button.</p>
|
93 |
<p class="mb-0"><a href="https://www.pixelyoursite.com/checkout/?edd_license_key=<?php esc_attr_e(
|
94 |
$license_key ); ?>&utm_campaign=admin&utm_source=licenses&utm_medium=renew" target="_blank"><strong>Click here to renew your license now for a 40% discount</strong></a></p>
|
95 |
</div>
|
107 |
<div class="alert alert-danger mb-0">
|
108 |
<p><strong>Your license key is expired</strong>, so you no longer get any updates. Don't miss our
|
109 |
latest improvements and make sure that everything works smoothly.</p>
|
110 |
+
<p>If you renewed your license but you still see this message, click on the "Reactivate License" button.</p>
|
111 |
<p class="mb-0"><a href="https://www.pixelyoursite.com/checkout/?edd_license_key=<?php esc_attr_e(
|
112 |
$license_key ); ?>&utm_campaign=admin&utm_source=licenses&utm_medium=renew" target="_blank"><strong>Click here to renew your license now</strong></a></p>
|
113 |
</div>
|
125 |
function updateLicense( $plugin ) {
|
126 |
|
127 |
$slug = $plugin->getSlug();
|
128 |
+
$license_key_old = $plugin->getOption( 'license_key' );
|
129 |
// nothing to do...
|
130 |
if( ! isset( $_POST['pys'][ $slug ]['license_action'] ) ) {
|
131 |
return;
|
140 |
|
141 |
|
142 |
// activate/deactivate license
|
143 |
+
if ( $license_action == 'activate' ) {
|
144 |
+
$license_data = licenseActivate( $license_key, $plugin );
|
145 |
+
} else {
|
146 |
+
if($license_key_old)
|
147 |
+
{
|
148 |
+
$license_key = $license_key_old;
|
149 |
+
}
|
150 |
+
$license_data = licenseDeactivate( $license_key, $plugin );
|
151 |
+
}
|
152 |
+
if ( $license_action == 'reactivate' ) {
|
153 |
+
if($license_key_old)
|
154 |
+
{
|
155 |
+
$license_key = $license_key_old;
|
156 |
+
}
|
157 |
+
licenseDeactivate($license_key, $plugin);
|
158 |
+
$license_data = licenseActivate($license_key, $plugin);
|
159 |
+
}
|
160 |
$license_status = $plugin->getOption( 'license_status' );
|
161 |
$license_expires = $plugin->getOption( 'license_expires' );
|
162 |
|
includes/options_defaults.json
CHANGED
@@ -15,6 +15,9 @@
|
|
15 |
"administrator"
|
16 |
],
|
17 |
|
|
|
|
|
|
|
18 |
|
19 |
"woo_add_to_cart_on_button_click": true,
|
20 |
"woo_add_to_cart_on_cart_page": false,
|
15 |
"administrator"
|
16 |
],
|
17 |
|
18 |
+
"block_robot_enabled": false,
|
19 |
+
"block_ip_enabled": false,
|
20 |
+
"blocked_ips": [],
|
21 |
|
22 |
"woo_add_to_cart_on_button_click": true,
|
23 |
"woo_add_to_cart_on_cart_page": false,
|
includes/options_fields.json
CHANGED
@@ -13,6 +13,10 @@
|
|
13 |
"do_not_track_user_roles": "multi_select",
|
14 |
"admin_permissions": "multi_select",
|
15 |
|
|
|
|
|
|
|
|
|
16 |
"woo_add_to_cart_on_button_click": "checkbox",
|
17 |
"woo_add_to_cart_on_cart_page": "checkbox",
|
18 |
"woo_add_to_cart_on_checkout_page": "checkbox",
|
13 |
"do_not_track_user_roles": "multi_select",
|
14 |
"admin_permissions": "multi_select",
|
15 |
|
16 |
+
"block_robot_enabled": "checkbox",
|
17 |
+
"block_ip_enabled": "checkbox",
|
18 |
+
"blocked_ips": "multi_select",
|
19 |
+
|
20 |
"woo_add_to_cart_on_button_click": "checkbox",
|
21 |
"woo_add_to_cart_on_cart_page": "checkbox",
|
22 |
"woo_add_to_cart_on_checkout_page": "checkbox",
|
includes/views/html-licenses.php
CHANGED
@@ -34,12 +34,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
34 |
|
35 |
<?php endforeach; ?>
|
36 |
|
37 |
-
<hr>
|
38 |
-
<div class="row justify-content-center">
|
39 |
-
<div class="col-4">
|
40 |
-
<button class="btn btn-block btn-sm btn-save">Save Settings</button>
|
41 |
-
</div>
|
42 |
-
</div>
|
43 |
|
44 |
</form>
|
45 |
</div>
|
34 |
|
35 |
<?php endforeach; ?>
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
</form>
|
39 |
</div>
|
includes/views/html-main-general.php
CHANGED
@@ -936,7 +936,25 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
936 |
<hr/>
|
937 |
</div>
|
938 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
939 |
|
|
|
940 |
<div class="row form-group">
|
941 |
<div class="col">
|
942 |
<h4 class="label">Ignore these user roles from tracking:</h4>
|
936 |
<hr/>
|
937 |
</div>
|
938 |
</div>
|
939 |
+
<div class="row mb-3">
|
940 |
+
<div class="col">
|
941 |
+
<?php PYS()->render_switcher_input('block_robot_enabled'); ?>
|
942 |
+
<h4 class="switcher-label">Disable the plugin for known web crawlers</h4>
|
943 |
+
</div>
|
944 |
+
</div>
|
945 |
+
<div class="row mb-3">
|
946 |
+
<div class="col">
|
947 |
+
<?php PYS()->render_switcher_input('block_ip_enabled'); ?>
|
948 |
+
<h4 class="switcher-label">Disable the plugin for these IP addresses:</h4>
|
949 |
+
</div>
|
950 |
+
</div>
|
951 |
+
<div class="row mb-3">
|
952 |
+
<div class="col">
|
953 |
+
<?php PYS()->render_tags_select_input('blocked_ips',false); ?>
|
954 |
+
</div>
|
955 |
+
</div>
|
956 |
|
957 |
+
<hr>
|
958 |
<div class="row form-group">
|
959 |
<div class="col">
|
960 |
<h4 class="label">Ignore these user roles from tracking:</h4>
|
includes/views/html-main-woo.php
CHANGED
@@ -101,6 +101,7 @@ use PixelYourSite\Facebook\Helpers;
|
|
101 |
<p>Google Analytics 4 (GA4) FUNNELS for WooCommerce (6:13) - <a href="https://www.youtube.com/watch?v=c6L1XMYzuMM" target="_blank">watch now</a></p>
|
102 |
<p>Same Facebook (Meta) pixel or Google tag on multiple WooCommerce websites? (4:43) - <a href="https://www.youtube.com/watch?v=3Ugwlq1EVO4" target="_blank">watch now</a></p>
|
103 |
<p>WooCommerce First-Party Reports: Track UTMs, Traffic Source, Landing Page (13:15) - <a href="https://www.youtube.com/watch?v=4VpVf9llfkU" target="_blank">watch video</a></p>
|
|
|
104 |
</div>
|
105 |
</div>
|
106 |
</div>
|
101 |
<p>Google Analytics 4 (GA4) FUNNELS for WooCommerce (6:13) - <a href="https://www.youtube.com/watch?v=c6L1XMYzuMM" target="_blank">watch now</a></p>
|
102 |
<p>Same Facebook (Meta) pixel or Google tag on multiple WooCommerce websites? (4:43) - <a href="https://www.youtube.com/watch?v=3Ugwlq1EVO4" target="_blank">watch now</a></p>
|
103 |
<p>WooCommerce First-Party Reports: Track UTMs, Traffic Source, Landing Page (13:15) - <a href="https://www.youtube.com/watch?v=4VpVf9llfkU" target="_blank">watch video</a></p>
|
104 |
+
<p>Find out your ads PROFIT - Meta, Google, TikTok, Pinterest, etc (5:48) - <a href="https://www.youtube.com/watch?v=ydqyp-iW9Ko" target="_blank">watch video</a></p>
|
105 |
</div>
|
106 |
</div>
|
107 |
</div>
|
notices/fixed.php
CHANGED
@@ -84,7 +84,7 @@ function adminGetFixedNotices() {
|
|
84 |
]
|
85 |
],
|
86 |
'optoutEnabel' => true,
|
87 |
-
'optoutMessage' => "This is message 1 of a series of
|
88 |
'optoutButtonText' => "Don't show me more tips"
|
89 |
],
|
90 |
[
|
@@ -111,7 +111,7 @@ function adminGetFixedNotices() {
|
|
111 |
],
|
112 |
],
|
113 |
'optoutEnabel' => true,
|
114 |
-
'optoutMessage' => "This is message 2 of a series of
|
115 |
'optoutButtonText' => "Don't show me more tips"
|
116 |
],
|
117 |
[
|
@@ -132,7 +132,7 @@ function adminGetFixedNotices() {
|
|
132 |
|
133 |
],
|
134 |
'optoutEnabel' => true,
|
135 |
-
'optoutMessage' => "This is message 3 of a series of
|
136 |
'optoutButtonText' => "Don't show me more tips"
|
137 |
|
138 |
],
|
@@ -152,7 +152,7 @@ function adminGetFixedNotices() {
|
|
152 |
],
|
153 |
],
|
154 |
'optoutEnabel' => true,
|
155 |
-
'optoutMessage' => "This is message 4 of a series of
|
156 |
'optoutButtonText' => "Don't show me more tips"
|
157 |
|
158 |
],
|
@@ -174,7 +174,7 @@ function adminGetFixedNotices() {
|
|
174 |
],
|
175 |
],
|
176 |
'optoutEnabel' => true,
|
177 |
-
'optoutMessage' => "This is message 5 of a series of
|
178 |
'optoutButtonText' => "Don't show me more tips"
|
179 |
|
180 |
],
|
@@ -203,7 +203,7 @@ function adminGetFixedNotices() {
|
|
203 |
],
|
204 |
],
|
205 |
'optoutEnabel' => true,
|
206 |
-
'optoutMessage' => "This is message 6 of a series of
|
207 |
'optoutButtonText' => "Don't show me more tips"
|
208 |
|
209 |
],
|
@@ -233,7 +233,7 @@ function adminGetFixedNotices() {
|
|
233 |
],
|
234 |
],
|
235 |
'optoutEnabel' => true,
|
236 |
-
'optoutMessage' => "This is message 7 of a series of
|
237 |
'optoutButtonText' => "Don't show me more tips"
|
238 |
|
239 |
],
|
@@ -256,7 +256,27 @@ using a consent plugin!',
|
|
256 |
],
|
257 |
],
|
258 |
'optoutEnabel' => true,
|
259 |
-
'optoutMessage' => "This is message 8 of a series of
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
'optoutButtonText' => "Don't show me more tips"
|
261 |
],
|
262 |
|
84 |
]
|
85 |
],
|
86 |
'optoutEnabel' => true,
|
87 |
+
'optoutMessage' => "This is message 1 of a series of 9 notifications containing tips and tricks about how to use our plugin.",
|
88 |
'optoutButtonText' => "Don't show me more tips"
|
89 |
],
|
90 |
[
|
111 |
],
|
112 |
],
|
113 |
'optoutEnabel' => true,
|
114 |
+
'optoutMessage' => "This is message 2 of a series of 9 notifications containing tips and tricks about how to use our plugin.",
|
115 |
'optoutButtonText' => "Don't show me more tips"
|
116 |
],
|
117 |
[
|
132 |
|
133 |
],
|
134 |
'optoutEnabel' => true,
|
135 |
+
'optoutMessage' => "This is message 3 of a series of 9 notifications containing tips and tricks about how to use our plugin.",
|
136 |
'optoutButtonText' => "Don't show me more tips"
|
137 |
|
138 |
],
|
152 |
],
|
153 |
],
|
154 |
'optoutEnabel' => true,
|
155 |
+
'optoutMessage' => "This is message 4 of a series of 9 notifications containing tips and tricks about how to use our plugin.",
|
156 |
'optoutButtonText' => "Don't show me more tips"
|
157 |
|
158 |
],
|
174 |
],
|
175 |
],
|
176 |
'optoutEnabel' => true,
|
177 |
+
'optoutMessage' => "This is message 5 of a series of 9 notifications containing tips and tricks about how to use our plugin.",
|
178 |
'optoutButtonText' => "Don't show me more tips"
|
179 |
|
180 |
],
|
203 |
],
|
204 |
],
|
205 |
'optoutEnabel' => true,
|
206 |
+
'optoutMessage' => "This is message 6 of a series of 9 notifications containing tips and tricks about how to use our plugin.",
|
207 |
'optoutButtonText' => "Don't show me more tips"
|
208 |
|
209 |
],
|
233 |
],
|
234 |
],
|
235 |
'optoutEnabel' => true,
|
236 |
+
'optoutMessage' => "This is message 7 of a series of 9 notifications containing tips and tricks about how to use our plugin.",
|
237 |
'optoutButtonText' => "Don't show me more tips"
|
238 |
|
239 |
],
|
256 |
],
|
257 |
],
|
258 |
'optoutEnabel' => true,
|
259 |
+
'optoutMessage' => "This is message 8 of a series of 9 notifications containing tips and tricks about how to use our plugin.",
|
260 |
+
'optoutButtonText' => "Don't show me more tips"
|
261 |
+
],
|
262 |
+
|
263 |
+
[
|
264 |
+
'order' => '9',
|
265 |
+
'wait' => 24,
|
266 |
+
'type' => 'event chain',
|
267 |
+
'enabelYoutubeLink' => true,
|
268 |
+
'enabelLogo' => true,
|
269 |
+
'multiMessage' => [
|
270 |
+
[
|
271 |
+
'slug' => 'free_block_9_message_1_v1',
|
272 |
+
'title' => 'Google Consent Mode',
|
273 |
+
'message' => 'Google Consent Mode can improve traking. It allows Google to track anonymus data for opted-out users and it works for Google Analytics and Google Ads tag.',
|
274 |
+
'button_text' => 'Watch this video',
|
275 |
+
'button_url' => 'https://www.youtube.com/watch?v=70oV41V7IIU',
|
276 |
+
],
|
277 |
+
],
|
278 |
+
'optoutEnabel' => false,
|
279 |
+
'optoutMessage' => "This is message 9 of a series of 9 notifications containing tips and tricks about how to use our plugin.",
|
280 |
'optoutButtonText' => "Don't show me more tips"
|
281 |
],
|
282 |
|
pixelyoursite.php
CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
4 |
exit; // Exit if accessed directly.
|
5 |
}
|
6 |
|
7 |
-
define( 'PYS_FREE_VERSION', '9.2.
|
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__ ) ) );
|
4 |
exit; // Exit if accessed directly.
|
5 |
}
|
6 |
|
7 |
+
define( 'PYS_FREE_VERSION', '9.2.2' );
|
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__ ) ) );
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: PixelYourSite
|
|
3 |
Tags: Meta Pixel, Facebook Pixel, Facebook Conversion API, CAPI, Facebook Pixel Events, Facebook Dynamic Product Ads, Facebook Conversion Value, WooCommerce Facebook Pixel, Easy Digital Downloads Facebook Pixel, Google Analytics, Google Analytics Enhanced Ecommerce, GA4, WooCommerce Google Analytics, Easy Digital Downloads Google Analytics, head & footer scripts, Pinterest tag
|
4 |
Requires at least: 3.0.1
|
5 |
Requires PHP: 5.4
|
6 |
-
Tested up to: 6.
|
7 |
-
Stable tag: 9.2.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -467,6 +467,28 @@ NO, absolutely not! We don't track any type of data about your website. We simpl
|
|
467 |
|
468 |
== Changelog ==
|
469 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
470 |
|
471 |
= PixelYourSite 9.2.1 =
|
472 |
|
3 |
Tags: Meta Pixel, Facebook Pixel, Facebook Conversion API, CAPI, Facebook Pixel Events, Facebook Dynamic Product Ads, Facebook Conversion Value, WooCommerce Facebook Pixel, Easy Digital Downloads Facebook Pixel, Google Analytics, Google Analytics Enhanced Ecommerce, GA4, WooCommerce Google Analytics, Easy Digital Downloads Google Analytics, head & footer scripts, Pinterest tag
|
4 |
Requires at least: 3.0.1
|
5 |
Requires PHP: 5.4
|
6 |
+
Tested up to: 6.1
|
7 |
+
Stable tag: 9.2.2
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
467 |
|
468 |
== Changelog ==
|
469 |
|
470 |
+
= PixelYourSite 9.2.2 =
|
471 |
+
|
472 |
+
* New: hide the plugin for known web crawlers. This can prevent certain Ajax AddToCart WooCommerce buttons to fire CAPI events because of crawlers.
|
473 |
+
|
474 |
+
* New: hide the plugin for custom IP addresses.
|
475 |
+
|
476 |
+
* Track WooCommerce’s extra data (traffic source, landing pages, UTMs) even when no tag is installed in the plugin.
|
477 |
+
|
478 |
+
* Confirmation dialog when deleting events on the plugin’s Events page.
|
479 |
+
|
480 |
+
* Google Consent Mode compatibility with ConsentMagic.
|
481 |
+
|
482 |
+
* Fix for a problem with Meta AddToCart IDs for WooCommerce variable items when SKU is used.
|
483 |
+
|
484 |
+
* Fix for a conflict with Bricksbuilder editor.
|
485 |
+
|
486 |
+
* Some other small changes and code improvements.
|
487 |
+
|
488 |
+
* WooCommerce 7.1 compatibility.
|
489 |
+
|
490 |
+
* WordPress 6.1 compatibility.
|
491 |
+
|
492 |
|
493 |
= PixelYourSite 9.2.1 =
|
494 |
|