Apr 20, 20208:15 AM - edited Apr 20, 20208:27 AM
Member
Passing the hubspot tracking cookie with form api
SOLVE
Nevermind... Looks like I read it wrong. there was an error in my field just like the error said "htuk" is indeed not a valid attribute it needs to be "hutk".
It works now. Thank you for your time to respond Matthew.
Apr 20, 20208:15 AM - edited Apr 20, 20208:27 AM
Member
Passing the hubspot tracking cookie with form api
SOLVE
Nevermind... Looks like I read it wrong. there was an error in my field just like the error said "htuk" is indeed not a valid attribute it needs to be "hutk".
It works now. Thank you for your time to respond Matthew.
Can you confirm, that you're actually capturing and pushing the hutk value rather than just adding this code? This code is not complete but is rather used as a template of how data should be submitted.
In this case, we show how the request payload should be structured when using this endpoint. You will still need to design the functionality to handle the hutk cookie and pass it in this payload.
To assist, you'll need something that functions similar to this code:
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
This is a simple script to retrieve a cookie value (cname). You'll need to create something similar to handle the hutk value, once returned, you'll need to ensure it is passed in the request payload.