# Events API, Web Analytics Custom filters

**URL:** <https://community.hubspot.com/t/events-api-web-analytics-custom-filters/64702>\
**Category:** APIs & Integrations\
**Tags:** companies, events, professional, contacts\
**Created:** [September 8, 2022, 2:11pm UTC](https://community.hubspot.com/t/events-api-web-analytics-custom-filters/64702 "2022-09-08T14:11:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PPauloTavares](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@PPauloTavares](https://community.hubspot.com/u/PPauloTavares)\
**Post date:** [September 8, 2022, 2:11pm UTC](https://community.hubspot.com/t/events-api-web-analytics-custom-filters/64702/1 "2022-09-08T14:11:06Z")

</div>

I need to create a view, inside salesforce, that has “page view” information for all the contacts in the company.

We can see this information inside Salesforce using the “Hub Spot Contact Intelligence”, with is a visualforce component from a installed Hubspot extension, but only in the contact level, and it is mixed with some other informations, i need it to be an exclusive view, at Company leve.

The problem is that this information it is not saved inside salesforce therefore i cant manipulate it to make my exclusive view.

I was able to identify one API service that provides the information I need, but it is still at the contat level, and only available to be used with single records.

In this scenario I would need to do N calls per company, to be able to get what I need from all the contacts, and this number is multiplied by the number of companies.

so if I ahve a total of 100 companyes, with 5 contacts in avarege per company, it would need 500 calls to be able to see it at the company level, with is not ideal.

This is the Web analytics API documentation link, when consulting it for a single contact, all the information I need is the name of the page, date and time of the visit, and page title. [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/events/web-analytics)

This is still in beta but would solve my problem if possible to be called with custom filters (like company ID) or in bulk (using multiple contact emails)

what I have now is this:

[https://api.hubapi.com/events/v3/events?objectType=contact&eventType=e\_visited\_page&objectProperty.email=fake@eletronic.mail](https://api.hubapi.com/events/v3/events?objectType=contact&eventType=e_visited_page&objectProperty.email=fake@eletronic.mail)

Thanks in advance, for taking the time to help me.

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [September 9, 2022, 3:47pm UTC](https://community.hubspot.com/t/events-api-web-analytics-custom-filters/64702/2 "2022-09-09T15:47:33Z")

</div>

Hi, @PPauloTavares 👋 Hey @coldrickjack [@klloyd\_\_1](https://community.hubspot.com/t5/user/viewprofilepage/user-id/381293) @tjoyce have you tackled anything like what @PPauloTavares? For either of their requests?

Thank you very much for taking a look! — Jaycee

---

<div class="post-metadata">

**Author:** ![klloyd\_1](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/klloyd_1/32/28881_2.png) [@klloyd\_1](https://community.hubspot.com/u/klloyd_1)\
**Post date:** [September 12, 2022, 5:52pm UTC](https://community.hubspot.com/t/events-api-web-analytics-custom-filters/64702/3 "2022-09-12T17:52:56Z")

</div>

Thanks for the tag, [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074)!

@PPauloTavares, everything you’ve identified with the APIs is accurate for the time being. You’ll need to hit that endpoint per contact. [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074), I would also love to see Page Analytics rolled up and attributable to the Company that Contacts are associated with so that you could get these metrics on a per-company basis rather than per-contact. I think this would result in something similar to the old Competitors tool. If there’s not already a community post on this, I’ll happily spin one up 😊

For now, @PPauloTavares, you’ll want to [use the CRM Search API to return all the contacts associated with a company/companies](https://developers.hubspot.com/docs/api/crm/search#search-through-associations) and then hit that analytics endpoint per contact to return their page views. To your point, this would result in a call per contact and would be 500 in the example you provided.
