PageTracker

Tracks a page's lifecycle and generates Pageview and PageviewEngagementAggregrate events automatically. A PageTracker is also an EventTracker, tracking events against this object will associate those events with this page.

Calling close signals that viewing the page has completed.

Functions

Link copied to clipboard
abstract override fun close()
Link copied to clipboard
abstract fun pause()

Call when the page is no longer being viewed, but may be resumed. This may be when your Activity/Fragment has Stopped or Paused.

Link copied to clipboard
abstract fun resume()

Call when the page is being viewed. This may be when your Activity/Fragment has Started or Resumed.

Link copied to clipboard
abstract fun track(eventName: String)

Tracks an event with no properties.

abstract fun track(eventName: String, properties: EventProperties?)

Tracks an event with optional properties.

Link copied to clipboard
abstract fun updatePercentageViewed(percentage: Float)

Updates the percentage of the page that has been viewed by the user.