Use JavaScript API to track events with GA

You can use Fundraise Up JavaScript SDK to fire key checkout events to Google Analytics. It can also be customized to meet your needs, using data from our JavaScript SDK.

You can find additional details and performance metrics by looking at your Google Analytics eCommerce data.

Please add your tracking code anywhere on the page after Fundraise Up installation code.

Example using analytics.js

FundraiseUp.on('checkoutOpen', function(details) {
ga('send', {
hitType: 'event', 
eventCategory: 'Fundraise Up Tracking', 
eventAction: 'Checkout Open', 
eventLabel: details.campaign.name + ' (' + details.campaign.id + ')',
});
});

FundraiseUp.on('checkoutClose', function(details) {
ga('send', {
hitType: 'event',
eventCategory: 'Fundraise Up Tracking',
eventAction: 'Checkout Close',
eventLabel: details.campaign.name + ' (' + details.campaign.id + ')'
});
});

FundraiseUp.on('donationComplete', function(details) {
ga('send', {
hitType: 'event',
eventCategory: 'Fundraise Up Tracking',
eventAction: 'Donation Complete',
eventLabel: details.campaign.name + ' (' + details.campaign.id + ')'
});
});

Example using gtag.js

FundraiseUp.on('checkoutOpen', function(details) {
gtag('event', 'Checkout Open', {
'event_category': 'Fundraise Up Tracking',
'event_label': details.campaign.name + ' (' + details.campaign.id + ')',
});
});

FundraiseUp.on('checkoutClose', function(details) {
gtag('event', 'Checkout Close', {
'event_category': 'Fundraise Up Tracking',
'event_label': details.campaign.name + ' (' + details.campaign.id + ')',
});
});

FundraiseUp.on('donationComplete', function(details) {
gtag('event', 'Donation Complete', {
'event_category': 'Fundraise Up Tracking',
'event_label': details.campaign.name + ' (' + details.campaign.id + ')',
});
});