You can use a single donation Form on your organization’s web page to track giving associated with different Segments or Projects, or additionally to set other properties in RaiseDonors. To make this happen, you can insert a Global JavaScript Object in your web page. This makes it much easier to manage your Donation Form tracking details without having to set anything in the URL parameters. If you'd prefer, click here to learn more about customizing URLs instead.
This Global JavaScript Object can be used to populate a number of different pieces of data including:
- Donor First and Last Name
- Donor Email Address
- Gift Amount
- Gift Frequency
- Segment
- Project
-
UTM codes including:
- Source
- Medium
- Campaign
- Term
- Content
Click here to learn more about using UTM codes in your URL.
To use the Global JavaScript Object, you'll need place the code in the box below on your web page.
Note: if you are defaulting values, ensure that the code is placed before the RaiseDonors giving form script. If you are overriding Segment or Project, ensure that the code is placed after the RaiseDonors form script.
let VirtuousForms = RaiseDonorsForms|| {}; RaiseDonorsForms.settings = { firstName: 'DEFAULT_VALUE', lastName: 'DEFAULT_VALUE', email: 'DEFAULT_VALUE', segmentOverrideCode: 'DEFAULT_VALUE', projectOverrideCode: 'DEFAULT_VALUE', frequency: 'DEFAULT_VALUE', amount: 'DEFAULT_VALUE', utm: { utmCampaign: 'DEFAULT_VALUE', utmSource: 'DEFAULT_VALUE', utmMedium: 'DEFAULT_VALUE', utmContent: 'DEFAULT_VALUE', utmTerm: 'DEFAULT_VALUE', }; onSuccess?: (response: DonateResponse) => void; onLoad?: () => void; };
This Global JavaScript Object will now help you set giving and donor values easily and without creating longer URLs! If you are needing Javascript to customize the design of your RaiseDonors Forms and Pages, rather than setting giving details, check out this article for more information.
Comments
0 comments
Please sign in to leave a comment.