track().screens

The track().screens() method automatically records screen views on your mobile app. It automatically uses the activity stack as the path and the activity name as the title.

Syntax

TrackHelper.track() .screens(getApplication()) .with(getTracker());
TrackHelper.track() .screens(getApplication()) .with(tracker)

Examples

To automatically record screen views:

Tracker tracker = ((PiwikApplication) getApplication()).getTracker(); TrackHelper.track() .screens(getApplication()) .with(tracker);
val tracker: Tracker = (application as PiwikApplication).tracker TrackHelper.track() .screens(getApplication()) .with(tracker)

Related methods


Did this page help you?