APIs & Integrations

AlexS2
Member

Submitting forms api for specific vid of contact?

SOLVE

We have contacts both with and without email addresses. We'd like to associate analytics cookies with all contacts and it seems like the only way to do that currently is via the forms api. But it seems like email is the only documented way to submit the forms api for an existing contact?

 

Is there a way to instead provide the specific contact vid to the submit forms apis in lieu of having an email address? I tried several variations on property names "vid" but couldn't find the right incantation if it's possible.

 

If not is there some other way to associate an analytics cookie with a non-email contact?

0 Upvotes
1 Accepted solution
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Submitting forms api for specific vid of contact?

SOLVE

Hey @AlexS2 ,

 

There are technically 3 distinct ways that analytics information (specifically, a hubspotutk value) can be associated with a HubSpot contact:

  1. Form submission
  2. Email click tracking
  3. "Identify" function

I'll try to breifly address these here; this won't be a comprehensive technical review, but it should give you (and anyone else interested) an overview of how these three methods function, and which you might find most useful.

 

Before we dive in, there's one important thing that ties all these mechanisms together: Each mechanism takes a hubspotutk value and an email address, and ties one or both to a new or existing contact record. This is how the association actually works: An email address is used as the unique identifier for a contact record, and the hubspotutk value is tied to that record. This mean that the direct answer to your question is that it is not possible to associate a hubspotutk value with a non-email contact. 

 

  1. Form Submission
    1. As you mention above, a form submission can associate a hubspotutk value with a contact record. This is true for both native/embeded HubSpot forms, and submissions sent via the Forms API. A form submission can accept both emails (in the form fields) and hubspotutk values (in the metadata). A  form submission with a new hubspotutk value and without an email will not associate analytics information with an existing contact record.
  2. Email identity tracking
    1. When the recipient of a HubSpot marketing email clicks on an email link, a number of query parameters are appended to the link URL. When this recipient arrives on the page (which has the HubSpot tracking code embeded), the tracking code uses these parameters to infer the recipient's email address & associate the corresponding contact with the hubspotutk value in the browser. This method requires a marketing email to be sent to the recipient; therefore this method only works with contacts that have email addresses.
  3. Identify function
    1. The Identify method of the Tracking Code API accepts an obect including (at least) an email address. The function takes this email address & the hubspotutk value in the browser, and (in tandem with a trackEvent or trackPageView call) passes this info to HubSpot to make an association. The Identify method requires an email address, and does not accept contact vids.

View solution in original post

2 Replies 2
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Submitting forms api for specific vid of contact?

SOLVE

Hey @AlexS2 ,

 

There are technically 3 distinct ways that analytics information (specifically, a hubspotutk value) can be associated with a HubSpot contact:

  1. Form submission
  2. Email click tracking
  3. "Identify" function

I'll try to breifly address these here; this won't be a comprehensive technical review, but it should give you (and anyone else interested) an overview of how these three methods function, and which you might find most useful.

 

Before we dive in, there's one important thing that ties all these mechanisms together: Each mechanism takes a hubspotutk value and an email address, and ties one or both to a new or existing contact record. This is how the association actually works: An email address is used as the unique identifier for a contact record, and the hubspotutk value is tied to that record. This mean that the direct answer to your question is that it is not possible to associate a hubspotutk value with a non-email contact. 

 

  1. Form Submission
    1. As you mention above, a form submission can associate a hubspotutk value with a contact record. This is true for both native/embeded HubSpot forms, and submissions sent via the Forms API. A form submission can accept both emails (in the form fields) and hubspotutk values (in the metadata). A  form submission with a new hubspotutk value and without an email will not associate analytics information with an existing contact record.
  2. Email identity tracking
    1. When the recipient of a HubSpot marketing email clicks on an email link, a number of query parameters are appended to the link URL. When this recipient arrives on the page (which has the HubSpot tracking code embeded), the tracking code uses these parameters to infer the recipient's email address & associate the corresponding contact with the hubspotutk value in the browser. This method requires a marketing email to be sent to the recipient; therefore this method only works with contacts that have email addresses.
  3. Identify function
    1. The Identify method of the Tracking Code API accepts an obect including (at least) an email address. The function takes this email address & the hubspotutk value in the browser, and (in tandem with a trackEvent or trackPageView call) passes this info to HubSpot to make an association. The Identify method requires an email address, and does not accept contact vids.
AlexS2
Member

Submitting forms api for specific vid of contact?

SOLVE

Hi Derek, thanks for confirming. That's unfortunate but glad we can stop looking 🙂