← All resources
GuideJul 28, 202611 min read

HubSpot Custom Behavioral Events Setup: Complete Guide

Learn how to set up HubSpot custom behavioral events using code or codeless methods, plus a no-code alternative for syncing product usage data in real-time.

Quick answer: HubSpot custom behavioral events let you track user actions beyond pageviews and form fills. You can set them up with code (JavaScript tracking) or codeless (Chrome extension point-and-click), but both methods only work for website interactions. If you need to track in-app product usage, you need a different approach that syncs data from your product database to HubSpot.

  • Code-based setup - Full control, works for any JavaScript-tracked interaction, requires developer time
  • Codeless setup - Point-and-click Chrome extension, no code needed, limited to visible website elements
  • Product data sync - For SaaS teams tracking feature usage, activation, or engagement inside your app (not website behavior)

What Are HubSpot Custom Behavioral Events?

HubSpot custom behavioral events track specific user actions that standard HubSpot tracking doesn't capture automatically. Standard tracking logs pageviews, form submissions, and email clicks. Custom events let you track things like "clicked pricing calculator," "watched demo video to 50%," or "downloaded whitepaper from resource page."

These events show up on contact timelines, company records, and in HubSpot reports. You can trigger workflows off them, build segments around them, and use them in lead scoring.

You need Marketing Hub Professional or Enterprise, or Sales/Service Hub Enterprise to create custom behavioral events. Starter and lower tiers don't have this feature.

The critical limitation: HubSpot's native event tracking only works for website interactions. If you need to track what users do inside your product (feature usage, activation milestones, engagement patterns), you need a different method. We cover that gap later in this guide.

Method 1: Code-Based Custom Event Setup

Code-based events give you full control. You write JavaScript that fires when specific user actions happen, then HubSpot logs that event on the contact record.

Setting Up the Event Definition

Go to Settings > Data Management > Custom Events. Click Create custom event. Give it a name (internal, not user-facing) like pricing_calculator_interaction or demo_video_50_percent.

Add properties if you want to capture details with the event. For example, a video_title property or a calculator_result value. Properties are optional but useful for filtering later.

Implementing the Tracking Code

HubSpot's tracking code must already be installed on your site. If it's not, grab the snippet from Settings > Tracking Code and add it to your site's <head> tag.

Once tracking is live, you fire custom events with the _hsq.push method:

var _hsq = window._hsq = window._hsq || [];
_hsq.push(["trackCustomBehavioralEvent", {
 name: "pe12345_pricing_calculator_interaction",
 properties: {
 calculator_type: "annual_plan",
 estimated_cost: "249"
 }
}]);

Replace pe12345 with your HubSpot portal ID (find it in Settings > Account Defaults). The event name format is {portalId}_{eventName}.

Attach this code to the user action you want to track. For a button click:

document.getElementById('pricing-btn').addEventListener('click', function() {
 _hsq.push(["trackCustomBehavioralEvent", {
 name: "pe12345_pricing_calculator_interaction"
 }]);
});

Testing Your Implementation

Open your browser's developer console (F12). Navigate to the page with the tracked element. Trigger the action (click the button, play the video). Check the Network tab for a request to track.hubspot.com with your event name in the payload.

Then go to the contact record in HubSpot (find yourself by email if you're cookied). Check the Activity timeline for the custom event. It should appear within a few minutes.

Common issues: tracking code not installed, event name typo, portal ID mismatch, ad blockers interfering. Double-check the spelling and portal ID first.

Method 2: Codeless Event Setup with Event Visualizer

If you don't have developer resources, HubSpot's codeless approach lets marketers set up events through a Chrome extension.

Installing the Event Visualizer Extension

Download the HubSpot Event Visualizer from the Chrome Web Store. Once installed, go to Settings > Data Management > Custom Events > Create custom event. Select the "Codeless" option.

HubSpot will prompt you to open the extension and navigate to the page where the event should fire.

Creating Events Visually

Click the extension icon. HubSpot highlights clickable elements on your page. Click the button, link, or element you want to track. Name the event. Save it.

HubSpot automatically generates the tracking code and deploys it. No developer needed.

Limitations: you can only track visible elements on pages where HubSpot's tracking code is already installed. You can't track interactions inside iframes, third-party widgets, or elements that appear conditionally. And like code-based events, this only works for website behavior, not in-app product usage.

Use this method for simple tracking (CTA clicks, resource downloads, video plays on marketing pages). For complex interactions or product usage, you need a different approach.

The Gap: What About Product Usage Events?

Here's where HubSpot's native custom events hit a wall: they only track website behavior. If you run a SaaS product and need to know when users hit activation milestones, adopt features, or cross usage thresholds inside your app, custom behavioral events don't help.

Product usage data lives in your product database or analytics tool (Mixpanel, Amplitude, PostHog), not on your website. HubSpot's tracking code doesn't run inside your application.

For PLG companies, this is the data that matters most. You need to know which free users are actually using the product, which features they've adopted, when they hit trial limits, or when engagement drops. Sales teams need these signals to prioritize outreach. Marketing needs them to score leads accurately.

The traditional workaround: build a custom integration using HubSpot's Custom Behavioral Events API, set up a reverse ETL pipeline from a data warehouse, or write one-off scripts that push product data to HubSpot. All three require engineering time, ongoing maintenance, and usually a data warehouse. Most RevOps teams get stuck waiting for engineering to prioritize it.

If you're syncing product usage data to HubSpot, you need a method built for product data, not website tracking.

No-Code Alternative: Syncing Product Data to HubSpot in Real-Time

For SaaS teams, the actual behavioral events you care about happen in your product. Zoody connects your product database directly to HubSpot and syncs usage events to contact and company records in real time. No data warehouse, no reverse ETL, no custom API integration.

How Product Data Sync Works

You define the product events and properties you want to track (feature adoption, activation milestones, usage counts, last active date). Zoody reads them from your product database or receives them via webhook, then pushes them to HubSpot as contact properties or timeline events.

This lets you track product usage in HubSpot the same way you track website behavior, except the data comes from your app instead of your marketing site.

Example: you want to track when a free user creates their first project, invites a team member, or crosses 10 API calls. Those events fire in your product. Zoody syncs them to HubSpot. They show up on the contact timeline. You can trigger workflows off them ("user hit activation, assign to sales") or use them in lead scoring.

When to Choose This Approach

Use product data sync when:

  • You need product usage events on HubSpot contact records
  • You want to score or segment users based on in-app behavior
  • Sales needs to see feature adoption or engagement signals
  • You're running PLG and need to route product-qualified leads
  • You don't have engineering bandwidth for a custom integration

Use HubSpot's native custom events when you're tracking website interactions (button clicks, resource downloads, pricing page visits) and don't need product data.

The two methods complement each other. Native events track top-of-funnel website behavior. Product data sync tracks in-app usage. Together they give you the full picture.

Using Custom Behavioral Events in HubSpot

Once events are flowing (whether from website tracking or product data sync), here's how to use them:

Workflows: Create a workflow triggered by a specific event. Example: when demo_video_watched fires, enroll the contact in a nurture sequence. Or when feature_x_adopted fires, assign to sales.

Lead scoring: Add points when high-intent events happen. Pricing page visit = +10 points. Product activation = +50 points. Build your score from a mix of website and product signals.

Segmentation: Create lists filtered by event completion. "Contacts who triggered free_trial_started in the last 7 days and have not triggered team_invite_sent" becomes a re-engagement target.

Reporting: Use custom event reports to track adoption funnels, feature usage, or content engagement. Visualize how many users hit each milestone in your activation flow.

Sales alerts: Set up a Slack notification or email alert when a high-value contact triggers a buying signal event.

Naming convention matters. Use a consistent format: category_action_object like product_activated_feature or content_downloaded_whitepaper. This keeps your event list organized as it grows.

FAQ

What's the difference between code-based and codeless custom events in HubSpot?

Code-based events require JavaScript implementation and give you full control over what gets tracked and when. Codeless events use a Chrome extension to point-and-click on website elements, no code required. Code-based works for any interaction you can detect with JavaScript. Codeless only works for visible clickable elements on pages where HubSpot tracking is already installed.

Can I track product usage events with HubSpot's native custom event tools?

No. HubSpot's custom behavioral events only track website interactions where the HubSpot tracking code runs. They don't capture in-app product usage, feature adoption, or engagement signals from your SaaS application. For product data, you need to sync events from your product database or analytics tool using an integration, API, or tool like Zoody.

Do I need a developer to set up custom behavioral events in HubSpot?

Not always. HubSpot's codeless event setup lets marketers create events by clicking elements on a webpage using a Chrome extension. This works for simple tracking like button clicks or link interactions. For more complex tracking (conditional logic, dynamic elements, product usage), you need either JavaScript code or a product data sync tool.

How do I sync product usage data from my app to HubSpot contacts?

You can build a custom integration using HubSpot's API, set up a reverse ETL pipeline from a data warehouse, or use a no-code tool like Zoody that connects your product database directly to HubSpot. The no-code approach eliminates engineering work and syncs events in real time without requiring a warehouse.

What HubSpot subscription tier do I need to use custom behavioral events?

You need Marketing Hub Professional or Enterprise, or Sales/Service Hub Enterprise. Custom behavioral events are not available on Starter, Basic, or free HubSpot tiers. Check Settings > Data Management to confirm your account has access to the Custom Events feature.

{
 "meta_description": "Step-by-step guide to setting up HubSpot custom behavioral events with code or codeless methods, plus a no-code alternative for syncing product usage data.",
 "word_count": 1850,
 "tag": "Guide",
 "faq_schema": {
 "@context": "https://schema.org",
 "@type": "FAQPage",
 "mainEntity": [
 {
 "@type": "Question",
 "name": "What's the difference between code-based and codeless custom events in HubSpot?",
 "acceptedAnswer": {
 "@type": "Answer",
 "text": "Code-based events require JavaScript implementation and give you full control over what gets tracked and when. Codeless events use a Chrome extension to point-and-click on website elements, no code required. Code-based works for any interaction you can detect with JavaScript. Codeless only works for visible clickable elements on pages where HubSpot tracking is already installed."
 }
 },
 {
 "@type": "Question",
 "name": "Can I track product usage events with HubSpot's native custom event tools?",
 "acceptedAnswer": {
 "@type": "Answer",
 "text": "No. HubSpot's custom behavioral events only track website interactions where the HubSpot tracking code runs. They don't capture in-app product usage, feature adoption, or engagement signals from your SaaS application. For product data, you need to sync events from your product database or analytics tool using an integration, API, or tool like Zoody."
 }
 },
 {
 "@type": "Question",
 "name": "Do I need a developer to set up custom behavioral events in HubSpot?",
 "acceptedAnswer": {
 "@type": "Answer",
 "text": "Not always. HubSpot's codeless event setup lets marketers create events by clicking elements on a webpage using a Chrome extension. This works for simple tracking like button clicks or link interactions. For more complex tracking (conditional logic, dynamic elements, product usage), you need either JavaScript code or a product data sync tool."
 }
 },
 {
 "@type": "Question",
 "name": "How do I sync product usage data from my app to HubSpot contacts?",
 "acceptedAnswer": {
 "@type": "Answer",
 "text": "You can build a custom integration using HubSpot's API, set up a reverse ETL pipeline from a data warehouse, or use a no-code tool like Zoody that connects your product database directly to HubSpot. The no-code approach eliminates engineering work and syncs events in real time without requiring a warehouse."
 }
 },
 {
 "@type": "Question",
 "name": "What HubSpot subscription tier do I need to use custom behavioral events?",
 "acceptedAnswer": {
 "@type": "Answer",
 "text": "You need Marketing Hub Professional or Enterprise, or Sales/Service Hub Enterprise. Custom behavioral events are not available on Starter, Basic, or free HubSpot tiers. Check Settings > Data Management to confirm your account has access to the Custom Events feature."
 }
 }
 ]
 },
 "howto_schema": {
 "@context": "https://schema.org",
 "@type": "HowTo",

Compare alternatives

Explore use cases

Try it on your own HubSpot

Zoody is in beta, so every feature is free right now. Connect your HubSpot, put real product signals on your records, and work directly with the founder.

More resources