If you are needing to send additional fields to Hubspot beyond what RaiseDonors already provides, this article will explain how you can send any kind of custom information with a bit of JavaScript.
Whatever you wish to add into the HubSpot integration needs to be added to a hidden field on the donation page. Your JavaScript should append this information to the hidden field during the 'click' event of the submit button. The ID of our submit button for the donation page is:
cphDonationForm_btnSubmit
The ID of this hidden field is:
cphDonationForm_hdnMiscInformation
It will likely already have information stored in its value and that data is needed to successfully complete the donation so do not delete any of the existing data.
Any data you append to this hidden field needs to follow this notation: name=value|
name = the name of the item you are sending to HubSpot.
value = the value of the item you are sending to HubSpot.
It's important that the names start with 'hubspot_'. This is necessary so that the system knows which pairs out of the hidden field to grab and include in the HubSpot integration.
Here's an example of the hidden field,
<input type="hidden" name="ctl00$cphDonationForm$hdnMiscInformation" id="cphDonationForm_hdnMiscInformation" value="RawUrl=https://raisedonors.com/donate.aspx?org=client&offer=some-offer-name&embed=true|ReferringURL=http://www.clientsite.com|Google_utm_campaign=|Google_utm_content=|Google_utm_medium=|Google_utm_source=|Google_utm_term=|BrowserInfo=Type=Mozilla|" />
And here is the same example with a few custom HubSpot data items:
<input type="hidden" name="ctl00$cphDonationForm$hdnMiscInformation" id="cphDonationForm_hdnMiscInformation" value="RawUrl=https://raisedonors.com/donate.aspx?org=client&offer=some-offer-name&embed=true|ReferringURL=http://www.clientsite.com|Google_utm_campaign=|Google_utm_content=|Google_utm_medium=|Google_utm_source=|Google_utm_term=|BrowserInfo=Type=Mozilla|hubspot_shirtsize=L|hubspot_churchname=First Baptist Gateway|hubspot_spousename=|" />
In this example we'd send the following to HubSpot,
churchname = First Baptist Gateway
shirtsize = L
spousename - would not be sent because it is empty.
If you are going to be submitting DateTime data to HubSpot, be sure to follow HubSpot's guidelines for sending DateTime.