Web Analytics

Access and test APIs in beta. 

Please note: This API is currently under development and is subject to change based on testing and feedback. By using these endpoints you agree to adhere to our Developer TermsDeveloper BetaTerms. You also acknowledge and understand the risk associated with testing an unstable API. 


Returns a collection of events matching a query

The Web Analytics endpoint allows developers to find and filter events associated with a CRM object of any type. These events form a timeline of the interactions the selected object has had within the HubSpot system. Objects and events can be of any type including HubSpot native types, app-specific types, or portal specific types.

Common uses for this API

  • Build dataset for custom low-level analysis
  • Present contact timeline in an external UI

Object selection

This API returns events for a single CRM object at a time -- selection of a single object is required. In the future we may relax this restriction, returning events for multiple target objects in a single request.

The desired object can be selected by specifying the objectType and using either the objectId or objectProperty query parameter.

Selecting by Object Id

When the exact objectId is known, the object is selected using the objectType and objectId query parameters. If multiple objectId or objectType parameters are provided, only the first are used. For example:


In these examples, ?objectType=contact&objectId=2832 will select HubSpot contact 2832 from the currently authorized portal. 

Selecting by Object Property

When object properties are required to make a selection, the objectType and objectProperty prefixed parameters are used to make the selection. The events API allows the use of any properties which can uniquely identify the object. There generally will be very few to none such properties available. A particular property to match on is identified by an objectProperty.{propname}={propvalue} query parameter. For example, to find contacts by their email property:


Event type selection and filters

All event types are returned. At present only e_visited_page and e_submitted_form types are available. 

Was this page helpful? *
This form is for feedback on our developer docs. If you have feedback on the HubSpot product, please share it in our Idea Forum instead.