Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Enable App Analytics on Your Second-Generation Managed Package

Activate AgentExchange App Analytics on your second-generation (2GP) managed package to access AgentExchange App Analytics package usage logs and subscriber snapshots. Package usage summaries are available by default.
Available in: Enterprise, Performance, Unlimited, and Developer Editions.

User Permissions Needed
To access packages and package versions: Read on Packages, Package Versions
To request and retrieve AgentExchange App Analytics data: Create, Read, Edit, Delete, View All, and Modify All on the AppAnalyticsQueryRequest object

To ensure that you’re running the latest version of Salesforce CLI and its plug-ins, run sf update and sf plugins update.

  1. Activate App Analytics on your managed 2GP package. sf package update --package "Your Package Alias" --enable-app-analytics

    To deactivate App Analytics on your managed 2GP package, run this CLI command. sf package update --package "Your Package Alias" --no-enable-app-analytics

  2. For any additional package that you want App Analytics data for, repeat step 1.