---
schema_version: "1"
id: 8b2bf1dd435e1fd9d7e9473c19e0135f46baaa874c971f5effdfe7d064752e7c
title: Download Package Usage Logs, Package Usage Summaries, and Subscriber Snapshots
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform-pkg-exchange/managed_packaging/guides/second-generation/appexchange/app-analytics/app-analytics-download-mp-logs.md
canonical_url: https://developer.salesforce.com/docs/platform/pkg2-dev/guide/app-analytics-download-mp-logs.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: eaef04cf1139bb81973221dc5e8d3fa0733dbc350245fdcb864c31c5b16556a2
products:
  - Second-Generation Managed Packaging Developer Guide
  - merged-docs
---

# Download Package Usage Logs, Package Usage Summaries, and Subscriber Snapshots

To request package usage logs, monthly package usage summaries, and subscriber snapshots, use the AppAnalyticsQueryRequest object. Usage logs, usage summaries, and subscriber snapshots are downloadable comma-separated value (.csv) files.

## Before You Begin

To enable App Analytics on your second-generation (2GP) managed packages, follow these [instructions](https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/app_analytics_enable2gp.htm). To enable App Analytics on your first-generation (1GP) managed packages, follow these [instructions](https://developer.salesforce.com/docs/atlas.en-us.pkg1_dev.meta/pkg1_dev/app_analytics_enable1gp.htm).

Then determine which team members need create, read, update, and delete (CRUD) access to the AppAnalyticsQueryRequest object, and consider [creating a permission set](https://help.salesforce.com/articleView?id=perm_sets_create.htm) for them. By default, admins have the permissions required to request package usage logs and usage summaries using the AppAnalyticsQueryRequest object.

In a 24-hour period, you can download up to 20 GB of AgentExchange App Analytics data.

Package usage summary data is available to download for 10 years from the summary file log date. Package usage log data is available to download for 45 days from the date that the log event occurred. Subscriber snapshot data is available to download for 45 days from the snapshot date.

The usage data that AgentExchange App Analytics collects depends on the org type and data type.

| Data Type             | Data is Collected on...             | Data isn’t Collected on...       |
| --------------------- | ----------------------------------- | -------------------------------- |
| `PackageUsageLog`     | Production, sandbox, and trial orgs | Scratch orgs                     |
| `PackageUsageSummary` | Production orgs                     | Sandbox, scratch, and trial orgs |
| `SubscriberSnapshot`  | Production org and trial orgs       | Sandbox and scratch orgs         |

**note:** AgentExchange App Analytics is subject to certain usage restrictions as described in [AgentExchange Program Policies](https://www.salesforce.com/content/dam/web/en_us/www/documents/legal/Agreements/alliance-agreements-and-terms/salesforce-partner-program-policies.pdf).

1.  Log in to the License Management Org (LMO) that the package is registered to.

2.  From the LMO, complete the required fields in the [AppAnalyticsQueryRequest](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_appanalyticsqueryrequest.htm) object.

3.  Retrieve the App Analytics Query Request object created in the API request. The DownloadURL field populates after the request is completed.

4.  Click the URL in the DownloadURL field in the App Analytics Query Request object, and download the .csv file.

    **note:** The download URL expires after 60 minutes.
