In your HubSpot account, navigate to Reports > Analytics Tools. Then, select Events.
In the events dashboard, click Create event in the upper right.
In the right pane, enter an Event name, and select Tags (optional) to easily find and keep track of your event. Select Custom event as the Event type, then click Next at the bottom right.
Custom events can be set up in two ways:
By default, value will be set to null. This is an optional argument that can be used to track the revenue of an event. This value will be used to increment the
hs_analytics_revenue property if the event is associated with a contact record.
HTTP API Events
First, click Save at the bottom right to create your event. You'll be returned to the events dashboard. Hover over the event and click More > Edit, then click Next at the bottom right. Here, you'll see the ID that has been generated for the event. You can now use this ID to trigger your custom HubSpot event using an HTTP GET call.
When creating a HTTP API event, a URL will be automatically generated containing the following required parameters:
- _n - the Event_ID of the event you're recording
- _a - your HubSpot ID
In order to successfully connect a triggered HTTP API Event to a contact record in HubSpot, you need to pass the contact’s email address, &email, in the request URL. If a contact record does not yet exist for this email address, a new record will be created. Otherwise, the event will be attributed to the existing contact.
Learn more about using the Events HTTP API and adding additional optional parameters.
Other uses for custom events
Tracking Logins to External Site
If you have a login-only section of your external website, you may wish to find out which users are actively logging in. You can use custom events to send this information to HubSpot. Upon login, the event can be triggered and sent to HubSpot. Once saved to the contact's record, you'll be able to segment and create lists based on recent logins filtered by specific time frames, the total number of times the event has been completed, and so on.
Browser and Mobile Usage
You can use custom events to determine which browsers your visitors are most likely to be using and how often they are visiting from a mobile device.
Abandoned Shopping Cart
B2C companies regularly run into the issue of their visitors walking away from their online shopping carts. Whether it's due to a lack of interest or just a brief distraction, sending a gentle reminder can make a difference. If you set up a custom event to trigger once the visitor has calculated shipping, you can then segment contacts using HubSpot lists to see all contacts who have the triggered the event but have not actually purchased.
Custom event limits
Once over the limit, if a new event is created, it will be added to the Needs approval queue. Users can approve or dismiss an event as needed by clicking the Needs approval tab, then selecting Approve or Dismiss next the custom event name. Events can only be approved if you haven't exceeded the 2,000 event limit. Completions won't be counted for events while they are in the approval queue.
To recover previously deleted custom events, click the Dismissed events tab. If there is an event listed there you want to restore, click Recover next to the event name.