Contact tracking problem

contacts

#1

Our team is having issues with implementing HubSpot forms through API. The problem is that we're seeing only 30% of contacts in HubSpot compared to database.

We're sending data from our existing trial forms on www.humanity.com to our HubSpot via ajax as described in knowledge base: https://developers.hubspot.com/docs/methods/forms/submit_form_ajax

We’re sending our form via post/ajax at this endpoint:
https://api.hsforms.com/submissions/v3/integration/submit/2848684/383db800-5faa-41c9-9fe2-25fee4d25b29

We’re sending ‘hutk’ cookie value in ‘context’ attribute.
Serialized, of course.

Here's the code snippet we're using:

// Prepare hubspot data
var hutk = getCookie('hubspotutk'),
pageUrl = window.location.href.split('?')[0],
pageTitle = $(document).attr('title'),
pageTitle = $(document).attr('title'),
userIP = $(".form-inline").data('ip'),
hubspot_data = {
"fields": [
{
"name": "firstname",
"value": name
},
{
"name": "email",
"value": email
}
],
"context": {
"hutk": hutk,
"pageUri": pageUrl,
"ipAddress": userIP,
"pageName": pageTitle,
"sfdcCampaignId": "7010e000000mZf8AAE"
},
"skipValidation": true
};

      // Send data to Hubspot
    $.ajax({
      type: "POST",
      url: 'https://api.hsforms.com/submissions/v3/integration/submit/2848684/383db800-5faa-41c9-9fe2-25fee4d25b29',
      cache: false,
      contentType: false,
      processData: false,
      headers: {
           'Content-Type':'application/json'
       },

     	data: JSON.stringify(hubspot_data),

      success: function(data) {
         console.log(data);

      },
      error:function(e){
         console.log(e);
      }
    });

#3

Hi @vbestic,

To clarify, is the issue that 70% of submissions fail to create contacts in HubSpot, that contacts created in HubSpot lack browsing history information, or both?

I submitted the trial form on your homepage a few minutes ago, using the name "HubSpot Developer Test 1." Do you see the submission in your database? What response did you receive from the Forms API? Per this article, please specify the errorType returned.


#4

@Isaac_Takushi - It's both. Out of all contacts info that we do receive, most of them are classified as "offline sources" and its source is Salesforce. We don't have any browsing information for those marked as salesforce source.

Also, we're seeing a strange spikes in offline sources contacts as seen in the screenshot: https://cl.ly/3b16564a34ba

I haven't seen "HubSpot developer test 1" in our HubSpot contacts.

--

I will followup when I sync with the team on whether that contact is in our database and also on errorType received.


#5

@Isaac_Takushi, we do see your test contact in the database but not on HubSpot.

During our testing, we didn't see any errors with the API but still not getting contacts in HubSpot


#6

Hi @vbestic,

To confirm, are you saying your team found the POST request for my test contact to this endpoint and received a 200 response? If so, could you share:

  1. Your Hub ID.
  2. The full URL request used in the case of my test contact.
  3. The raw request body, including any headers.
  4. The full response you received from HubSpot, whether it was an error or a 200.

#7

Yes,


#8

@Isaac_Takushi - we have recently found out that those people who weren't added as contacts can be found in cpompanies by searching company name they've entered in the signup process.

How does HubSpot create companies & contacts? Why 27% end up as contacts and rest as companies (without any contacts associated).