Automatic tracking is enabled by default and tracks every activity and fragment automatically, if not specified differently in Global Configuration. Automatic tracking uses the class name of the activity / fragment to generate the corresponding content ID (page name).
It is possible to stop automatic tracking for specific screens only
Method
Annotation | Description |
---|---|
@StopTrack | Disables automatic tracking for specific screens. |
TrackPageDetail( val contextName: String = "", val trackingParams: Array<TrackParams> = [] ) | When automatic tracking is enabled, you can use this function to add parameters to a screen/page (to add further information to a specific screen). If you leave the contextName empty, the SDK will take the name of the activity for naming the screen/page in Intelligence. If you fill the contextName with a value, the given value will be taken instead.
|
If you have autotracking enabled, you can still track events and page parameters.
Examples
@TrackPageDetail
@TrackPageDetail( contextName = "Main Page", trackingParams = [TrackParams(Param.INTERNAL_SEARCH, paramVal = "search term")] ) class MainActivity : AppCompatActivity() { }
@TrackPageDetail( contextName = "Main Page", trackingParams = {@TrackParams(paramKey = "is", paramVal = "new search")} ) public class MainActivity extends AppCompatActivity() { }
@StopTrack
@StopTrack class MainActivity : AppCompatActivity() { }
@StopTrack public class MainActivity extends AppCompatActivity() { }