Hi Team,
I have a drupal 7 site with some Webforms and some Hubspot forms.
One particular Webform we have is used at functions and so the same browser is used for multiple submissions.
This is causing the contact duplication issue.
I have duplicated the form in Hubspot and followed the ‘Submit Data to a Form’ (https://developers.hubspot.com/docs/methods/forms/submit_form).
I have added the FormGuid in the call, it seems to all be finctioning as expected.
I can overwrite the name as submitted it I send it as text instead of as submitted, so the module created is being called.
But the contact duplication continues.
I have disabled cookie tracking on the Hubspot duplicated form.
Any other material I can study to figure this out, or if I have missed the point of why this is happening entierly?
Thanks
Hi, @neil_armadillo.
Happy to help. You are understanding everything correctly — overwritten records are almost always due to the same hutk token value being passed.
To clarify, were you first seeing contacts being overwritten by a Drupal 7 Webform via a non-HubSpot form? If so, can you share a link to a contact record that was overwritten with submissions from this Drupal Webform?
Can you also expand on why you duplicated the form in HubSpot? Was it an effort to use the Forms API to pass submissions instead of relying on this functionality? Please share a link to the duplicated form and a contact record which was overwritten.
Hello @IsaacTakushi ,
Thanks for your time on this.
You are correct, it is a non Hubspot form where these duplications are coming from.
Here is a record being overwritten.
There are many more examples as I have deleted the cookies and submitted to test.
Duplicated the form as per instructions to obtain the Form GUID.
As when attempting to view the Form GUID I could only get a popup which said
“Copy this form to HubSpot to see more in-depth form analytics and take advantage of other features. A HubSpot form with the same fields will be created automatically so you can add it to your pages. This usually takes less than 5 minutes.”
So I duplicated it, cleared caches and tested the submissions again.
The duplicated form hasn’t been added to the Drupal site, it is still using the Webform as original.
Thanks
Hi, @neil_armadillo.
Thanks for providing that information!
Although you claim you are deleting the cookies before each test, I see that every submission contributing to changes on this contact record shares the cookie token value d87890ea0466481f887c3bc40761c4f6. This suggests that the cookies are not properly cleared before each test.
I made four test submissions on this page:
I cleared my browser’s cookies three different times, in between each submission, and none of the contacts were merged improperly.
Hi @IsaacTakushi ,
I haven’t deleted the cookies before each test.
I made some test submissions, then cleared cookies, then made some more test submissions.
So I would expect to get two contacts with all the submissions merged in to those two contacts.
Some of the users who would submit this form will be signed in to the site so clearing cookies won’t be viable. Also this would disrupt any user tracking.
Surely there should be a method of submitting the form and ignoring the cookie value?
Then every submission would create a new contact.
Thanks,
Neil
Hi, @neil_armadillo.
Apologies. I misunderstood the issue and forgot that you had already disabled cookie tracking for your forms. With cookies disabled entirely, we would indeed expect each submission to create a new contact.
I ran a few more tests on this non-HubSpot form without clearing my browser’s cookies. Each submission produced a new contact record:
I then submitted the Call Back Form in the sidebar a few times and each submission also yielded a new contact:
Hi @IsaacTakushi
I have just tested this more.
The contacts are still being updated instead of new created entries.
See this contact. Originally created on 15th march, and then updated again today.
The update status even shows as
“2 properties were updated due to a matching cookie”
Using the same browser as before, the cookie remained and was still valid, so naturally the contact would update.
Do you know of a way to omit the cookie on submission?
Thanks,
Neil
Hi, @neil_armadillo.
You can prevent cookies from being collected by disabling Cookie tracking on the form. You have already done that here, so additional submissions — even if they are from the same browser with the same valid cookie — should not update the same record.
I have run several more tests and each submission creates a new contact record (as it should), so I currently can’t explain the behavior you’re seeing.
I think the best next step would be for you to call HubSpot support so that one of my colleagues can verify the steps you are taking over a screenshare. If there is anything out of the ordinary, I will work with them to identify the issue.
The good news is that since I cannot reproduce the issue, the majority of your visitors should not be having issues either. The only odd behavior we’ve seen is from your own browser.
Hi, @neil_armadillo.
I see that you connected with my support colleague Luke.
To recap, Luke and I were able to confirm that non-HubSpot forms always pass cookies to HubSpot and that this setting cannot be disabled.
Even though you copied the Drupal form in HubSpot to create this form, which you then hooked up to your Drupal form with the v2 Forms API, the HubSpot tracking code is still collecting submissions on your Drupal form. Thus, contacts are effectively submitting two forms when they submit your Drupal form.
Additionally, both the Drupal form and this HubSpot copy are passing cookies. We already discussed that the non-HubSpot Drupal form will always pass cookies, but you are also passing cookies through this Forms API endpoint. Even though you have cookie tracking disabled in this form’s settings, it doesn’t matter if you’re still passing cookies through the API — HubSpot will accept a cookie if you send it through the API.
Considering all this, if you want each submission to create a new contact record on that page, you must either:
- Remove the Drupal form from your site and replace it with an embedded version of this form (with cookie tracking disabled).
- Custom code a form and send submissions to this endpoint without
hutk values.
If you continue to use the Drupal form, however, multiple submissions from the same browser will continue to overwrite one contact record.
Please let me know if you have specific questions relating to cookie tracking with your forms. If you have different questions about your forms, please create a new post so that we can keep these discussions separate.