APIs & Integrations

FlavienL
Participant

How to track user's login on our web app

SOLVE

Hello,

 

We have been developing a platform from scratch for a year now. We are in the process of setting up a CRM and we have chosen Hubspot.

When a user registers on the platform, our API creates a user in our own database and then in Hubspot and then retrieves the ID of the contact to insert it in our database.

 

So, we'd like to set up some pretty fine tracking and we'd like to track user connections so that the date of the last connection to our platform is in Hubspot. Is there any way to do this via the API ?

 

Thanks!

 

0 Upvotes
1 Accepted solution
Phil_Vallender
Solution
Most Valuable Member | Diamond Partner
Most Valuable Member | Diamond Partner

How to track user's login on our web app

SOLVE

Hi @FlavienL 

 

You will probably want to use the HubSpot tracking API to programatically create page views and other events. See information here: Tracking code API overview 

 

You might also want to pass the time of last login etc to custom contact properties using the update contact API. 

 

Also, when creating a contact in HubSpot for the first time, it is often advisable to use the form submit API instead of the create contact API as it allows you to pass the HubSpot cookie to the contact record and get a richer, more accurate analytical history. 


Hope this helps.

Phil Vallender | HubSpot Website Agency

View solution in original post

2 Replies 2
Phil_Vallender
Solution
Most Valuable Member | Diamond Partner
Most Valuable Member | Diamond Partner

How to track user's login on our web app

SOLVE

Hi @FlavienL 

 

You will probably want to use the HubSpot tracking API to programatically create page views and other events. See information here: Tracking code API overview 

 

You might also want to pass the time of last login etc to custom contact properties using the update contact API. 

 

Also, when creating a contact in HubSpot for the first time, it is often advisable to use the form submit API instead of the create contact API as it allows you to pass the HubSpot cookie to the contact record and get a richer, more accurate analytical history. 


Hope this helps.

Phil Vallender | HubSpot Website Agency
FlavienL
Participant

How to track user's login on our web app

SOLVE

Thank you for your answer and your speed, I will look at that !