Waqas Saeed Posted November 4, 2020 Share Posted November 4, 2020 Which Hook is the best to use in case from payment from admin if manually added or payment through client itself the hook *InvoicePaid just work on manual payment only. 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted November 16, 2020 Share Posted November 16, 2020 AddInvoicePayment may work but InvoicePaid seems like it should fire no matter how the invoice is paid as long as it gets marked as paid. If that isn't the case, you may want to file a bug report with WHMCS . 0 Quote Link to comment Share on other sites More sharing options...
Waqas Saeed Posted November 17, 2020 Author Share Posted November 17, 2020 @steven99 thanks, does it supports <<<HTML HTML; ? or echo to track conversion facebook conversion ? 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted November 17, 2020 Share Posted November 17, 2020 Not sure what you mean? Could you explain further? Those two mentioned hooks do not expect any returns / responses and do not provide output. If you need the hook to add a statistic / counter to something beyond WHMCS own records, then it needs to be done within the hook and how to do that depends on where you're adding to . 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted November 17, 2020 Share Posted November 17, 2020 (edited) 16 hours ago, Waqas Saeed said: @steven99 thanks, does it supports <<<HTML HTML; ? or echo to track conversion facebook conversion ? No, it doesn't. A quick way to determine if an action hook supports response, is looking at documentation in this specific section. In this case, AddInvoicePayment doesn't work for your need. No echo nor <<<HTML. As for Facebook Pixel, you need more than an action hook. Actually integrating it with WHMCS is a nightmere. Not to mention events like "purchase" can trigger on every page load and backspace ruining statistics. And WHMCS doesn't even provide the necessary parameters required for Pixel events. Edited November 17, 2020 by Kian 0 Quote Link to comment Share on other sites More sharing options...
Waqas Saeed Posted November 22, 2020 Author Share Posted November 22, 2020 Am bit satisfied from this; 'ShoppingCartCheckoutOutput' works little better with facebook pixel. What about OrderPaid hooks but you are right that it does not return output. Could you suggest a way out ? @Kian 0 Quote Link to comment Share on other sites More sharing options...
Waqas Saeed Posted November 22, 2020 Author Share Posted November 22, 2020 the following script contains facebook conversion code, it works fine and also pixel is able to note the purchases but the problem appear when the user refresh the page many times. eventually, the facebook count the purchases. instead of the one that happened once after payment redirect from the gateway, the callback url returns to the invoice page directly. somehow, if we can restrict the script to count if it is redirected from only callback url only. {if $status eq "Paid" || $paymentSuccessAwaitingNotification || $paymentSuccess || $paymentInititated} {assign var=total_amt value=$total|replace:'PKR':''|replace:' ':''} <!-- Facebook Pixel Code --> {literal} <script> !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','https://connect.facebook.net/en_US/fbevents.js'); fbq('init', 'xxxxxx'); // Insert your pixel ID here. fbq('track', 'Purchase', { currency: 'PKR', value: '{/literal}{$total_amt}{literal}', }); </script> {/literal} <!-- DO NOT MODIFY --> <!-- End Facebook Pixel Code --> {/if} 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted November 22, 2020 Share Posted November 22, 2020 It's the same script posted days ago here. It's obvious that it doesn't work due to reasons I explained here. 0 Quote Link to comment Share on other sites More sharing options...
jeebee123 Posted December 8, 2020 Share Posted December 8, 2020 Any other solution to track completed orders with Facebook? 0 Quote Link to comment Share on other sites More sharing options...
Evolve Web Hosting Posted December 8, 2020 Share Posted December 8, 2020 (edited) 3 hours ago, jeebee123 said: Any other solution to track completed orders with Facebook? Question from a non facebook user: What's the point of syncing order data with Facebook? Is it ad related? Edited December 8, 2020 by evolve hosting 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted December 8, 2020 Share Posted December 8, 2020 (edited) 2 hours ago, evolve hosting said: Is it ad related? Yes 2 hours ago, evolve hosting said: Question from a non facebook user: What's the point of syncing order data with Facebook? For tracking the ROI of Facebook ads and A/B testing campaigns. Edited December 8, 2020 by Kian 0 Quote Link to comment Share on other sites More sharing options...
Magicklug Posted December 11, 2020 Share Posted December 11, 2020 On 12/8/2020 at 11:04 PM, jeebee123 said: Any other solution to track completed orders with Facebook? Can't think of any other solutions, probably, there might be some but it's only available to some countries. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.