Skip to main content

Adding Tag to Widgets

This documentation will guide you in tracking your views.

To display In-App Nudges or In-Line Widgets (such as Banners or Stories) in your app, you need to track views. By doing so, you can dynamically control the content of these elements directly from Nudge's Dashboard.

info

All tags accross your app should be unique

import { useNudgeTracker } from "nudge_react_native_v2";

This method takes two parameters:

  1. pageName: Name of the page in your navigation stack where the widget is being used
  2. label: A unique label for your widget
<Text ref={useNudgeTracker("pageName", "globally_unique_label")}>
Some Text
</Text>;