Screen View Tracking

Prerequisites

The screen_view event is supported only in NotifyVisitors Android Native SDK v5.5.2 or later. To enable screen view tracking, ensure that your app is integrated with SDK version 5.5.2 or above, as earlier versions do not capture this event.

Introduction

NotifyVisitors allows you to track screen view events in your Android app, helping you understand how users navigate across different parts of your application. With this data, you can analyze engagement, identify drop-offs, and optimize user flows.

Screen tracking can be done in two ways:

  1. Automatic Tracking (recommended)
  2. Manual Tracking

Automatic Tracking (Recommended)

Once the NotifyVisitors Android SDK is integrated and initialized, the SDK automatically logs screen views whenever a user transitions between Activities or Fragments.

  • No additional code changes are required.
  • Each screen transition automatically generates a screen_view event that captures:
    • Screen name
    • App version
    • Other contextual information (device, session, user identifiers, etc.)

This ensures you get a complete picture of user journeys across your app without extra development effort.

Manual Tracking

In some cases, you may want more control over screen tracking, especially when:

  • Your app uses custom navigation frameworks.
  • You want to track specific sub-views within a single Activity or Fragment.
  • You want to override the automatically logged screen name with a custom identifier.

To manually track a screen, call the trackScreen() method:

// Import SDK
import com.notifyvisitors.notifyvisitors.NotifyVisitorsApi;

// Track screen manually
NotifyVisitorsApi.getInstance(this).trackScreen("Checkout Screen");

Parameters

  • "Checkout Screen" → A unique identifier (String) for the screen.
    • Use clear, consistent names for screens (e.g., "HomeScreen""ProductDetails""CartScreen""PaymentConfirmation").
    • This naming consistency ensures reports are meaningful.

Triggering Logic

Every time trackScreen() is called (automatically or manually), NotifyVisitors records a screen_view event with the following details:

  • Screen name (current screen)
  • App version (useful for tracking differences across releases)
  • User and session context (device, OS, session ID, user ID if available)

This event becomes part of the user journey timeline inside NotifyVisitors, allowing for:

  • Funnel analysis (e.g., where users drop off in a purchase flow).
  • Behavioral segmentation (e.g., users who frequently view a “Loan Calculator” screen).
  • Targeted in-app messaging (e.g., showing offers when a user lands on the “Insurance Plans” screen).

Example

Imagine a banking app where a user is exploring different loan options:

NotifyVisitorsApi.getInstance(this).trackScreen("Loan Options Screen");
NotifyVisitorsApi.getInstance(this).trackScreen("EMI Calculator");
NotifyVisitorsApi.getInstance(this).trackScreen("Application Form");

  • Loan Options Screen → User browses available loans.
  • EMI Calculator → User engages with a financial calculator.
  • Application Form → User starts the application process.

By analyzing these screen_view events, you can identify:

  • How many users explore loan options but drop off before applying.
  • Which calculators/screens drive the highest engagement.
  • Opportunities to place contextual nudges (e.g., reminders on the calculator screen).

Best Practice:

Use automatic tracking wherever possible, and supplement it with manual tracking for custom views or specific business-critical screens.