Track Screens
2 min
to log user interactions and screen impressions across your app, register each screen with appstorys when it appears this ensures appstorys knows which screen the user is on so it can show the right campaigns and record screen level analytics swiftui attach the trackappstorysscreen( ) modifier inside the body of every screen you want to track trackappstorysscreen("your screen name") uikit call the trackappstorysscreen( ) helper inside viewdidappear( ) on every view controller you want to track place the call after super viewdidappear(animated) so the screen is fully on screen when the sdk queries eligible campaigns override func viewdidappear( animated bool) { super viewdidappear(animated) trackappstorysscreen("your screen name") }