Using Custom Fields with JavaScript API

Assuming you have configured custom fields for your campaigns, you can access these datapoints with JS API through customFields function


Example:

FundraiseUp.on('checkoutOpen', function(details) {
var fund = details.customFields.fund || '';
var appeal = details.customFields.appeal || '';
var source = details.customFields.source || '';
});

FundraiseUp.on('donationComplete', function(details) {
var fund = details.customFields.fund || '';
var appeal = details.customFields.appeal || '';
var source = details.customFields.source || '';
});