Track Screens
1 min
track the current screen whenever a user navigates to a new page or route screen tracking enables appstorys to display campaigns that are targeted to specific screens and ensures analytics, widgets, tooltips, and other experiences are delivered correctly call appstorys trackscreen() inside a useeffect whenever the active route changes—for example, keyed on your router's location or pathname import { useeffect } from 'react'; import { appstorys } from '@appstorys/react web'; useeffect(() => { appstorys trackscreen('home screen'); }, \[route]); // re run whenever your route changes important the screen name passed to trackscreen() must exactly match the screen name configured in the appstorys dashboard, or campaigns targeted to that screen will not be considered eligible screen tracking is all that's required to make campaigns eligible mounting the components that actually render them is covered in using sdk components, docid\ vjvwe8ihkn96el iuljgm and tagging specific elements on the page—for widget placement, tooltips, or screen capture—is covered in dom integration docid\ awwrmfej37hnsmcstkzzl