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.

Use the web analytics API to fetch events associated with CRM records of any type. This includes standard events, such as website page views and email opens, as well as custom behavioral events.

For example, use this API to view a timeline of the interactions that a contact has had with your content. You can then use this timeline to build a dataset for custom analytics or present a contact timeline in an external application.

Query individual event completions

This API returns events for one CRM record at a time. You can select the record by specifying the objectType and including either the objectId or objectProperty query parameter.

Select by object ID

To specify a record by its ID, add the objectId query parameter. For example, to specify a contact record with the ID of 2832, you would make the following GET request: 

/events/v3/events/?objectType=contact&objectId=224834

Select by object property

To specify a record by a unique property instead of contact ID, add the objectProperty parameter. Reference the property by including the property name and the value in the following format:

objectProperty.{propname}={propvalue}

For example, to specify a contact by their email address, you would make the following GET request: 

/events/v3/events/?objectType=contact&objectProperty.email=user12@dev.com

Event types

When querying for the events associated with a given CRM object, the response will include all event types, including custom behavioral events. During the beta, some standard event types are subject to change.

To only return custom behavioral event completions, you can include an eventType parameter, followed by the custom behavioral event name. For example:

/events/v3/events/eventType={EVENT_NAME}&objectType=contact&objectId=224834



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.