CustomerGlu Developer Documentation
  • 🔧Getting started
  • 🔧Quickstart Guide for React Web Apps
  • 📱Quickstart Guide for React Native Apps
  • 📱Quickstart Guide for Flutter Apps
  • Integrating with SDKs
    • Web SDK
    • Mobile SDKs
      • How to Test Integration?
    • Cordova SDK
    • Shopify
  • Integrating with APIs
    • Register User/Device
    • Load Campaigns
    • Binding Webview to Native App Functions
    • 🔍Using __GLU_NUDGE_CLICK for Widget Visibility
    • 🎯API-based Segmentation Quickstart Guide
  • 🔌Third-Party Integrations
    • Source
      • Sending Events directly from Server
      • Segment
      • Moengage
      • Amplitude
      • Clevertap
      • Webengage
    • Destination
      • Analytics Webhook
      • Customer.io
      • Talon.One
      • Segment
      • MoEngage
      • Amplitude
      • Clevertap
      • WebEngage
      • Google Sheets
    • Cohort
      • Mixpanel
  • Miscellaneous Topics
    • Direct Campaign/Wallet URLs
    • Configuring Webhooks
      • Rewards Webhook
      • Nudge Webhook
    • Notifications
      • FCM
      • APNs
      • CustomerGlu Notification
      • Testing Nudges
    • Referral Campaigns
      • Firebase
      • Branch
    • Handling Non Logged-in Users
    • Testing Campaigns with User Logs
    • Using the Editor
      • How to edit Buttons in Campaigns
    • How to Create and Manage Segments in CustomerGlu
  • SCHEMA REPOSITORY
    • Webhook Schema
      • Reward Webhook Schema
      • Nudge Webhook Schema
      • Raw Event Webhook Schema
    • Webview Callback Schema
      • Analytics Event Schema
    • Analytics schema V4
      • Page Events
      • Track Events (UI)
      • Track Events (SDK)
      • State-Change Events
      • System Events
    • 🗝️FAQ
      • API Key
      • How to find and add Screen Names for Entrypoints
  • Demo Apps
    • Demo Apps
Powered by GitBook
On this page
  • Find Screen Name in App Code
  • Add Screen Names to dashboard

Was this helpful?

  1. SCHEMA REPOSITORY
  2. FAQ

How to find and add Screen Names for Entrypoints

PreviousFAQNextDemo Apps

Last updated 11 months ago

Was this helpful?

Check where you are using the below methods and verify the screen names. We will add the screen names that can be configured for the app in the dashboard in the next steps

Find Screen Name in App Code

Check in your code where you are using the below method and verify the screen names. We will add the screen names that we can configure for app in dashboard in next steps.

The given function should be used on every Activity's onResume Method

@Override
protected void onResume() {
    super.onResume();
    customerGlu.showEntryPoint(MainActivity.this,"screenName");
} 

The given function should be used on each ViewController's viewWillAppear() method:

override func viewWillAppear(_ animated: Bool) {
    super.viewDidLoad()
    customerGlu.setCurrentClassName(className: String(describing: type(of: self)))
}

The given code should be added on every Activity:

@override 
Widget build(BuildContext context) { 
return CGScreenDetector(
 classname: "screenName",
  child: Scaffold( 
  body: Container( 
  width: MediaQuery.of(context).size.width, 
  decoration: BoxDecoration(color: Colors.white), 
  child: Text("My Widget");
      ),
     )
    );
   }
  

For Android:

The given function should be used in MainActivity , inside the onResume method to support adding the floating button/popup entry points on the activity via the dashboard:

@Override
protected void onResume() {
    super.onResume();
        CGUtils.setActivity(this);
} 

The given function should be used on every Activity's useFocusEffect() Method :

import { SetCurrentClassName } from '@customerglu/react-native-customerglu';
import { useFocusEffect, useRoute } from "@react-navigation/native";
const route = useRoute();
    useFocusEffect(
        React.useCallback(() => {
            SetCurrentClassName(route.name);
        }, [navigation])
    );
   

Add Screen Names to dashboard

  • Open the CustomerGlu dashboard

  • Go to Nudges section and create a new nudge

  • In the Trigger Criteria Section , add the screen name in the Allowed Screen field.

    • If screen name exists then select the screen name

    • If not then you can Add Custom Screen name that is configured on app code

  • Enter the Screen Name and click on SAVE. Screen Name will be added in list.

  • Select the newly added screen name and launch a nudge.

Make sure Screen Name present in app needs to be same in dashboard

🗝️