• 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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there, I’m one of the co-authors of GiveWP. Thanks for your suggestion. We’d love to see native GiveWP support in Pixel Caffeine.

    I am actively working on a GiveWP FB Pixel add-on right now that will extend the FB pixel however it’s been installed, but being able to leverage all the fine-tuned configuration and events that Pixel Caffeine offers natively for GiveWP would be a big boost that I don’t think the add-on will be able to cover in the near-term.

    Thanks for the suggestion! Keep us posted team if you plan to move forward.

    Plugin Author Antonino Scarfì

    (@antoscarface)

    Hi,

    thanks for posting here your case. The plugin doesn’t support GiveWP yet, but I’ll add it as feature request and I’ll try to do my best to add support to this plugin as well, in order to fire standard events automatically without modifications ?? I’ll keep posted here, so also @webdevmattcrom can be notified about updates.

    About your issue @socialprofilr, your code should fire the event, but I see a mistake which probably causes the value issue you mentioned. The mistake consists of pass a float value with fixed decimals.

    The line is:

    
    getPrice = Number(getPrice[1]);
    

    You should extend it in this way:

    
    getPrice = Number(getPrice[1]).toFixed(2);
    

    I had to fix this error in Pixel Caffeine as well in some versions ago.

    Give it a try and let me know ??

    Thanks @antoscarface — Looking forward to what you cook up.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Modify to work with GiveWP’ is closed to new replies.