Changeset 2687254
- Timestamp:
- 03/02/2022 07:10:39 AM (4 years ago)
- Location:
- facebook-conversion-pixel/trunk
- Files:
-
- 11 edited
-
facebook-conversion-pixel.php (modified) (2 diffs)
-
includes/editor/editor.php (modified) (1 diff)
-
includes/functions.php (modified) (1 diff)
-
includes/integrations/woo-events.php (modified) (2 diffs)
-
pixel-cat.js (modified) (2 diffs)
-
pixel-cat.min.js (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
readmes/business.txt (modified) (2 diffs)
-
readmes/elite.txt (modified) (2 diffs)
-
readmes/lite.txt (modified) (2 diffs)
-
readmes/personal.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
facebook-conversion-pixel/trunk/facebook-conversion-pixel.php
r2664115 r2687254 9 9 Author URI: https://fatcatapps.com/ 10 10 License: GPLv2 11 Version: 2.6. 511 Version: 2.6.6 12 12 */ 13 13 … … 32 32 define( 'FCA_PC_PLUGIN_VER', '2.6.' . time() ); 33 33 } else { 34 define( 'FCA_PC_PLUGIN_VER', '2.6. 5' );34 define( 'FCA_PC_PLUGIN_VER', '2.6.6' ); 35 35 } 36 36 -
facebook-conversion-pixel/trunk/includes/editor/editor.php
r2664115 r2687254 888 888 <th><?php esc_attr_e( 'Product Identifier', 'facebook-conversion-pixel' ) ?></th> 889 889 <td> <?php echo fca_pc_select( 'woo_product_id', $woo_id_mode, $id_options ); ?> 890 <span class='fca_pc_hint'><?php esc_attr_e("Set how to identify your product using the Facebook Pixel (content_id) and the feed (g:id) ", 'facebook-conversion-pixel' ) ?></span></td>890 <span class='fca_pc_hint'><?php esc_attr_e("Set how to identify your product using the Facebook Pixel (content_id) and the feed (g:id). Please make sure to have SKUs set on your products if you choose WooCommerce SKU.", 'facebook-conversion-pixel' ) ?></span></td> 891 891 </tr> 892 892 <tr class='fca-pc-woo-feed-settings fca-pc-woo-advanced-feed-settings' style='display:none;'> -
facebook-conversion-pixel/trunk/includes/functions.php
r2632400 r2687254 124 124 } 125 125 126 $lang = empty( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ? 'en-US' : $_SERVER['HTTP_ACCEPT_LANGUAGE'] ; 127 126 128 return array( 127 129 'referrer' => wp_get_raw_referer(), 128 'language' => sanitize_text_field( $ _SERVER['HTTP_ACCEPT_LANGUAGE']),130 'language' => sanitize_text_field( $lang ), 129 131 'logged_in' => is_user_logged_in() ? 'true' : 'false', 130 132 'post_tag' => implode( ', ', array_map( 'fca_pc_tag_name_fiter', wp_get_post_tags( $id ) ) ), -
facebook-conversion-pixel/trunk/includes/integrations/woo-events.php
r2623220 r2687254 124 124 //WOOCOMMERCE THANK YOU REDIRECT PLUGIN SUPPORT 125 125 $is_thank_you_page = isset( $_GET['order'] ) && isset( $_GET['key'] ); 126 126 127 127 if ( function_exists( 'is_order_received_page' ) && ( is_order_received_page() OR $is_thank_you_page ) ) { 128 128 129 129 global $wp; 130 $order_id = isset( $wp->query_vars['order-received'] ) ? intval( $wp->query_vars['order-received'] ) : intval( $wp->query_vars['order'] );131 $order = new WC_Order( $order_id );130 $order_id = isset( $wp->query_vars['order-received'] ) ? intval( $wp->query_vars['order-received'] ) : intval( $wp->query_vars['order'] ); 131 $order = wc_get_order( $order_id ); 132 132 133 133 $num_items = 0; … … 140 140 $woo_extra_params = empty( $options['woo_extra_params'] ) ? false : true; 141 141 142 forEach ( $order->get_items() as $item ) { 143 $num_items = $num_items + $item['qty']; 144 $value = $value + $item['line_total'] + $item['line_tax']; 145 $content_name[] = get_the_title( $item['product_id'] ); 146 $content_ids[] = $woo_id_mode === 'post_id' ? $item['product_id'] : wc_get_product( $item['product_id'] )->get_sku(); 147 $category = get_the_terms( $item['product_id'], 'product_cat' ); 148 if ( $category ) { 149 forEach ( $category as $term ) { 150 $content_category[] = $term->name; 151 } 152 } 153 } 154 155 $cart_data = array( 156 'value' => $value, 157 'currency' => get_woocommerce_currency(), 158 'content_name' => implode( ', ', $content_name), 159 'content_ids' => $content_ids, 160 'num_items' => $num_items, 161 'content_type' => 'product', 162 ); 163 164 if ( $woo_extra_params ) { 165 166 $cart_data['lifetime_value'] = fca_pc_get_woo_ltv( $order->get_billing_email() ); 167 168 $extra_params = array( 169 'get_used_coupons' => 'discount_code', 170 'get_billing_city' => 'billing_city', 171 'get_billing_state' => 'billing_state', 172 'get_payment_method' => 'payment_method', 173 'get_shipping_method' => 'shipping_method', 142 if( $order ){ 143 144 forEach ( $order->get_items() as $item ) { 145 $num_items = $num_items + $item['qty']; 146 $value = $value + $item['line_total'] + $item['line_tax']; 147 $content_name[] = get_the_title( $item['product_id'] ); 148 $content_ids[] = $woo_id_mode === 'post_id' ? $item['product_id'] : wc_get_product( $item['product_id'] )->get_sku(); 149 $category = get_the_terms( $item['product_id'], 'product_cat' ); 150 if ( $category ) { 151 forEach ( $category as $term ) { 152 $content_category[] = $term->name; 153 } 154 } 155 } 156 157 $cart_data = array( 158 'value' => $value, 159 'currency' => get_woocommerce_currency(), 160 'content_name' => implode( ', ', $content_name), 161 'content_ids' => $content_ids, 162 'num_items' => $num_items, 163 'content_type' => 'product', 174 164 ); 175 165 176 forEach ( $extra_params as $key => $value ) { 177 if ( $order->$key() ) { 178 $cart_data[$value] = $order->$key(); 179 } 180 } 181 182 if ( $order->get_used_coupons() ) { 183 $cart_data['discount_code'] = $order->get_used_coupons(); 184 } 185 186 } 187 188 if ( count( $content_category ) > 0 ) { 189 $cart_data['content_category'] = implode( ', ', $content_category ); 190 } 191 192 wp_localize_script( 'fca_pc_client_js', 'fcaPcWooPurchase', $cart_data ); 166 if ( $woo_extra_params ) { 167 168 $cart_data['lifetime_value'] = fca_pc_get_woo_ltv( $order->get_billing_email() ); 169 170 $extra_params = array( 171 'get_used_coupons' => 'discount_code', 172 'get_billing_city' => 'billing_city', 173 'get_billing_state' => 'billing_state', 174 'get_payment_method' => 'payment_method', 175 'get_shipping_method' => 'shipping_method', 176 ); 177 178 forEach ( $extra_params as $key => $value ) { 179 if ( $order->$key() ) { 180 $cart_data[$value] = $order->$key(); 181 } 182 } 183 184 if ( $order->get_used_coupons() ) { 185 $cart_data['discount_code'] = $order->get_used_coupons(); 186 } 187 188 } 189 190 if ( count( $content_category ) > 0 ) { 191 $cart_data['content_category'] = implode( ', ', $content_category ); 192 } 193 194 wp_localize_script( 'fca_pc_client_js', 'fcaPcWooPurchase', $cart_data ); 195 196 } 193 197 } 194 198 } -
facebook-conversion-pixel/trunk/pixel-cat.js
r2629553 r2687254 325 325 326 326 function fca_pc_generate_id() { 327 328 327 return 'xxxxxxxxxx'.replace(/[x]/g, function( c ) { 329 var r = Math.random() * 16 | 0, v = c == 'x' ? r : ( r & 0x3 | 0x8 ) 330 return v.toString( 16 ) 331 }) 332 333 } 334 328 return Math.floor(Math.random() * 16).toString( 16 ) 329 }) 330 } 331 335 332 function fca_pc_set_cookie(cname, cvalue, exdays) { 336 333 … … 411 408 412 409 var eventID = fca_pc_generate_id() 410 var externalID = fca_pc_check_cookie() 413 411 var event_params = params ? add_auto_event_params( params ) : null 414 412 415 413 // always send the pixel event 416 fbq( name, action, event_params, { event_id: eventID } )414 fbq( name, action, event_params, { event_id: eventID, external_id: externalID } ) 417 415 418 416 // Check if Conversions API is enabled in any of the active pixels -
facebook-conversion-pixel/trunk/pixel-cat.min.js
r2629553 r2687254 1 jQuery(document).ready(function(t){function e(){return"xxxxxxxxxx".replace(/[x]/g,function(t){ var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})}function c(){var t=function(t){for(var e=t+"=",c=document.cookie.split(";"),n=0;n<c.length;n++){for(var a=c[n];" "==a.charAt(0);)a=a.substring(1);if(0==a.indexOf(e))return a.substring(e.length,a.length)}return""}("pixelcat_id");return""==t&&""!=(t=e())&&null!=t&&function(t,e,c){var n=new Date;n.setTime(n.getTime()+24*c*60*60*1e3);var a="expires="+n.toUTCString();document.cookie=t+"="+e+";"+a+";path=/"}("pixelcat_id",t,365),t}function n(n,a,o){if(t.isFunction(fbq)){var r=e(),s=o?function(t){for(var e in t)"string"==typeof t[e]&&(t[e]=t[e].replace("{post_id}",fcaPcPost.id).replace("{post_title}",fcaPcPost.title).replace("{post_type}",fcaPcPost.type).replace("{post_category}",fcaPcPost.categories.join(", ")));fcaPcPost.utm_support&&(t=function(t){for(var e=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],c=0;c<e.length;c++)null!==p(e[c])&&(t[e[c]]=p(e[c]));return t}(t));fcaPcPost.user_parameters&&(t=function(t){for(var e=["referrer","language","logged_in","post_tag","post_category"],c=0;c<e.length;c++)fcaPcUserParams[e[c]]&&(t[e[c]]=fcaPcUserParams[e[c]]);return t}(t));return t}(o):null;fbq(n,a,s,{event_id:r}),function(){var t=fcaPcCAPI.pixels;for(i=0;i<t.length;i++){var e=JSON.parse(t[i]);if("Conversions API"===e.type&&!e.paused)return!0}return!1}()&&function(e,n,a){var i=new Date(t.now()).toUTCString(),o=new Date(i).valueOf()/1e3,p=window.location.origin+window.location.pathname,r={action:"fca_pc_capi_event",event_name:e,event_time:o,event_id:a,external_id:c(),client_user_agent:navigator.userAgent,event_source_url:p,custom_data:n,nonce:fcaPcCAPI.nonce};t.ajax({url:fcaPcCAPI.ajax_url,type:"POST",data:r})}(a,s,r)}}function a(t,e){document.cookie=t+"="+e+";path=/"}function o(t){var e=("; "+document.cookie).split("; "+t+"=");return 2===e.length&&e.pop().split(";").shift()}function p(t){for(var e=[],c=location.search.substr(1).split("&"),n=0;n<c.length;n++)if((e=c[n].split("="))[0]===t)return decodeURIComponent(e[1]).replace(/\+/g," ");return null}!function(){for(var e=0;e<fcaPcEvents.length;e++){var c=fcaPcEvents[e].event,a=fcaPcEvents[e].parameters,i=fcaPcEvents[e].triggerType,o=fcaPcEvents[e].trigger,p=fcaPcEvents[e].apiAction;switch(i){case"css":t(o).on("click",{name:c,params:a,apiAction:p},function(t){n(t.data.apiAction,t.data.name,t.data.params)});break;case"hover":t(o).on("mouseenter",{name:c,params:a,apiAction:p,trigger:o},function(e){n(e.data.apiAction,e.data.name,e.data.params),t(e.data.trigger).off("mouseenter")});break;case"post":fcaPcEvents[e].hasOwnProperty("delay")&&fcaPcEvents[e].hasOwnProperty("scroll")?setTimeout(function(e,c,a,i){t(window).scroll({scrollTarget:e,apiAction:c,eventName:a,parameters:i},function(e){e.data.scrollTarget<=function(){var e=t(window).scrollTop(),c=t(document).height()-t(window).height();return 0==c?100:e/c*100}()&&(t(window).off(e),n(c,a,i))}).scroll()},1e3*fcaPcEvents[e].delay,fcaPcEvents[e].scroll,p,c,a):fcaPcEvents[e].hasOwnProperty("delay")?setTimeout(n,1e3*fcaPcEvents[e].delay,p,c,a):n(p,c,a);break;case"url":t("a").each(function(){t(this).attr("href")===o&&t(this).on("click",{name:c,params:a,apiAction:p},function(t){n(t.data.apiAction,t.data.name,t.data.params)})})}}}(),n("track","PageView"),"undefined"!=typeof fcaPcSearchQuery&&n("track","Search",fcaPcSearchQuery),"undefined"!=typeof fcaPcLandingPageCatEnabled&&t("#fca-lpc-optin-button").click(function(e){var c;if(c=!(0!==t("#fca-lpc-gdpr-consent").length)||"checked"===t("#fca-lpc-gdpr-consent").attr("checked"),t("#fca-lpc-email-input").val()){t("#fca-lpc-email-input").val(),t("#fca-lpc-name-input").val();if(c)return n("track","Lead",{content_name:fcaPcPost.title}),!0}}),"undefined"!=typeof fcaPcOptinCatEnabled&&t(".fca_eoi_form").submit(function(e){var c=!0,a=t(this).find('input[name="name"]').val(),i=t(this).find('input[name="email"]').val();t(this).find('input[name="i_agree"]').length&&"checked"!==t(this).find(".fca_eoi_gdpr_consent").attr("checked")&&(c=!1),i&&c&&n("track","Lead",{content_name:fcaPcPost.title,form_id:t(this).find("#fca_eoi_form_id").val()})}),"undefined"!=typeof fcaPcEptEnabled&&t(".ptp-checkout-button, .ptp-button, .fca-ept-button").click(function(e){-1!==t(this).attr("href").indexOf("?edd_action=add_to_cart&download_id")&&fcaPcPost.edd_enabled||-1!==t(this).attr("href").indexOf("add-to-cart=")&&fcaPcPost.woo_enabled||n("track","InitiateCheckout",{content_name:fcaPcPost.title,pricing_table_id:function(t){var e=[];if(t.closest(".ptp-pricing-table").length)e=t.closest(".ptp-pricing-table");else if(t.closest(".pricing_container").length)e=t.closest(".pricing_container");else if(t.closest(".ptp-stylish-pricingtable").length)e=t.closest(".ptp-stylish-pricingtable");else if(t.closest(".ptp-design4-pricingtable").length)e=t.closest(".ptp-design4-pricingtable");else if(t.closest(".ptp-dg5-pricing-table").length)e=t.closest(".ptp-dg5-pricing-table");else if(t.closest(".cd-pricing-container").length)e=t.closest(".cd-pricing-container");else if(t.closest(".ptp-comparison1-pricingtable").length)e=t.closest(".ptp-comparison1-pricingtable");else if(t.closest(".ptp-comparison2-pricingtable").length)e=t.closest(".ptp-comparison2-pricingtable");else if(t.closest(".ptp-comparison3-pricingtable").length)e=t.closest(".ptp-comparison3-pricingtable");else if(t.closest(".fca-ept-main").length)return(e=t.closest(".fca-ept-main")).attr("id").replace("fca-ept-table-","");return e.length?e.attr("id").replace("ptp-",""):""}(t(this)),plan_name:function(t){var e=[];return t.closest(".ptp-col").find(".ptp-plan").length?e=t.closest(".ptp-col").find(".ptp-plan"):t.closest(".pricing_item").find(".name").length?e=t.closest(".pricing_item").find(".name"):t.closest(".ptp-stylish-column").find(".title").length?e=t.closest(".ptp-stylish-column").find(".title"):t.closest(".ptp-design4-col").find(".ptp-design4-title").length?e=t.closest(".ptp-design4-col").find(".ptp-design4-title").eq(0):t.closest(".ptp-dg5-col").find(".ptp-dg5-plan").length?e=t.closest(".ptp-dg5-col").find(".ptp-dg5-plan"):t.closest(".ptp-dg6-col").find(".ptp-dg6-pricing-header h2").length?e=t.closest(".ptp-dg6-col").find(".ptp-dg6-pricing-header h2"):t.closest(".ptp-dg7-col").find(".ptp-dg7-pricing-header h2").length?e=t.closest(".ptp-dg7-col").find(".ptp-dg7-pricing-header h2"):t.closest(".ptp-price-table").find(".ptp-plan-title h2").length?e=t.closest(".ptp-price-table").find(".ptp-plan-title h2"):t.closest(".ptp-cp2-price-table").find(".ptp-cp2-plan-title h2").length?e=t.closest(".ptp-cp2-price-table").find(".ptp-cp2-plan-title h2"):t.closest(".ptp-cp3-price-table").find(".ptp-cp3-plan-title h2").length?e=t.closest(".ptp-cp3-price-table").find(".ptp-cp3-plan-title h2"):t.closest(".fca-ept-column").find(".fca-ept-plan").length&&(e=t.closest(".fca-ept-column").find(".fca-ept-plan")),e.length?e.text():""}(t(this)),price:function(t){var e=[];return t.closest(".ptp-col").find(".ptp-price").length?e=t.closest(".ptp-col").find(".ptp-price"):t.closest(".pricing_item").find(".price").length?e=t.closest(".pricing_item").find(".price"):t.closest(".ptp-stylish-column").find(".price").length?e=t.closest(".ptp-stylish-column").find(".price"):t.closest(".ptp-design4-col").find(".ptp-design4-price").length?e=t.closest(".ptp-design4-col").find(".ptp-design4-price"):t.closest(".ptp-dg5-col").find(".ptp-dg5-price").length?e=t.closest(".ptp-dg5-col").find(".ptp-dg5-price"):t.closest(".ptp-dg6-col").find(".ptp-dg6-price").length?e=t.closest(".ptp-dg6-col").find(".ptp-dg6-price"):t.closest(".ptp-dg7-col").find(".ptp-dg7-price").length?e=t.closest(".ptp-dg7-col").find(".ptp-dg7-price"):t.closest(".ptp-price-table").find(".cp1-ptp-price").length?e=t.closest(".ptp-price-table").find(".cp1-ptp-price"):t.closest(".ptp-cp2-price-table").find(".ptp-cp2-row-id-0").length?e=t.closest(".ptp-cp2-price-table").find(".ptp-cp2-row-id-0"):t.closest(".ptp-cp3-price-table").find(".cp3-ptp-price").length?e=t.closest(".ptp-cp3-price-table").find(".cp3-ptp-price"):t.closest(".fca-ept-column").find(".fca-ept-price").length&&(e=t.closest(".fca-ept-column").find(".fca-ept-price")),e.length?Number(e.text().replace(/[^0-9\.]+/g,"")):""}(t(this))})}),"undefined"!=typeof fcaPcQuizCatEnabled&&(t(".fca_qc_start_button").click(function(e){return n("trackCustom","QuizStart",{quiz_id:parseInt(t(this).closest(".fca_qc_quiz").prop("id").replace("fca_qc_quiz_","")),quiz_name:t(this).closest(".fca_qc_quiz").find(".fca_qc_quiz_title").text()}),!0}),t(".fca_qc_share_link").click(function(e){return n("trackCustom","QuizShare",{quiz_id:parseInt(t(this).closest(".fca_qc_quiz").prop("id").replace("fca_qc_quiz_","")),quiz_name:t(this).closest(".fca_qc_quiz").find(".fca_qc_quiz_title").text()}),!0}),t(".fca_qc_submit_email_button").click(function(e){var c;if(c=!(0!==t(".fca-qc-gdpr-consent").length)||"checked"===t(".fca-qc-gdpr-consent").attr("checked"),t(this).siblings("#fca_qc_email_input").val()){var a=parseInt(t(this).closest(".fca_qc_quiz").prop("id").replace("fca_qc_quiz_","")),i=t(this).closest(".fca_qc_quiz").find(".fca_qc_quiz_title").text();t(this).siblings("#fca_qc_email_input").val(),t(this).siblings("#fca_qc_name_input").val();if(c)return n("track","Lead",{quiz_id:a,quiz_name:i}),!0}}),t(".fca_qc_score_title").on("DOMSubtreeModified",function(e){if(!t(this).data("pixelcat")){t(this).data("pixelcat",!0);n("trackCustom","QuizCompletion",{quiz_id:parseInt(t(this).closest(".fca_qc_quiz").prop("id").replace("fca_qc_quiz_","")),quiz_name:t(this).closest(".fca_qc_quiz").find(".fca_qc_quiz_title").text(),quiz_result:t(this).text()})}return!0})),"undefined"!=typeof fcaPcEddCheckoutCart&&(n("track","InitiateCheckout",fcaPcEddCheckoutCart),t("#edd_purchase_form").on("submit",function(t){return n("track","AddPaymentInfo",fcaPcEddCheckoutCart),!0})),"undefined"!=typeof fcaPcEddProduct&&(fcaPcPost.edd_delay?setTimeout(n,1e3*fcaPcPost.edd_delay,"track","ViewContent",fcaPcEddProduct):n("track","ViewContent",fcaPcEddProduct),t(".edd-add-to-cart").click(function(t){n("track","AddToCart",fcaPcEddProduct)}),t(".wl-add-to, .add_to_wishlist").click(function(t){n("track","AddToWishlist",fcaPcEddProduct)})),o("fca_pc_edd_purchase")&&(n("track","Purchase",JSON.parse(decodeURIComponent(o("fca_pc_edd_purchase").replace(/\+/g,"%20")))),a("fca_pc_edd_purchase","")),o("fca_pc_advanced_matching")&&a("fca_pc_advanced_matching",""),t("body").on("added_to_cart",function(){var e={action:"fca_pc_woo_ajax_add_to_cart",product_id:fcaPcPost.id};t.ajax({url:fcaPcCAPI.ajax_url,type:"POST",data:e,success:function(t){n("track","AddToCart",t)}})}),o("fca_pc_woo_add_to_cart")&&(n("track","AddToCart",JSON.parse(decodeURIComponent(o("fca_pc_woo_add_to_cart").replace(/\+/g,"%20")))),a("fca_pc_woo_add_to_cart","")),"undefined"!=typeof fcaPcWooCheckoutCart&&(n("track","InitiateCheckout",fcaPcWooCheckoutCart),t("form.checkout").on("checkout_place_order",function(t){return n("track","AddPaymentInfo",fcaPcWooCheckoutCart),!0})),"undefined"!=typeof fcaPcWooPurchase&&n("track","Purchase",fcaPcWooPurchase),"undefined"!=typeof fcaPcWooProduct&&(fcaPcPost.woo_delay?setTimeout(n,1e3*fcaPcPost.woo_delay,"track","ViewContent",fcaPcWooProduct):n("track","ViewContent",fcaPcWooProduct),t(".wl-add-to, .add_to_wishlist").click(function(t){n("track","AddToWishlist",fcaPcWooProduct)})),"undefined"!=typeof fcaPcVideos&&fcaPcVideos.forEach(function(t){t.on("pixel_event",function(t,e,c){n(t,e,c)})}),fcaPcCAPI.debug&&(console.log("pixel cat events:"),console.log(fcaPcEvents),console.log("pixel cat post:"),console.log(fcaPcPost))});1 jQuery(document).ready(function(t){function e(){return"xxxxxxxxxx".replace(/[x]/g,function(t){return Math.floor(16*Math.random()).toString(16)})}function c(){var t=function(t){for(var e=t+"=",c=document.cookie.split(";"),n=0;n<c.length;n++){for(var a=c[n];" "==a.charAt(0);)a=a.substring(1);if(0==a.indexOf(e))return a.substring(e.length,a.length)}return""}("pixelcat_id");return""==t&&""!=(t=e())&&null!=t&&function(t,e,c){var n=new Date;n.setTime(n.getTime()+24*c*60*60*1e3);var a="expires="+n.toUTCString();document.cookie=t+"="+e+";"+a+";path=/"}("pixelcat_id",t,365),t}function n(n,a,o){if(t.isFunction(fbq)){var r=e(),s=c(),l=o?function(t){for(var e in t)"string"==typeof t[e]&&(t[e]=t[e].replace("{post_id}",fcaPcPost.id).replace("{post_title}",fcaPcPost.title).replace("{post_type}",fcaPcPost.type).replace("{post_category}",fcaPcPost.categories.join(", ")));fcaPcPost.utm_support&&(t=function(t){for(var e=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],c=0;c<e.length;c++)null!==p(e[c])&&(t[e[c]]=p(e[c]));return t}(t));fcaPcPost.user_parameters&&(t=function(t){for(var e=["referrer","language","logged_in","post_tag","post_category"],c=0;c<e.length;c++)fcaPcUserParams[e[c]]&&(t[e[c]]=fcaPcUserParams[e[c]]);return t}(t));return t}(o):null;fbq(n,a,l,{event_id:r,external_id:s}),function(){var t=fcaPcCAPI.pixels;for(i=0;i<t.length;i++){var e=JSON.parse(t[i]);if("Conversions API"===e.type&&!e.paused)return!0}return!1}()&&function(e,n,a){var i=new Date(t.now()).toUTCString(),o=new Date(i).valueOf()/1e3,p=window.location.origin+window.location.pathname,r={action:"fca_pc_capi_event",event_name:e,event_time:o,event_id:a,external_id:c(),client_user_agent:navigator.userAgent,event_source_url:p,custom_data:n,nonce:fcaPcCAPI.nonce};t.ajax({url:fcaPcCAPI.ajax_url,type:"POST",data:r})}(a,l,r)}}function a(t,e){document.cookie=t+"="+e+";path=/"}function o(t){var e=("; "+document.cookie).split("; "+t+"=");return 2===e.length&&e.pop().split(";").shift()}function p(t){for(var e=[],c=location.search.substr(1).split("&"),n=0;n<c.length;n++)if((e=c[n].split("="))[0]===t)return decodeURIComponent(e[1]).replace(/\+/g," ");return null}!function(){for(var e=0;e<fcaPcEvents.length;e++){var c=fcaPcEvents[e].event,a=fcaPcEvents[e].parameters,i=fcaPcEvents[e].triggerType,o=fcaPcEvents[e].trigger,p=fcaPcEvents[e].apiAction;switch(i){case"css":t(o).on("click",{name:c,params:a,apiAction:p},function(t){n(t.data.apiAction,t.data.name,t.data.params)});break;case"hover":t(o).on("mouseenter",{name:c,params:a,apiAction:p,trigger:o},function(e){n(e.data.apiAction,e.data.name,e.data.params),t(e.data.trigger).off("mouseenter")});break;case"post":fcaPcEvents[e].hasOwnProperty("delay")&&fcaPcEvents[e].hasOwnProperty("scroll")?setTimeout(function(e,c,a,i){t(window).scroll({scrollTarget:e,apiAction:c,eventName:a,parameters:i},function(e){e.data.scrollTarget<=function(){var e=t(window).scrollTop(),c=t(document).height()-t(window).height();return 0==c?100:e/c*100}()&&(t(window).off(e),n(c,a,i))}).scroll()},1e3*fcaPcEvents[e].delay,fcaPcEvents[e].scroll,p,c,a):fcaPcEvents[e].hasOwnProperty("delay")?setTimeout(n,1e3*fcaPcEvents[e].delay,p,c,a):n(p,c,a);break;case"url":t("a").each(function(){t(this).attr("href")===o&&t(this).on("click",{name:c,params:a,apiAction:p},function(t){n(t.data.apiAction,t.data.name,t.data.params)})})}}}(),n("track","PageView"),"undefined"!=typeof fcaPcSearchQuery&&n("track","Search",fcaPcSearchQuery),"undefined"!=typeof fcaPcLandingPageCatEnabled&&t("#fca-lpc-optin-button").click(function(e){var c;if(c=!(0!==t("#fca-lpc-gdpr-consent").length)||"checked"===t("#fca-lpc-gdpr-consent").attr("checked"),t("#fca-lpc-email-input").val()){t("#fca-lpc-email-input").val(),t("#fca-lpc-name-input").val();if(c)return n("track","Lead",{content_name:fcaPcPost.title}),!0}}),"undefined"!=typeof fcaPcOptinCatEnabled&&t(".fca_eoi_form").submit(function(e){var c=!0,a=t(this).find('input[name="name"]').val(),i=t(this).find('input[name="email"]').val();t(this).find('input[name="i_agree"]').length&&"checked"!==t(this).find(".fca_eoi_gdpr_consent").attr("checked")&&(c=!1),i&&c&&n("track","Lead",{content_name:fcaPcPost.title,form_id:t(this).find("#fca_eoi_form_id").val()})}),"undefined"!=typeof fcaPcEptEnabled&&t(".ptp-checkout-button, .ptp-button, .fca-ept-button").click(function(e){-1!==t(this).attr("href").indexOf("?edd_action=add_to_cart&download_id")&&fcaPcPost.edd_enabled||-1!==t(this).attr("href").indexOf("add-to-cart=")&&fcaPcPost.woo_enabled||n("track","InitiateCheckout",{content_name:fcaPcPost.title,pricing_table_id:function(t){var e=[];if(t.closest(".ptp-pricing-table").length)e=t.closest(".ptp-pricing-table");else if(t.closest(".pricing_container").length)e=t.closest(".pricing_container");else if(t.closest(".ptp-stylish-pricingtable").length)e=t.closest(".ptp-stylish-pricingtable");else if(t.closest(".ptp-design4-pricingtable").length)e=t.closest(".ptp-design4-pricingtable");else if(t.closest(".ptp-dg5-pricing-table").length)e=t.closest(".ptp-dg5-pricing-table");else if(t.closest(".cd-pricing-container").length)e=t.closest(".cd-pricing-container");else if(t.closest(".ptp-comparison1-pricingtable").length)e=t.closest(".ptp-comparison1-pricingtable");else if(t.closest(".ptp-comparison2-pricingtable").length)e=t.closest(".ptp-comparison2-pricingtable");else if(t.closest(".ptp-comparison3-pricingtable").length)e=t.closest(".ptp-comparison3-pricingtable");else if(t.closest(".fca-ept-main").length)return(e=t.closest(".fca-ept-main")).attr("id").replace("fca-ept-table-","");return e.length?e.attr("id").replace("ptp-",""):""}(t(this)),plan_name:function(t){var e=[];return t.closest(".ptp-col").find(".ptp-plan").length?e=t.closest(".ptp-col").find(".ptp-plan"):t.closest(".pricing_item").find(".name").length?e=t.closest(".pricing_item").find(".name"):t.closest(".ptp-stylish-column").find(".title").length?e=t.closest(".ptp-stylish-column").find(".title"):t.closest(".ptp-design4-col").find(".ptp-design4-title").length?e=t.closest(".ptp-design4-col").find(".ptp-design4-title").eq(0):t.closest(".ptp-dg5-col").find(".ptp-dg5-plan").length?e=t.closest(".ptp-dg5-col").find(".ptp-dg5-plan"):t.closest(".ptp-dg6-col").find(".ptp-dg6-pricing-header h2").length?e=t.closest(".ptp-dg6-col").find(".ptp-dg6-pricing-header h2"):t.closest(".ptp-dg7-col").find(".ptp-dg7-pricing-header h2").length?e=t.closest(".ptp-dg7-col").find(".ptp-dg7-pricing-header h2"):t.closest(".ptp-price-table").find(".ptp-plan-title h2").length?e=t.closest(".ptp-price-table").find(".ptp-plan-title h2"):t.closest(".ptp-cp2-price-table").find(".ptp-cp2-plan-title h2").length?e=t.closest(".ptp-cp2-price-table").find(".ptp-cp2-plan-title h2"):t.closest(".ptp-cp3-price-table").find(".ptp-cp3-plan-title h2").length?e=t.closest(".ptp-cp3-price-table").find(".ptp-cp3-plan-title h2"):t.closest(".fca-ept-column").find(".fca-ept-plan").length&&(e=t.closest(".fca-ept-column").find(".fca-ept-plan")),e.length?e.text():""}(t(this)),price:function(t){var e=[];return t.closest(".ptp-col").find(".ptp-price").length?e=t.closest(".ptp-col").find(".ptp-price"):t.closest(".pricing_item").find(".price").length?e=t.closest(".pricing_item").find(".price"):t.closest(".ptp-stylish-column").find(".price").length?e=t.closest(".ptp-stylish-column").find(".price"):t.closest(".ptp-design4-col").find(".ptp-design4-price").length?e=t.closest(".ptp-design4-col").find(".ptp-design4-price"):t.closest(".ptp-dg5-col").find(".ptp-dg5-price").length?e=t.closest(".ptp-dg5-col").find(".ptp-dg5-price"):t.closest(".ptp-dg6-col").find(".ptp-dg6-price").length?e=t.closest(".ptp-dg6-col").find(".ptp-dg6-price"):t.closest(".ptp-dg7-col").find(".ptp-dg7-price").length?e=t.closest(".ptp-dg7-col").find(".ptp-dg7-price"):t.closest(".ptp-price-table").find(".cp1-ptp-price").length?e=t.closest(".ptp-price-table").find(".cp1-ptp-price"):t.closest(".ptp-cp2-price-table").find(".ptp-cp2-row-id-0").length?e=t.closest(".ptp-cp2-price-table").find(".ptp-cp2-row-id-0"):t.closest(".ptp-cp3-price-table").find(".cp3-ptp-price").length?e=t.closest(".ptp-cp3-price-table").find(".cp3-ptp-price"):t.closest(".fca-ept-column").find(".fca-ept-price").length&&(e=t.closest(".fca-ept-column").find(".fca-ept-price")),e.length?Number(e.text().replace(/[^0-9\.]+/g,"")):""}(t(this))})}),"undefined"!=typeof fcaPcQuizCatEnabled&&(t(".fca_qc_start_button").click(function(e){return n("trackCustom","QuizStart",{quiz_id:parseInt(t(this).closest(".fca_qc_quiz").prop("id").replace("fca_qc_quiz_","")),quiz_name:t(this).closest(".fca_qc_quiz").find(".fca_qc_quiz_title").text()}),!0}),t(".fca_qc_share_link").click(function(e){return n("trackCustom","QuizShare",{quiz_id:parseInt(t(this).closest(".fca_qc_quiz").prop("id").replace("fca_qc_quiz_","")),quiz_name:t(this).closest(".fca_qc_quiz").find(".fca_qc_quiz_title").text()}),!0}),t(".fca_qc_submit_email_button").click(function(e){var c;if(c=!(0!==t(".fca-qc-gdpr-consent").length)||"checked"===t(".fca-qc-gdpr-consent").attr("checked"),t(this).siblings("#fca_qc_email_input").val()){var a=parseInt(t(this).closest(".fca_qc_quiz").prop("id").replace("fca_qc_quiz_","")),i=t(this).closest(".fca_qc_quiz").find(".fca_qc_quiz_title").text();t(this).siblings("#fca_qc_email_input").val(),t(this).siblings("#fca_qc_name_input").val();if(c)return n("track","Lead",{quiz_id:a,quiz_name:i}),!0}}),t(".fca_qc_score_title").on("DOMSubtreeModified",function(e){if(!t(this).data("pixelcat")){t(this).data("pixelcat",!0);n("trackCustom","QuizCompletion",{quiz_id:parseInt(t(this).closest(".fca_qc_quiz").prop("id").replace("fca_qc_quiz_","")),quiz_name:t(this).closest(".fca_qc_quiz").find(".fca_qc_quiz_title").text(),quiz_result:t(this).text()})}return!0})),"undefined"!=typeof fcaPcEddCheckoutCart&&(n("track","InitiateCheckout",fcaPcEddCheckoutCart),t("#edd_purchase_form").on("submit",function(t){return n("track","AddPaymentInfo",fcaPcEddCheckoutCart),!0})),"undefined"!=typeof fcaPcEddProduct&&(fcaPcPost.edd_delay?setTimeout(n,1e3*fcaPcPost.edd_delay,"track","ViewContent",fcaPcEddProduct):n("track","ViewContent",fcaPcEddProduct),t(".edd-add-to-cart").click(function(t){n("track","AddToCart",fcaPcEddProduct)}),t(".wl-add-to, .add_to_wishlist").click(function(t){n("track","AddToWishlist",fcaPcEddProduct)})),o("fca_pc_edd_purchase")&&(n("track","Purchase",JSON.parse(decodeURIComponent(o("fca_pc_edd_purchase").replace(/\+/g,"%20")))),a("fca_pc_edd_purchase","")),o("fca_pc_advanced_matching")&&a("fca_pc_advanced_matching",""),t("body").on("added_to_cart",function(){var e={action:"fca_pc_woo_ajax_add_to_cart",product_id:fcaPcPost.id};t.ajax({url:fcaPcCAPI.ajax_url,type:"POST",data:e,success:function(t){n("track","AddToCart",t)}})}),o("fca_pc_woo_add_to_cart")&&(n("track","AddToCart",JSON.parse(decodeURIComponent(o("fca_pc_woo_add_to_cart").replace(/\+/g,"%20")))),a("fca_pc_woo_add_to_cart","")),"undefined"!=typeof fcaPcWooCheckoutCart&&(n("track","InitiateCheckout",fcaPcWooCheckoutCart),t("form.checkout").on("checkout_place_order",function(t){return n("track","AddPaymentInfo",fcaPcWooCheckoutCart),!0})),"undefined"!=typeof fcaPcWooPurchase&&n("track","Purchase",fcaPcWooPurchase),"undefined"!=typeof fcaPcWooProduct&&(fcaPcPost.woo_delay?setTimeout(n,1e3*fcaPcPost.woo_delay,"track","ViewContent",fcaPcWooProduct):n("track","ViewContent",fcaPcWooProduct),t(".wl-add-to, .add_to_wishlist").click(function(t){n("track","AddToWishlist",fcaPcWooProduct)})),"undefined"!=typeof fcaPcVideos&&fcaPcVideos.forEach(function(t){t.on("pixel_event",function(t,e,c){n(t,e,c)})}),fcaPcCAPI.debug&&(console.log("pixel cat events:"),console.log(fcaPcEvents),console.log("pixel cat post:"),console.log(fcaPcPost))}); -
facebook-conversion-pixel/trunk/readme.txt
r2664115 r2687254 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html 12 Stable tag: 2.6. 512 Stable tag: 2.6.6 13 13 14 14 Facebook Pixel Management Made Easy. From Facebook retargeting to conversion tracking, this plugin includes everything you need to run successful Facebook ads. … … 143 143 144 144 == Changelog == 145 146 = Pixel Cat: Conversion Pixel Manager 2.6.6 = 147 * Added external_id to pixel 148 * Updated WooCommerce event order function to prevent error (premium) 149 * Added info to product identifier setting in editor (premium) 150 * Added fallback server language 151 * Tested with WordPress 5.9.1 145 152 146 153 = Pixel Cat: Conversion Pixel Manager 2.6.5 = -
facebook-conversion-pixel/trunk/readmes/business.txt
r2664115 r2687254 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 Stable tag: 2.6. 511 Stable tag: 2.6.6 12 12 13 13 Facebook Pixel Management Made Easy. Set Up Facebook Pixel Events, Track Conversions & Build Custom Audiences With This Facebook Pixel WordPress Plugin. … … 87 87 == Changelog == 88 88 89 = Pixel Cat: Personal 2.6.5 = 89 = Pixel Cat: Business 2.6.6 = 90 * Added external_id to pixel 91 * Updated WooCommerce event order function to prevent error 92 * Added info to product identifier setting in editor 93 * Added fallback server language 94 * Tested with WordPress 5.9.1 95 96 = Pixel Cat: Business 2.6.5 = 90 97 * Fixed bug in Pixel Cat free 91 98 * Tested with WordPress 5.9 -
facebook-conversion-pixel/trunk/readmes/elite.txt
r2664115 r2687254 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 Stable tag: 2.6. 511 Stable tag: 2.6.6 12 12 13 13 Facebook Pixel Management Made Easy. Set Up Facebook Pixel Events, Track Conversions & Build Custom Audiences With This Facebook Pixel WordPress Plugin. … … 87 87 == Changelog == 88 88 89 = Pixel Cat: Personal 2.6.5 = 89 = Pixel Cat: Elite 2.6.6 = 90 * Added external_id to pixel 91 * Updated WooCommerce event order function to prevent error 92 * Added info to product identifier setting in editor 93 * Added fallback server language 94 * Tested with WordPress 5.9.1 95 96 = Pixel Cat: Elite 2.6.5 = 90 97 * Fixed bug in Pixel Cat free 91 98 * Tested with WordPress 5.9 -
facebook-conversion-pixel/trunk/readmes/lite.txt
r2664115 r2687254 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html 12 Stable tag: 2.6. 512 Stable tag: 2.6.6 13 13 14 14 Facebook Pixel Management Made Easy. From Facebook retargeting to conversion tracking, this plugin includes everything you need to run successful Facebook ads. … … 143 143 144 144 == Changelog == 145 146 = Pixel Cat: Conversion Pixel Manager 2.6.6 = 147 * Added external_id to pixel 148 * Updated WooCommerce event order function to prevent error (premium) 149 * Added info to product identifier setting in editor (premium) 150 * Added fallback server language 151 * Tested with WordPress 5.9.1 145 152 146 153 = Pixel Cat: Conversion Pixel Manager 2.6.5 = -
facebook-conversion-pixel/trunk/readmes/personal.txt
r2664115 r2687254 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 Stable tag: 2.6. 511 Stable tag: 2.6.6 12 12 13 13 Facebook Pixel Management Made Easy. Set Up Facebook Pixel Events, Track Conversions & Build Custom Audiences With This Facebook Pixel WordPress Plugin. … … 86 86 87 87 == Changelog == 88 89 = Pixel Cat: Personal 2.6.6 = 90 * Added external_id to pixel 91 * Updated WooCommerce event order function to prevent error 92 * Added info to product identifier setting in editor 93 * Added fallback server language 94 * Tested with WordPress 5.9.1 88 95 89 96 = Pixel Cat: Personal 2.6.5 =
Note: See TracChangeset
for help on using the changeset viewer.