Track Screens & Elements
3 min
before creating campaigns you need to first capture the app screens by calling (make sure to call this above all the other screen elements) appstorys capturescreen('screen name', context), this will capture the screen, which you can then select from the dashboard to create the campaigns the trackscreen function allows the sdk to monitor user navigation within your app by logging each screen view screen tracking enables accurate data collection for analytics and campaign purposes note call the trackscreen functionality on every page where you want to integrate appstorys elements we will auto discover the screen names and display it on the dashboard for your integration to use, call trackscreen whenever a new screen is displayed appstorys trackscreen( 'screen name', context, screen attributes, \['position list widget']); parameter \ screen name a case sensitive name representing the screen this name should match the names provided to appstorys during integration \ screen attributes a custom key value data to identify dynamic screens \ position list widget a case sensitive list of strings representing the positions of the widgets, so that multiple widgets can be identified and displayed these screens will then show on appstorys dashboard where you can then create campaigns according to the screens it’s recommended to call this function each time a screen comes into focus, ensuring that every screen transition is logged tracking individual elements on each screen to enable tooltip, coachmark, or spotlight campaigns on your app screens, each ui element must be uniquely identifiable assign a key to every element you want to track by using the valuekey property for example container( key valuekey("exampleelement"), child text("click me"), ) adding valuekey("exampleelement") ensures that the system can accurately locate and target this element within the dashboard when running campaigns