# setTrackingEnabled

suspend fun setTrackingEnabled(enabled: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html))

Turns tracking on or off at runtime and persists the decision for this install. `false` purges anything still queued, which can discard purchase events not yet sent; `true` cannot lift a build shipping `trackingEnabled(false)`. Identity survives — see [resetAnonymousId](/developers/references/android/id-frak-sdk/frakclient/resetanonymousid/).