APIs & Integrations

DelioTolivia
Member

Cookie in data submit to a form in PHP

SOLVE

I have a PHP page where I send data to a hubspot form. It works fine but in hubspot I see a notice:

 

"La cookie necesaria para enlazar los envíos de formularios a los contactos existentes no se está enviando. Deberás solicitar a tu desarrollador que actualice la integración de este formulario."

 

I translate it to english:

 

"The cookie needed to link form submissions to existing contacts is not being sent. You will need to ask your developer to update the integration of this form."

 

But I cannot find any info on how to update this. 

 

The code that I use for the cookie is:

 

$hubspotutk = $_COOKIE['hubspotutk']; //grab the cookie from the visitors browser.
 

 

0 Upvotes
1 Accepted solution
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Cookie in data submit to a form in PHP

SOLVE

Hi!

I see that you are using my code that I shared in a different post (I recognize the comment in the code).
The code uses the V2 version of the forms API, which is replaced with the v3 version, but V2 is still functioning, so you can use this code, just a heads up.

Regarding your issue, is the hubspotutk cookie set when the PHP function is called? (You can check this in the browser). If it is, check if your PHP file can read the cookie by using the print_r function or check if it can read any cookies by using print_r($_COOKIE);

Could you post the results?



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

0 Upvotes
1 Reply 1
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Cookie in data submit to a form in PHP

SOLVE

Hi!

I see that you are using my code that I shared in a different post (I recognize the comment in the code).
The code uses the V2 version of the forms API, which is replaced with the v3 version, but V2 is still functioning, so you can use this code, just a heads up.

Regarding your issue, is the hubspotutk cookie set when the PHP function is called? (You can check this in the browser). If it is, check if your PHP file can read the cookie by using the print_r function or check if it can read any cookies by using print_r($_COOKIE);

Could you post the results?



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes