Skip to Content

How to Integrate HubSpot with Usermaven

Connecting HubSpot to Usermaven gives you a complete, unified view of your customer lifecycle. By combining your CRM data with deep product analytics, behavioral tracking, and advanced attribution, you can finally see the entire journey from anonymous visitor to paying customer and beyond.

This guide provides the complete, recommended approach for integrating HubSpot to achieve full-funnel analytics.

Why use Usermaven and HubSpot together?

HubSpot is your system of record for customer relationships—managing contacts, pipelines, and marketing campaigns. Usermaven is your system of intelligence for customer behavior—capturing every step of the user journey and attributing conversions with far more detail than HubSpot alone.

By integrating both, you unlock powerful new capabilities:

  • Unify CRM records with product and website behavior: See exactly what a user did before and after they became a contact.
  • Eliminate blind spots: Track the entire journey—from the first anonymous visit to a closed deal and ongoing product engagement.
  • Attribute revenue with precision: Understand which marketing campaigns, website pages, and in-product actions truly drive revenue.
  • Build smarter segments: Create highly specific user segments in Usermaven based on both CRM properties and behavioral data for deeper analysis.

How Usermaven attribution goes beyond HubSpot

FeatureHubSpotUsermaven (with HubSpot Integration)
Anonymous TrackingLimitedYes (Full, detailed visitor timeline pre-signup)
Product Usage TrackingNo / Very LimitedYes (Codeless tracking of all user & feature events)
Attribution ModelsBasic (First/Last Touch)Advanced (Multi-touch, custom models)
Cross-Device JourneyPartialYes (Seamless stitching across devices)
Funnels & JourneysBasicAdvanced (Flexible, retroactive, multi-stage)

Before you connect: A pre-integration checklist

To ensure a smooth and successful integration, please review these best practices before you begin.

  • Review your HubSpot contact data:
    • Ensure key contacts have valid email addresses, as Usermaven uses email as the primary key for matching.
    • Assign a primary contact to all important deals. This is crucial for correctly linking deal events to user profiles.
  • Prepare the Usermaven tracking script:
    • You will need to install the Usermaven script on all marketing sites and within your web app/product. This is essential for full-journey tracking.
  • Inform your team:
    • Let your marketing, sales, and product teams know about the integration so they understand how to use the newly enriched data.

Step-by-step setup guide

This process outlines the complete, recommended approach for a full-funnel integration.

Step 1: Connect HubSpot to Usermaven

  1. In your Usermaven workspace, navigate to Workspace Settings → Integrations.

  2. Find HubSpot in the list and click to begin the connection process.

  3. You will be redirected to HubSpot. Authorize access to your account to allow Usermaven to read your CRM data.

Once authorized, Usermaven will begin its first data sync. Note that Usermaven pulls data from HubSpot every three hours, so it may take some time for your data to appear initially.

Step 2: Install the Usermaven tracking script

If you haven’t already, install the Usermaven tracking script across your digital properties. This script is responsible for tracking anonymous visitors and all website/app behavior.

  • You can find your unique tracking script under Workspace Settings → Setup.
  • For detailed instructions, refer to our installation guide.

Step 3: Implement identity stitching (critical step)

This is the most important step for unifying your data. “Identity stitching” is the process of linking a user’s anonymous browsing history to their permanent user profile when they sign up or log in.

There are two methods to achieve this.

This is the cleanest and most robust method.

  1. The Usermaven script, installed on your site, tracks all anonymous visitor activity.
  2. When a user signs up or logs in, make a single usermaven('id', { ... }) call from your frontend code.
  3. Our script automatically handles the stitching of their anonymous history to their known user profile.

Example id call:

usermaven('id', { id: 'USER_12345', // Your internal database ID for the user email: 'sara.doe@example.com', created_at: '2023-01-15T09:30:00Z', first_name: 'Sara', last_name: 'Doe', });

For detailed instructions, refer to our guide on identifying your users.

Method 2: Use server-side identification

This method is an alternative if you must identify users from your backend. In this flow, you must capture the anonymous_id from the browser and send it to your backend to be used in your first Usermaven identify call.

Step A: Get the anonymous_id on the frontend: Use this helper function on your website to retrieve the ID and send it to your server during signup.

function getUsermavenAnonymousId() { const cookie = document.cookie.split('; ').find((c) => c.startsWith('__eventn_id_')); return cookie ? cookie.split('=')[1] : null; } // When a user signs up, get the ID and send it to your server const anonId = getUsermavenAnonymousId(); // fetch('/api/signup', { body: JSON.stringify({..., anonymous_id: anonId }) });

Step B: Use the anonymous_id in your first backend identify call: When you make your first identify call to Usermaven from your server for this new user, you must include the anonymous_id you received from the frontend. This tells Usermaven to merge the two profiles.

For detailed server-side examples, please refer to our full identity resolution guide.


How to verify the integration is working

Follow these steps to ensure data is flowing correctly and the user journey is unified.

  1. Open your website in a new incognito browser window. This ensures you have a fresh anonymous session.
  2. Browse a few pages on your site. If possible, use a marketing link with UTM parameters (e.g., ?utm_source=google).
  3. Sign up for a new account, triggering your identify call.
  4. In your HubSpot account, create a new deal and associate it with the contact for the email you just used.
  5. Wait for a Usermaven sync cycle to complete (up to 3 hours).
  6. Check the user’s profile in Usermaven:
    • Go to the Contacts Hub and find the user you just created.
    • Open their profile and view their Activity Timeline.
    • You should see a single, unified timeline containing all events in the correct order:
      • The anonymous Page Viewed events from your browsing.
      • The identify event at the moment of signup.
      • HubSpot-derived events like deal_stage_... appearing after the sync.
    • Check the Properties tab to confirm that marketing properties (like utm_source) and HubSpot properties (like hubspot_contact_id) are present.

If the timeline is complete and all properties are present, your integration is working perfectly.


Common questions and troubleshooting

  • Will Usermaven change my HubSpot data?
    No, the integration is read-only. Usermaven only reads data from HubSpot for analytics purposes—your CRM records will never be altered.

  • Why don’t I see my new HubSpot contacts or deals in Usermaven?
    Remember that the data sync runs every three hours. Please wait for at least one sync before checking for new data.

  • Why is marketing attribution data (UTMs) not connected to my users?
    This indicates an identity stitching problem. It means the anonymous journey (where the UTMs were captured) was not successfully linked to the user profile at signup. Please review Step 3 and our Identity Resolution guide carefully.

  • Why are deals appearing in reports but not linked to any users?
    This almost always means the deal in HubSpot does not have a primary contact associated with it, or the associated contact does not have an email address. Ensure every deal has a primary contact with a valid email.


Next steps

Now that your integration is active, you can begin to unlock powerful insights:

Last updated on