domainUserID with custom cookie

Hello, I was wondering if a custom cookie can be used to replace domainUserID as part of the sp cookie.

We already have a cookie tracking anonymous users.

You could use your own identifier with setUserId and that would populate user_id in the warehouse.

The tracker would still create the same _sp cookie however, as we also use that same cookie to perform sessionisation client side. Disabling that cookie altogether would remove session information.

I’d suggest capturing both the Snowplow domain_userid and your custom user_id. It might feel redundant but a good point of comparison and a sense check things are working as you’d expect.

1 Like

Thanks Paul,
I think I’ll just add my own cookie value as a globalContext.

1 Like