Complete Google Marketing Integration

Google Ads, Google Floodlight and Google Analytics via Tag Manager: everything in one place

Getting Started

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

Learn more: https://developers.google.com/gtagjs/devguide/snippet

Place the snippet code so it appears immediately after the <head> tag on each page of your site:

<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 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'
]
});

});
</script>

Donation Complete

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

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
});

});
</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