Modify to work with GiveWP
-
This is the best plugin I have found that for Facebook pixel. However, it has an issue with GiveWP which has over 60,000 users.
There is a discussion on Facebook about GiveWP modification to make it work with a pixel plugin, but I believe this is best served within the pixel plugin itself. The issue is with tracking events, especially the purchase event on the final donation confirmation page.
We had to do the following:
1. Givewp coding configured:
shortcut-receipt.php line 285
<?php if ( filter_var( $receipt_item[‘display’], FILTER_VALIDATE_BOOLEAN ) ) : ?>
<?php
// strip out all whitespace
$zname_clean = preg_replace(‘/\s*/’, ”, $receipt_item[‘name’]);
// convert the string to all lowercase
$zname_clean = strtolower($zname_clean);
?>
<tr>
<td scope=”row”><?php echo $receipt_item[‘name’]; ?></td>
<td id=”<?php echo $zname_clean; ?>”><?php echo $receipt_item[‘value’]; ?></td>
</tr>
<?php endif; ?>Then adding following in the footer of the theme:
<!—Script Facebook Purchase Event —>
<script>
jQuery(window).load(function(){
var donationReceipt = jQuery(‘#give_donation_receipt’).length;
var successPage = jQuery(‘p.give_notice.give_success’).length;
var verifyTotalDonation = jQuery(‘#totaldonation’).length;
console.log(donationReceipt, successPage, verifyTotalDonation)
if(donationReceipt && successPage && verifyTotalDonation) {
console.log(‘===FACEBOOK PIXEL RECORDING===’)
var getPrice = jQuery(‘#totaldonation’).text();
getPrice = getPrice.split(‘£’);
getPrice = Number(getPrice[1]);
fbq(‘track’, ‘Purchase’, {currency: “GBP”, value: getPrice});
}
});
</script>
<!— Script Facebook End Here –>But, since your recurring payment only shows the value of the day, the subscription value it is not accurate. Therefore the final confirmation should display the full value. This is important for Facebook conversion pixel to understand what other donors to identify of purchase value. This is something that will need to be modified in GiveWP.
But why, I couldnt understand is that Pixel Caffeine identified the purchase event on the final confirmation page but did not pass this onto Facebook without us adding the modified code? It was frustrating.
I would strongly suggest that pixel caffeine is modified for Givewp so that it can aquire an additional following from its users. You should reach out the givewp to work together to make it happen.
- The topic ‘Modify to work with GiveWP’ is closed to new replies.