Skip to Content
Getting StartedSending your users data

Sending your users data to ‘Contacts Hub’ in Usermaven

💡
This guide is for SaaS or subscription-based businesses only.

Usermaven supports client-side tracking via the same Javascript tracking script that powers website tracking. See this article on how to include the JavaScript tracking script in your application’s frontend for tracking signed-in users.

Sending your app’s user data to ‘Contacts Hub’ in Usermaven will help you better understand how users interact with your site or app with Usermaven’s pre-built product insights reports.

If the tracking script is already installed, the next step is adding or identifying people in Usermaven.


Identify contacts (Users and Companies)

This function allows you to attach a unique identity and maintain user histories across sessions, devices, and browsers under a single profile in Usermaven.

You must call the usermaven("id") method whenever a user signs-in to your app in order to identify logged-in users and attach the actions they perform in your app to the contacts (people and companies) database in Usermaven.

Calling this function creates or updates a profile in the Contacts hub. You can pass as many different attributes about that user or company as you like. Take some time to think about the name you give to your attributes. You can name them anything you like, but it’s best to use clear, concise, and consistent names.

<script type="text/javascript"> usermaven("id", { // Required attributes id: "XXXXXXX", // Unique ID for the user as per your records. email: "user@domain.com", // Email address of the user signing-in. // Optional but strongly recommended attributes created_at: "2021-01-20T09:55:35", // Date/Time (in ISO 8601 format) when the user first signed-up. first_name: "John", last_name: "Smith", // Other optional attributes (You can name attributes whatever you want) custom: { gender: "female", fav_sports: "football" }, // If you are a B2B SaaS and your product is used by multiple users in a company, you should pass the company attributes as shown below. company: { // Required attributes id: "XXXXXXXX", // Company ID as per your records. name: "TESLA", // Company name as per your records. // Optional but strongly recommended attributes created_at: "2021-01-20T09:55:35", // Date/Time (in ISO 8601 format) when the company first signed-up. // Optional company attributes custom: { plan: "enterprise", industry: "technology" } } }); </script>

Please make sure that these calls are made after the tracking script, either by inserting them in your HTML after the script tags or by delaying their execution using the page load event.


Identity resolution and stitching

Usermaven’s identity resolution feature allows you to accurately connect user data across sessions and devices. When a user logs in or identifies themselves with sign-up, their past anonymous activity is automatically stitched together with their signed-up user profile.

This stitching process gives you a complete, uninterrupted view of the customer journey—from first touch to conversion and beyond, helping you unlock more meaningful insights.

To implement identity resolution, follow our full guide:
Read the full Identity Resolution guide →

Last updated on