[WEBINAR] How to Set up Usermaven to Get Accurate Insights

Track Events in Usermaven
product analytics

How to Track Events in Usermaven: A Comprehensive Guide

Mar 14, 2024
7 mins read

You know what events are and why they're useful for SaaS businesses.

But here's the next step!

Tracking events is important, but how do you do it?

If you're still deciding on the accurate tool to track events,

We've got you covered!

Today, we'll explain how Usermaven has made event tracking super easy for you.

Let's jump in. 

But before that, just a quick reminder:

Do you remember what the events are?

What are events?

Events in analytics are essentially actions or behaviors that happen when people use digital platforms like apps, emails, or websites. 

They're important because they give us insights into how users engage with these platforms. 

Tracking and analyzing events helps businesses understand user preferences, identify areas for improvement, and enhance the overall experience to keep people engaged with their products or services.

Now you know what events are and what to track events. Let’s start with tracking events with Usermaven.

Related: Event-Based Web Analytics

Why track events with Usermaven?

Here are just a few reasons why event tracking with Usermaven is a must-do:

  • Tells you everything: It shows you what buttons your users clicked and where they navigated, and it has to do with the ultimate sign-up or purchase step. Here is the event dashboard of Usermaven showing auto-captured events, pinned events, custom events, and events activity.
events
  • User engagement: It tells which elements capture user attention and which ones go unnoticed.
  • Measure campaign effectiveness: Track how users interact with your marketing campaigns and identify areas for improvement.
  • Boost conversions: Optimize your website or app to guide users toward your desired goals.
  • Personalize the user experience: You can make content and features based on user behavior.

Furthermore, obtaining real-time records of user interactions, including clicks and time spent on specific features, can significantly enhance your ability to predict customer behavior. 

By strategically planning based on user's preferences and interests, you can ultimately improve your outcomes.

How does Usermaven help with event tracking?

Usermaven offers three ways to track events:

  • Auto-capture: This captures common events automatically, like clicks, scrolls, and form submissions. It's a good starting point for basic understanding.
  • Pinned events: Pinned events are important events you choose to stay informed about.
  • Custom events: Custom events are user-defined signals in code that track specific actions or interactions.

What auto-capture can track?

Auto captured events

Usermaven captures auto-capture events through its Spotless™ tracking technology. This technology automatically captures all events on your website or app, eliminating the need for developers to manually track them. 

It records clicks, form submissions, and page visits, simplifying event definition and providing a comprehensive view of your customer's journey

What pinned events can track?

Pinned events are top actions or events to monitor, such as sign-ups or purchases. You can mark individual items or group similar items as pinned events to focus on the most important user interactions.

How to create pinned events in Usermaven

Here's a step-by-step guide on how to create pinned events in Usermaven:

1. Go to the events page

You can usually find this by logging in to Usermaven and navigating to the Analytics section. 

Usermaven screenshot

2. Choose your method for creating a pinned event.

There are two main ways to do this:

  • Pin a single event: This is useful if you want to track a specific button click or other action that has already been captured by Usermaven.
  • Group similar events: This is useful if you want to track all occurrences of a particular type of event, such as all button clicks with a certain label.

3. Follow the steps for your chosen method:

  • Pinning a single event:
  • In the auto-captured events tab, find the event you want to track (you can use the search bar to help you find it).
  • Click the pin icon next to the event.
  • Give the pinned event a descriptive name and save it.
pinning a single event
  • Grouping similar events:
  • Click the "Create Pinned Event" button (this might be located at the top right corner of the Events page).
  • Give your pinned event a name.
  • Use the query builder to define the criteria for the group of events. You can choose from various options like button text label, page URL, or element ID. You can also combine these options using AND or OR conditions to narrow down your selection.
  • Save the pinned event.
Group events

Usermaven will automatically track new elements that match your pinned event criteria, so you don't need to update the pin every time something changes.

If you're stuck or have a specific case that isn't covered by these steps, refer to Usermaven's documentation or support for further assistance.

What custom events can track?

Custom events are for more advanced users who need to track events that auto-capture can't. This could be things like events happening inside an embedded video player or on a different website.

How to create custom events?

To create custom events in Usermaven, follow these steps:

1. Install the tracking script: Ensure that Usermaven's tracking script is installed on the relevant page where you want to send custom events.

add tracking pixel code

