BAndrei
1
Hello. I am trying to identify the visitors of my website using the following code:
_hsq.push([“identify”,{
email: “bati@www.com”,
id: ‘batiasdasdasdas’,
firstname: “12345”,
lastname: “asdasdasda”,
twitterhandle: ‘batinasvlad’,
}]);
_hsq.push([‘trackPageView’]);
Here is the request:
I can see that the contact is created, but the firstname, lastname, twitterhandle are not set. Am I doing smth wrong?
evaldas
2
Hi @BAndrei,
Maybe it does not like the mixed single and double quotes?
I tried the following code and it successfully creates contacts in HubSpot and records the name, email, twitterhandle:
<script>
var _hsq = window._hsq = window._hsq || [];
_hsq.push(["identify",{
email: 'batikati@test.com',
firstname: 'testfirstname',
lastname: 'testlastname',
id: '1111111',
twitterhandle: 'batibati'
}]);
_hsq.push(['trackPageView']);
</script>
BAndrei
3
Thanks for your answer. Still now working for me.
Do I have to change something at the settings of my workspace?
evaldas
4
Can you provide more context on how you are trying to use this and what will be triggering it?