Untitled

mail@pastecode.io avatar
unknown
kotlin
2 years ago
853 B
12
Indexable
Never
private fun initVWO() {
        val currentTime = System.currentTimeMillis()
        VWO.with(context, BuildConfig.VWO_API_KEY).launch(object : VWOStatusListener {
            override fun onVWOLoaded() {
                val loadTime = System.currentTimeMillis() - currentTime
                VWOHelper.logTechEvent(pageName = "", eventCategory = Constants.LOAD_TIME, eventAction = com.airtel.analytics.constants.Constants.EventAction.vwo.value, cta = loadTime.toString())
            }

            override fun onVWOLoadFailure(error: String?) {
                VWOHelper.logTechEvent(pageName = "", eventCategory = VWOHelper.Keys.LOAD_FAILURE, eventAction = com.airtel.analytics.constants.Constants.EventAction.vwo.value, cta = null)
            }
        })
        if (BuildConfig.DEBUG) {
            VWOLog.setLogLevel(VWOLog.ALL)
        }
    }