How to create events for revenue reporting and other use cases

Last updated: June 13, 2016

Available For:

Product: HubSpot Marketing
Subscription: Enterprise

At first glance, it may not be apparent as to why you would want to use a JavaScript or HTTP API Event. You can do pretty much the same thing using the other Event types, right?

While you can absolutely gather important information using the standard event types, the JavaScript and HTTP API Events give you the flexibility to take it to the next level. Please keep in mind that both of these event types are for advanced users who have access to developers.

Revenue reporting with events

There are three ways to add revenue reporting to your HubSpot Events:

  • Clicked Element Events
  • JavaScript Events
  • HTTP API Events

Each time the event runs, the value associated with the triggered event will be added to the Revenue field on the contact's record. When setting up the conversion value, you can either enter a specific value or, to dynamically set the value, enter a Javascript variable or a Full jQuery selector.

Clicked element

If the element you are tracking has a monetary value associated with it, you can add this here by checking off theUse conversion value box. The value from this clicked element event will funnel into the default Revenue property under the Analytics properties group for Contacts.

This is useful for eCommerce and other B2C websites, where you want to use events to track purchases. You can also use a JS variable or selector to save a dynamic value.

HubSpot Help article screenshot

Tracking value in custom events

To track value in custom events, update the value in your JS snippet, before adding to your Javascript. You can pass value via HTTP API events as well. HubSpot will update the property hs_analytics_revenue for a contact upon event completion.

HubSpot Help article screenshot

Other Common Uses for Custom Events

Tracking Logins to External Site

If you have a login-only section of your external website, you probably are curious about who is actively logging in. You can use the 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 will be able to segment and create lists based on recent logins based on specific time frames, the total number of times the event has been completed, and so on.

Browser and Mobile Usage

Do you know if your mobile site is frequently used? Use Custom Events to determine from which browsers your visitors are most likely to be using and how often they are visting from a mobile device. Once you know this information, you can make sure your visitors are getting the best experience when visiting your site.

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 all the difference. If you set up a Custom Event to trigger once the visitor has calculated shipping, you can then segment further in HubSpot's Lists tool to see all contacts who have the triggered the event but have not actually purchased.

Was this article helpful?

Previous article:

Next article: