Skip to Content
EventsAuto Tracking

Auto Tracking Concepts

Ucoder Insight’s Auto-Tracking Engine is designed to capture the most important user interactions without you needing to write extra code.

Here is a detailed breakdown of what each tracking module actually does and why it matters.


1. Page View Tracking

Config: trackPageViews

What is a Page View?

A “Page View” is counted whenever a user visits a specific URL on your website. It is the most fundamental metric to understand your traffic volume.

How we handle SPAs (Single Page Apps): In modern frameworks like Next.js or React, the page doesn’t actually reload when you switch routes. Standard analytics tools often miss this.

Ucoder Insight automatically listens to your browser’s History API (pushState) to detect these “virtual” navigations, ensuring your view counts are accurate even in complex apps.


2. Click Tracking

Config: trackClicks

What is Click Tracking?

Click tracking helps you measure user intent. It tells you which buttons, links, or features users are actually interacting with.

Smart Filtering: We don’t track random clicks on blank spaces. Our engine specifically looks for interactive elements:

  • <button> tags (e.g., “Sign Up”, “Buy Now”)
  • <a> links (Navigation)
  • Elements with role="button"

3. Scroll Depth Tracking

Config: trackScroll

What is Scroll Depth?

Page views tell you who visited, but Scroll Depth tells you if they actually read. This metric tracks how far down a page a user has scrolled.

Use Cases:

  • Blogs: Did users read the full article or drop off after the intro?
  • Landing Pages: Are users seeing your pricing section at the bottom?

We capture events at 25%, 50%, 75%, and 90% of the page height.


4. Error Tracking

Config: trackErrors

Why track Errors?

JavaScript errors can break your site silently. Error tracking acts as a “Black Box” recorder, capturing crashes that happen on your user’s device so you can fix them.

What we capture:

  • Broken features (e.g., “Add to Cart” button not working).
  • Failed API calls (Network errors).
  • Missing images or assets.

5. Performance (Web Vitals)

Config: trackPerformance

What are Core Web Vitals?

These are speed metrics defined by Google that directly impact your SEO ranking and User Experience.

Key Metrics:

  1. LCP (Largest Contentful Paint): How long it takes for the main content to load.
  2. FID (First Input Delay): How responsive the site is when clicked.
  3. CLS (Cumulative Layout Shift): Does the layout jump around unexpectedly?

Enabling Performance tracking helps you identify if your site is slow for specific users (e.g., mobile users on 3G networks).

Last updated on