You can add additional fields to the Hubspot integration 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 page is
cphDonationForm_btnSubmit
The id of this hidden field is,
cphDonationForm_hdnMiscInformation
It will likely already have information stored in it's value and that data is needed to
successfully complete the donation so don't delete any of the data in that field.
Any data you append to this hidden field needs to follow this notation,
{name=value|}
Don't include '{' and '}' those are just there for reference.
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 Hubspots guidelines for sending DateTime.
Comments
0 comments
Please sign in to leave a comment.