Donorbox now provides a way to pass donation details to the conversion tracking scripts like Facebook Pixel and Google Adwords Conversion tracking. To enable this feature, Donorbox initializes a global javascript object 'DONORBOX' which will contain the 'donation' object after the successful donation is made. Thus DONORBOX.donation will be available for after donation tracking scripts to leverage the benefit of conversion tracking scripts.

Below are the examples illustrating the use of the javascript object for fetching donation details in conversion tracking scripts.

Facebook Pixel Tracking Example

  s.parentNode.insertBefore(t,s)}(window, document,'script',

  fbq('init', 'XXXXXXXXX', {
    fn: DONORBOX.donation.firstName,
    ln: DONORBOX.donation.lastName,

  fbq('track', 'Purchase', {
    value: DONORBOX.donation.amount,
    currency: DONORBOX.donation.currency
<img height="1" width="1" style="display:none" src=";ev=PageView&amp;noscript=1"/>

Adwords Conversion Tracking Example

<script async src=""></script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'AW-XXXXXXXXX');
  gtag('event', 'conversion', {
    'value': DONORBOX.donation.amount,
    'currency': DONORBOX.donation.currency,