Web Analytics Pages Visited

Good afternoon

I’ve been pointed to this API to get pages visited:

https://api.hubapi.com/events/v3/events?objectType=contact&objectId=999&eventType=e_visited_page

But this only returns pages visited by a single contact, e.g.

{
“results”: [
{
“objectType”: “CONTACT”,
“objectId”: “999”,
“eventType”: “e_visited_page”,
“occurredAt”: “2023-08-17T21:01:12.665Z”,
“id”: “leviathan-99c999c9-999-9a99-b9b9-e9d9999999ef”,
“properties”: {
“hs_base_url”: “www.example.com/savings”,
“hs_browser”: “Chrome Mobile”,
“hs_country”: “gb”,
“hs_device_type”: “Smartphone”,
“hs_operating_system”: “Android”,
“hs_page_title”: “Savings”,
“hs_title”: “Savings”,
“hs_url”: “https://www.example.com/savings”,
“hs_url_domain”: “example.com”,
“hs_url_path”: “/savings”,
“hs_user_agent”: “Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36”
}
}
]
}

Does anyone know if there is similar API call that will return pages visited before/after a specific date/time?

Many thanks

Peter

Yes @PEvans0

You can use the occuredAfter and occuredBefore parameters in your query, with a timestamp.

Full details here: Accounts Dashboard | HubSpot

Have fun

Mike

Here to learn more about HubSpot and share my HubSpot Knowledge. I’m the founder of Webalite a HubSpot Partner Agency based in Wellington, New Zealand and the founder of Portal-iQ the world’s first automated HubSpot Portal Audit that helps you work smarter with HubSpot.

Hi Mike

I should have looked at the documentation more closely, as it does say “This API returns events for one CRM record at a time.”

I was hoping that there would be a way to return pages views for all contacts for a specific time period, but it appear this isn’t available.

It looks like I’ll have to loop through the updated contacts to get this instead.

Kind regards

Peter