Identify user using id rather than email


I would like to be able to use the javascript api to identify a user without having to insecurely start spreading their email around. I’ve already stored the user id from my system in hubspot, but when I try sending:

$(function () {
    var _hsq = window._hsq = window._hsq || [];
        "identify", {

it doesn’t actually associate the record despite both sides having that same information. Is there any way to associate the users using identify without using email (I don’t want user emails floating around the dom for security reasons.)

I do have the existing contacts vid and I only want to associate existing contacts, so if there’s a way to do it using the vid that works too.


Bumping this up to the top


Do you have an internal property in hubspot called user_id? Also where is pulling from? Another option you could use is the utk. you can grab this from the cookie on their browser.