Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Analytics Kotlin Quantcast Full Stack Plugin


Add Quantcast device-mode support to your applications using this plugin for Segment's Analytics-Kotlin(link takes you to an external page) library.


Adding the dependency

adding-the-dependency page anchor

To install the Segment-Quantcast integration, add this line to your gradle file:

implementation 'com.segment.analytics.kotlin.destinations:quantcast:<latest_version>'

Or the following for Kotlin DSL:

implementation('com.segment.analytics.kotlin.destinations:quantcast:<latest_version>')

Quantcast's library is hosted in JCenter, which is deprecated. To satisfy the Quantcast library dependency, you may have to add the following to the repositories setup in your project's gradle files:

1
repositories {
2
gradlePluginPortal()
3
}

Using the plugin in your app

using-the-plugin-in-your-app page anchor

Open the file where you set up and configure the Analytics-Kotlin library. Add this plugin to the list of imports.

import com.segment.analytics.kotlin.destinations.quantcast.QuantcastDestination

Under your Analytics-Kotlin library setup, call analytics.add(plugin = ...) to add an instance of the plugin to the Analytics timeline.

1
analytics = Analytics("<YOUR WRITE KEY>", applicationContext) {
2
this.flushAt = 3
3
this.trackApplicationLifecycleEvents = true
4
}
5
analytics.add(plugin = QuantcastDestination())

Your events will now begin to flow to Quantcast in device-mode.