Advanced Google Suite Integration

Send Fundraise Up data to Google's full suite of products products such as Ads, Floodlight and Analytics through a single script

For advanced users only! Fundraise Up will only be able to provide limited support on the advanced Google Suite integration.

Getting Started

Once the gtag.js has been installed, you can configure it to send (or route) data to groups of Google accounts or products. A complete measurement solution for Google Ads, Google Marketing Platform, and Google Floodlight can be configured all from within the same script and deployed via Google Tag Manager.

You must disable the Google Analytics native integration on your account if you want to customize and use the Advanced Google Suite Integration. To disable or if you wish to use our native Google Analytics integration, which should accommodate 99% of use cases, please visit this article.

Place the below snippet code so it appears immediately after the <head> tag on each page of your site. Be sure to replace the bolded sections of the codes below with the ID of the Google product you're wanting to send data to.

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

  // Global configs. Comment out lines that are not used
  gtag('config', 'GA_MEASUREMENT_ID');
  gtag('config', 'AW-CONVERSION_ID');
  gtag('config', 'DC-FLOODLIGHT_ID');
</script>

Checkout Open

<script>
FundraiseUp.on('checkoutOpen', function(details) {

gtag('event', 'begin_checkout', {
'allow_custom_scripts': true,
'content_type': 'product',
'affiliation': 'Fundraise Up',
'items': [
{
'id': details.campaign.id,
'name': details.campaign.name,
'brand': 'Fundraise Up',
'quantity': 1
}
]
});

/* additionally it's good to send conversion event to Google Ads
and record floodlight activity */

gtag('event', 'conversion', {
'allow_custom_scripts': true,
'send_to': [
'AW-CONVERSION_ID/AW-CONVERSION_LABEL-1',
'DC-FLOODLIGHT_ID/[GROUP]/[ACTIVITY_TAG-1]+transactions'
],
'transaction_id': ''
});

});
</script>

Donation Complete

<script>
FundraiseUp.on('donationComplete', function(details) {

/*
Sent purchase event to Google Analytics
*/
gtag('event', 'purchase', {
'allow_custom_scripts': true,
'value': details.donation.amount,
'currency': details.donation.currency,
'transaction_id': details.donation.id,
'affiliation': 'Fundraise Up',
'items': [
{
'id': details.campaign.id,
'name': details.campaign.name,
'brand': 'Fundraise Up',
'category': details.donation.recurring ? 'Monthly Donation' : 'One-Time Donation',
'quantity': 1,
'price': details.donation.amount
}
]
});


/*
additionally it good to send conversion event to Google Ads
and record floodlight activity for donation completed. We recommend to track
recurring and one-time donations as separate conversions
as they have different long term values for your organization
*/

var sendTo = [
'AW-CONVERSION_ID/AW-CONVERSION_LABEL-2',
'DC-FLOODLIGHT_ID/[GROUP]/[ACTIVITY_TAG-2]+transactions'
];
if (details.donation.recurring) {
sendTo = [
'AW-CONVERSION_ID/AW-CONVERSION_LABEL-3',
'DC-FLOODLIGHT_ID/[GROUP]/[ACTIVITY_TAG-3]+transactions'
];
}

gtag('event', 'conversion', {
'allow_custom_scripts': true,
'send_to': sendTo,
'value': details.donation.amount,
'currency': details.donation.currency,
'transaction_id': details.donation.id
});

});
</script>

Be sure to update [GA_MEASUREMENT_ID], [AW-CONVERSION_ID], [DC-FLOODLIGHT_ID], [GROUP], and [ACTIVITY_TAG] to match your account and campaign settings