2. Use the Usermaven("track", "EVENT_NAME") function: To track an event, use the Usermaven("track", "EVENT_NAME") function. You can choose any name you want for the event. It is recommended to give your events short and precise names, using the same letter case, such as 'snake case.'

Usermaven event track

3. Add custom data/attributes to an event: If you want to provide more details about an event, use the second argument to attach data to an event. This information will appear in the contacts view for the specified people/company. You can also use these attributes to filter stats inside the dashboard.

Add custom data

4. Track YouTube video engagement: To send a custom event for a YouTube video on your site, create a short script to add callback listeners to the video player event. Catch events for the video player progress and send them accordingly to Usermaven.

For example;


let player; 

let videoInterval;

let videoEventName = "sample-video"; 

let passedBreakpoint = 0; 

const breakpoints = [0.25, 0.5, 0.75]; 

 

 

function onYouTubeIframeAPIReady() {     

    player = new YT.Player("player", { 

        height: "360",

        width: "640", 

        videoId: "M7lc1UVf-VE", 

        events: { 

            onStateChange: onPlayerStateChange 

        } 

    });

}

 

 

let done = false;

function onPlayerStateChange(event) {

    if ( 

        !done && 

        event.data === YT.PlayerState.PLAYING &&  parseInt(player.getCurrentTime(), 10) === 0 

     ) {

        usermaven("track", `clicked-${videoEventName}`);

        videoInterval = setInterval(checkVideoState, 1000); 

     } 

 

 

     if (event.data === YT.PlayerState.ENDED) { 

         done = true; usermaven("track", `watched-${videoEventName}-100%`);

          clearInterval(videoInterval);

         }

 

 

function checkVideoState() {

    const viewedPercentage = player.getCurrentTime() / player.getDuration(); 

    breakpoints.forEach((breakpoint) => { 

        if (passedBreakpoint < breakpoint && viewedPercentage >= breakpoint) { 

            passedBreakpoint = breakpoint; usermaven("track", `watched-${videoEventName}-${breakpoint * 100}%`); 

            } 

    }); 

}

Remember, any JavaScript code added to your website must be wrapped in <script> and </script> tags.

For more advanced scenarios like tracking third-party embedded content, such as chat windows or YouTube videos, Usermaven provides a Javascript API for sending custom events

Things to keep in mind!!

  • When naming your events, it's best to keep it simple and consistent. This will make it easier for you to understand your data later.
  • If you're not comfortable adding custom code to your website, you can stick with auto-capture and pinned events. These will give you valuable insights without any coding required.

End thoughts

Hope this guide is beneficial for you to track events efficiently and reliably with Usermaven. 

Still thinking, why consider Usermaven? Here is the ultimate kicker!

Usermaven provides real-time analytics, meaning you can see events happening on your website/product live. Found amusing? Give it a try! Usermaven



You might be interested in...

product analytics

Multi-touch Attribution: What is it & how do you use it?

Today, customers rarely interact with a brand just once before purchasing. They might see a social media ad, read a blog post, and subscribe to an email list before finally converting to your website. This complex customer journey highlights the limitations of traditional Attribution models.  That's where multi-touch Attribution comes in. This powerful approach helps you understand the impact of every customer touchpoint with your brand, allowing you to optimize your marketing efforts f

Apr 26, 2024
website analytics
product analytics

Discovering user journeys with cross-domain tracking

In website analytics, cross-domain tracking allows you to trace user behavior as they visit multiple websites or domains you own.  This is essential because, without it, user journeys across various platforms become fragmented, leading to inaccurate insights. Many businesses have websites across multiple web addresses, like separate platforms for a blog, store, or community.  Understanding how users visit these various sites is crucial for creating a smooth overall experience.  Let

Apr 16, 2024
website analytics
product analytics

Understanding the importance of goal-tracking in SaaS

Do you want your SaaS business to win?   Goal tracking is like having a map. It shows you where you're going and if you're on the right track. This blog will explain why tracking goals is important for your SaaS business.  We'll show you how it can help you: Get more users to love your product! Make your product even better!! Win the game! (become a successful business) What are goals? Goals help you understand how users interact with your platform and whether they find value in it.  The

Apr 5, 2024

Ready to start with a simple yet powerful analytics platform?

Suitable for all kinds of websites and SaaS businesses. Setting up your first dashboard takes only a few minutes.

No credit card required.