curl --request POST \
--url https://js.hs-scripts.com/identify \
--header 'Content-Type: application/javascript' \
--data @- <<EOF
"_hsq.push(['identify', { email: 'visitor@example.com', firstname: 'John', lastname: 'Doe' }]);"
EOFIdentify a visitor by email address. This ties the visitor’s usertoken to their email address, allowing HubSpot to update an existing contact record or create a new one.
curl --request POST \
--url https://js.hs-scripts.com/identify \
--header 'Content-Type: application/javascript' \
--data @- <<EOF
"_hsq.push(['identify', { email: 'visitor@example.com', firstname: 'John', lastname: 'Doe' }]);"
EOFidentify method when you know the identity (i.e. the email address) of the person viewing the page. Using a placeholder email for unknown visitors will create a contact record with that placeholder email.var _hsq = (window._hsq = window._hsq || []);
_hsq.push([
"identify",
{
email: "visitor@example.com",
firstname: "John",
lastname: "Doe",
},
]);
identify function only sets the identities in the trackertrackPageView or trackEvent callWas this page helpful?