It's working good with "Consent checkboxes for communications and processing" option. (option 2 inGDPR dropdown)
I receive the subission with 2 GDPR options
which is fully consistent with the result obtained from the native hubspot form. Could somebody explain, how I should modify my code to use option 1 and option 3?
Thank you for the clear description of your use case.
When looking to use GDPR Option 1, you would need to include the following code:
{
"fields": [],
"legalConsentOptions": {
"legitimateInterest": {
"value": true,
// This must be true when using the 'legitimateInterest' option, as it reflects the consent indicated by the visitor when submitting the form
"subscriptionTypeId": 999,
// Integer; The ID of the specific subscription type that this forms indicates interest to.
"legalBasis": "CUSTOMER",
// String, one of CUSTOMER or LEAD; Whether this form indicates legitimate interest from a prospect/lead or from a client.
"text": "Legitimate interest consent text"
// String; The privacy text displayed to the visitor.
}
}
}
=
For GDPR Option 3, you do not have to pass any data into HubSpot using the form API but you're required to add the privacy text on the form. An example of the privacy text:
APAC Support needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Privacy Policy.
For GDPR Option 1, you can use the following code:
"legalConsentOptions":{ // Include this object when GDPR options are enabled
"consent":{
"consentToProcess":true,
"text":"I agree to allow Example Company to store and process my personal data.",
"communications":[
{
"value":true,
"subscriptionTypeId":{{subscriptionId}},
"text":"I agree to receive marketing communications from Example Company."
}
]
}
}
The contact record would reflect 'Freely given consent from contact' when using this.
For both GDPR option 1 and 2, the code that you would use is the following:
"legalConsentOptions":{ // Include this object when GDPR options are enabled
"consent":{
"consentToProcess":true,
"text":"I agree to allow Example Company to store and process my personal data.",
"communications":[
{
"value":true,
"subscriptionTypeId":{{subscriptionId}},
"text":"I agree to receive marketing communications from Example Company."
}
]
}
For option 3, the code that you would use is the following:
"legalConsentOptions": {
"legitimateInterest": {
"value": true,
// This must be true when using the 'legitimateInterest' option, as it reflects the consent indicated by the visitor when submitting the form
"subscriptionTypeId": {{subscriptionId}},
// Integer; The ID of the specific subscription type that this forms indicates interest to.
"legalBasis": "CUSTOMER",
// String, one of CUSTOMER or LEAD; Whether this form indicates legitimate interest from a prospect/lead or from a client.
"text": "Legitimate interest consent text"
// String; The privacy text displayed to the visitor.
}
}