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

AnnotationDescription
@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.

(warning) This function only works for native applications written in Kotlin, and with static values for native applications written in Java.

(warning) Please use this function instead  of the trackCustomPage() function (see Manual Tracking) when using the SDK in native applications. Otherwise you will track the same screen/page multiple times, which will disfigure your analyses.

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() {
}
In Java, you must include the actual key that is to be sent to Intelligence (e.g. "cp1" if you want to send the value of "custom page parameter 1" to Intelligence.

@StopTrack

@StopTrack
class MainActivity : AppCompatActivity() {
}
@StopTrack
public class MainActivity extends AppCompatActivity() {
}