il y a 2 semaines
Hi,
My question
How can I submit data to a HubSpot API endpoint from my website and ensure that it is not spammed?
Context
I have a website that is NOT hosted with HubSpot and I do NOT want to use the Hubspot JS to create my form.
I have followed the API documentation for submitting data to a form. However, it appears that this API does not support reCAPTCHA as per the documentation, "This endpoint does not support reCAPTCHA. If reCAPTCHA has been enabled on the form, submissions will not be accepted."
How can I submit data to a HubSpot API endpoint from my website and ensure that it is not spammed?
Résolu ! Accéder à la solution.
il y a 2 semaines
Hi to whomever ends up on this question 🙂
My solution to this was to load the HubSpot tracking code. Then anytime an "onSubmit" action occurs within a form, it triggers the form fields to be sent to HubSpot. You can see the form submissions in the "marketing" > "forms" section in the navigation.
I did not see this documented very well anywhere so hopefully this helps. You will likely want to take some sort of action within as event handler on the "onSubmit" action, but it is nice that this works out of the box.
il y a 2 semaines
Hi to whomever ends up on this question 🙂
My solution to this was to load the HubSpot tracking code. Then anytime an "onSubmit" action occurs within a form, it triggers the form fields to be sent to HubSpot. You can see the form submissions in the "marketing" > "forms" section in the navigation.
I did not see this documented very well anywhere so hopefully this helps. You will likely want to take some sort of action within as event handler on the "onSubmit" action, but it is nice that this works out of the box.
il y a 2 semaines
Hi @justinmassey ,
I understand that you don't want to use the JS for the Hubspot form, however, is it possible that you're still using the Hubspot tracking code on your site? If so, that will automatically pick up form sumissions from non-native forms anyway. This way, you can still have the form validation from within your website with reCAPTCHA and there might not be a need to use the API endpoint, as the Hubspot tracking code will automatically pick up the data for successful submissions.
Does that help?
Eli
Problem solver @ crmsquad
il y a 2 semaines
Hi @elizheleva ,
Yes I am 100% OK with using the Hubspot Tracking code.
Do you have any documentation or examples of this? I don't understand how this will work without sending the data from the DOM to an API endpoint.
il y a 2 semaines
Hi @justinmassey ,
simply adding the Hubspot tracking code on your website should do the job. Do you want to ping me a DM with the link, so I can give you some pointers? The code should be added like a Google Analytics tracking, i.e. it should be on every page of the site and that's pretty much it. Then it does its magic. 🙂
Here to help,
Eli