# Web Analytics Pages Visited

**URL:** <https://community.hubspot.com/t/web-analytics-pages-visited/87825>\
**Category:** APIs & Integrations\
**Created:** [August 18, 2023, 4:09pm UTC](https://community.hubspot.com/t/web-analytics-pages-visited/87825 "2023-08-18T16:09:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PEvans0](https://avatars.discourse-cdn.com/v4/letter/p/db5fbb/32.png) [@PEvans0](https://community.hubspot.com/u/PEvans0)\
**Post date:** [August 18, 2023, 4:09pm UTC](https://community.hubspot.com/t/web-analytics-pages-visited/87825/1 "2023-08-18T16:09:20Z")

</div>

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](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](http://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](https://www.example.com/savings)”,  
“hs\_url\_domain”: “[example.com](http://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

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [August 18, 2023, 4:52pm UTC](https://community.hubspot.com/t/web-analytics-pages-visited/87825/2 "2023-08-18T16:52:04Z")

</div>

Yes @PEvans0

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

Full details here: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/events/web-analytics)

Have fun

Mike

Here to learn more about HubSpot and share my HubSpot Knowledge. I’m the founder of [Webalite](https://www.webalite.com?utm_campaign=community-forum&utm_source=community&utm_content=signature) a HubSpot Partner Agency based in Wellington, New Zealand and the founder of **Portal-iQ** the world’s first automated [HubSpot Portal Audit](https://portal-iq.com?utm_campaign=community-forum&utm_source=community-forum&utm_content=signature) that helps you work smarter with HubSpot.

---

<div class="post-metadata">

**Author:** ![PEvans0](https://avatars.discourse-cdn.com/v4/letter/p/db5fbb/32.png) [@PEvans0](https://community.hubspot.com/u/PEvans0)\
**Post date:** [August 21, 2023, 6:27am UTC](https://community.hubspot.com/t/web-analytics-pages-visited/87825/3 "2023-08-21T06:27:46Z")

</div>

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
