Screen View Tracking

Prerequisites

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

Introduction

Screen view tracking in React Native apps helps you measure how users navigate through different screens. Since it’s not automatic, you must call the tracking method manually whenever a screen is displayed.

Manual Screen Tracking

To track a screen, call the following method in your screen component (commonly in componentDidMountuseEffect, or when the screen comes into focus).

// Import NotifyVisitors SDK
import Notifyvisitors from 'react-native-notifyvisitors';

import React, { useEffect } from 'react';
import { View, Text } from 'react-native';

const CheckoutScreen = () => {
  useEffect(() => {
    // Track screen manually
    Notifyvisitors.trackScreen("Checkout Screen");
  }, []);

  return (
    <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
      <Text>Payment Details</Text>
    </View>
  );
};

export default CheckoutScreen;

Parameters

  • "Checkout Screen" → A unique identifier for the screen.
  • Use clear, consistent names (e.g., "HomeScreen""ProductDetails""CartScreen").
  • Consistency ensures better funnel tracking and analytics.

Triggering Logic

Each time trackScreen is called, the NotifyVisitors SDK records a screen_view event that includes:

  • Screen name
  • App version
  • Device and session details
  • User identity (if logged in)

This enables you to:

  • Reconstruct complete user journeys
  • Spot drop-offs across navigation
  • Trigger contextual campaigns (e.g., nudges on specific screens)

Example: BFSI App Use Case

In a banking/insurance app, you might track:

Notifyvisitors.trackScreen("Policy List Screen");
Notifyvisitors.trackScreen("Premium Calculator");
Notifyvisitors.trackScreen("KYC Upload Screen");
Notifyvisitors.trackScreen("Payment Gateway");
Notifyvisitors.trackScreen("Policy Confirmation");

This flow lets you analyze:

  1. Users exploring policies
  2. Users calculating premiums
  3. Drop-offs at KYC upload
  4. Conversions at payment stage
  5. Final confirmations

Best Practice

Always call trackScreen at the entry point of each screen. Missing calls = incomplete journeys.