Skip to main content
Analytics and Conversion Tracking

affiliate, affiliation, marketing, conversion, analytics, pixel

Updated over a year ago

Analytics and Conversion tracking

Our platform supports Google Analytics 4, as well as Facebook analytics. In the Donation Form or Campaign wizards, you'll enter your Google Measurement ID and/or Facebook Pixel ID:

Facebook

On the donation form / campaign page, we have the following code (where you see {{key}} is where we place your Pixel ID).

<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", "{{key}}");fbq("track", "PageView");</script><noscript><img height="1" width="1" style="display:none"src=https://www.facebook.com/tr?id={{key}}&ev=PageView&noscript=1/></noscript>

On the confirmation page of the transaction we have the same script but replace

fbq("track", "PageView")

with:

fbq('track', 'Purchase', {donation_id : {donation_id}, currency: "{currency}", value: {sum}, campaign: "{campaign}"})

  • Donation_ID refers to our internal Donation ID

  • Currency will appear as a 3 letter symbol, like USD.

  • Sum will be an integer.

  • Campaign will be the name of your campaign or form as expressed in the URL address. For example my.israelgives.org/en/greatcampaign

Google

On the donation form / campaign page, we have the following code (where you see {{key}} is where we place your Measurement ID).

<!-- Google tag (gtag.js) --><script async src=https://www.googletagmanager.com/gtag/js?id={{key}}></script><script>  window.dataLayer = window.dataLayer || [];  function gtag(){dataLayer.push(arguments);}  gtag("js", new Date());gtag("config", "{{key}}");</script>

On the transaction confirmation page we have the same script and also:

"gtag("event", "purchase", {transaction_id : {donation_id},currency: "{currency}", value: {sum}, campaign: "{campaign}",
items: [
{item_id: {donation_id},item_name: "Donation",price: {sum}, quantity: 1 }
]
})
Did this answer your question?