Tracker

class Tracker(emitter: Emitter, val namespace: String, var appId: String, context: Context, builder: (Tracker) -> Unit? = null)

Builds a Tracker object which is used to send events to a Snowplow Collector.

Parameters

emitter

Emitter to which events will be sent

namespace

Identifier for the Tracker instance

appId

Application ID

context

The Android application context

builder

A closure to set Tracker configuration

Constructors

Link copied to clipboard
fun Tracker(emitter: Emitter, namespace: String, appId: String, context: Context, builder: (Tracker) -> Unit? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
Link copied to clipboard
fun close()
Link copied to clipboard

Disable GDPR context.

Link copied to clipboard
fun enableGdprContext(basisForProcessing: Basis, documentId: String?, documentVersion: String?, documentDescription: String?)

Enables GDPR context to be sent with every event.

Link copied to clipboard
Link copied to clipboard

Stops event collection and ends all concurrent processes.

Link copied to clipboard

Ends session checking.

Link copied to clipboard
fun removeStateMachine(identifier: String)
Link copied to clipboard

Starts event collection processes again.

Link copied to clipboard

Starts session checking.

Link copied to clipboard

Convenience function for starting a new session.

Link copied to clipboard
fun track(event: Event): UUID?

Handles tracking the different types of events that the Tracker can encounter.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Internal use only

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var gdprContext: Gdpr? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var screenContext: Boolean = false

Internal use only

Link copied to clipboard
Link copied to clipboard
var session: Session? = null
Link copied to clipboard

This configuration option is not published in the TrackerConfiguration class. Create a Tracker directly, not via the Snowplow interface, to configure sessionCallbacks.

Link copied to clipboard

Whether the session context should be sent with events

Link copied to clipboard
var subject: Subject? = null
Link copied to clipboard

This configuration option is not published in the TrackerConfiguration class. Create a Tracker directly, not via the Snowplow interface, to configure threadCount.

Link copied to clipboard

This configuration option is not published in the TrackerConfiguration class. Create a Tracker directly, not via the Snowplow interface, to configure timeUnit.

Link copied to clipboard

Internal use only. Decorate the tv (tracker version) field in the tracker protocol.

Link copied to clipboard

Internal use only