Track Screens
3 min
you can call this code in every screen we are definining the screen name in this code such as "home screen" the list is positioning that you need to pass only for widgets (no other campaigns), in order to showcase multiple widgets in one screen you can create placeholders for multiple widgets and name the positioning from here which can then be called from the appstorys dashboard you can always pass placeholders and leave them as blank when campaigns are activated for that placeholder, only then will the widget show appstorys getscreencampaigns("home screen", listof("widget top", "widget center", "widget bottom")) //sample data example code for "home screen" without calling widget positioning, incase widgets are not a part of your appstorys dashboard" appstorys getscreencampaigns("home screen", listof()) //sample data in order to capture the screens, you need to call appstorys overlay elements you can refer to for jetpack compose or for xml note when calling getscreencampaigns() inside an activity or fragment for xml views, if the screen capture fails you can use binding \<youroverlayviewid> setactivity(this) // in an activity // or binding \<youroverlayviewid> setactivity(requireactivity()) // in a fragment to track elements, you need to pass a custom modifer as below for every element you need to define on appstorys only for jetpack compose in xml, it will auto identify all the elements from the screen appstorys("id")