---
schema_version: "1"
id: c595a219910ae79946603ea1b888ed94219bbce505b98151b1f355a60b872be6
title: setPiAnalyticsEnabled
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud-mobilepush/engagement_sdk/references/cordova/setPiAnalyticsEnabled.md
canonical_url: https://developer.salesforce.com/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/setPiAnalyticsEnabled.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: e5733023d18a7e4d88ddaca53665d43d9c96d6dc36d6d19e1786f3496a267fd1
products:
  - Salesforce Engagement SDK
---
# setPiAnalyticsEnabled

Enables or disables Predictive Intelligence (PI) analytics in the native MobilePush SDK.

## Syntax

`MCCordovaPlugin.setPiAnalyticsEnabled(enabled, [successCallback], [errorCallback])`

## Kind

Static method of `MCCordovaPlugin`.

## Parameters

| Parameter         | Type       | Description                                              |
| ----------------- | ---------- | -------------------------------------------------------- |
| `enabled`         | `boolean`  | Whether to enable Predictive Intelligence (PI) analytics |
| `successCallback` | `function` |                                                          |
| `errorCallback`   | `function` |                                                          |
