Which API to Identify a User?

I’m working on integrating analytics and the chat bot on our app, which has authenticated users. I’m unclear on what’s the “correct” way to identify to the logged in user for the sake of both analytics and the chat window. Should I be calling the identify event via the Tracking Code API, or using the Visitor Identification API, or both? TIA for any help!

@himanshurauthan , do you have advice for @kgoggin ?

Hi @kgoggin,

It depends more on your use case, so if you are using a chatbot on your app, even if the user is logged in identified user, all the chat will be shown as Unknown visitor in the conversation inbox, and by Using the Visitor Identification API, you can pass authenticated visitor information directly to the chat widget, which identifies them in the Conversations inbox.

On the other hand, the Tracking Code API allows you to dynamically create events and track event data in HubSpot

Hope this helps (don’t forget to mark it as a solution).

Regards,

Thanks @himanshurauthan. So, if I’m using _both_ the chat bot and the tracking API, it sounds like I need to identify my users using _both_ APIs. That’s the way I’ve got it set up right now and it seems to be doing okay. Just wanted to make sure I wasn’t over-complicating things. Thanks!