---
title: Track push notifications - Android
description: Learn how to track mobile notification interactions automatically with Contentsquare
lastUpdated: 09 October 2025
source_url:
  html: https://docs.contentsquare.com/en/csq-sdk-android/product-analytics/track-push-notifications/
  md: https://docs.contentsquare.com/en/csq-sdk-android/product-analytics/track-push-notifications/index.md
---

After completing the setup process you will be able to:

* Automatically track interactions on your mobile notifications
* Define and analyze notification interaction events in Contentsquare

## Installing Notification Autocapture

Notification autocapture is included in the CSQ SDK.

You only need to install the Heap Gradle Plugin using version 1.1.0 or later:

* Kotlin

  ```kotlin
  plugins {
    // ...


    id("io.heap.gradle") version "1.1.0"
  }
  ```

* Groovy

  ```groovy
  plugins {
    // ...


    id 'io.heap.gradle' version '1.1.0'
  }
  ```

## Initializing Notification Autocapture

Notification autocapture can be initialized with `enablePushNotificationAutocapture: true` in `CSQ.configureProductAnalytics()`.

* Kotlin

  ```kotlin
  CSQ.configureProductAnalytics(
    context = this,
    envId = "YOUR_ENVIRONMENT_ID",
    options = ProductAnalyticsOptions(
      enablePushNotificationAutocapture = true
    )
  )
  ```

* Java

  ```java
  ProductAnalyticsOptions options = new ProductAnalyticsOptions.Builder()
    .enablePushNotificationAutocapture(true)
    .build();


  CSQ.configureProductAnalytics(this, "YOUR_ENVIRONMENT_ID", options);
  ```

Capture the title or body text of the notification where an interaction was performed using `enablePushNotificationTitleAutocapture` and `enablePushNotificationBodyAutocapture`.

* Kotlin

  ```kotlin
  CSQ.configureProductAnalytics(
    context = this,
    envId = "YOUR_ENVIRONMENT_ID",
    options = ProductAnalyticsOptions(
      enablePushNotificationAutocapture = true,
      enablePushNotificationTitleAutocapture = true
      enablePushNotificationBodyAutocapture = true
    )
  )
  ```

* Java

  ```java
  ProductAnalyticsOptions options = new ProductAnalyticsOptions.Builder()
    .enablePushNotificationAutocapture(true)
    .enablePushNotificationTitleAutocapture(true)
    .enablePushNotificationBodyAutocapture(true)
    .build();


  CSQ.configureProductAnalytics(this, "YOUR_ENVIRONMENT_ID", options);
  ```

Once registered, Contentsquare will begin collecting interaction events on notifications.

## What's Next?

With notification data flowing, you'll want to jump into Product Analytics and start defining notification interaction events. These events will show up as a special "Notification Interaction" event type in Product Analytics and have several properties available to create definitions:

* **Notification Title**: The title text of the notification. Capture can be enabled/disabled via a config option as described above.
* **Notification Body**: The body text of the notification. Capture can be enabled/disabled via a config option as described above.
* **Notification Action**: The text of the notification action that was interacted with, if any.
* **Notification Source**: What caused the notification to fire. This could be a push service, a geofence, or unknown.
* **Notification Handling Component**: The name of the component in code that handled the notification interaction.
* **Notification Category**: This is the notification channel that the notification was delivered to. This typically denotes the type of notification that with which the interaction occurred.
