Pulling visit history for all contacts and visitors



Hello API Team,

We have a need to get Hubspot data out to do ad-hoc analysis.
I sent the same question to our CSM and was advised that this is the best place to get our questions answered.

Basically, we are looking into the field hs_analytics_last_url in the response on Contact API to construct the full visit history.

Here are our questions

  1. We are trying to pull the entire browsing history for each contact to do data analysis via Contact API. However, what we are seeing a glitch in API response and the data in Hubspot console.

For example, there is a contact at https://app.hubspot.com/contacts/443262/contact/25021/?interaction=note shows a history of reading a page on Jan 2016.

However, when we make a GET contact API at https://api.hubapi.com/contacts/v1/contact/vid/25021/profile?hapikey= for the same contact and then examine the response, we see that the field hs_analytics_last_url does not contain the entire history. The earliest history is February 26, 2016.

So our question is How would we pull the complete visit history for a contact via API?

  1. We also want to perform the same analysis for other visitors - who haven't left contact details like email yet. I see that we can get the data based on user_token

Our question is can we get all user_tokens ever since and then we can pull their corresponding browsing history?



Hi @an_at_tinypulse,

Currently, the property history for the 'Last page seen' property is the only 'timline' of visit info that you can pull from HubSpot. It's not necessarily a perfect reflection of every website visit, but it's generally pretty accurate. That said, there isn't any other way to pull a single contact's website visits like that. I can totally see the use case for that, though; If you have the inclination, I would encourage you to check out the Ideas Forum on the HubSpot Community. There, you can create a post including your use case that product and other customers can see.