In order to activate the App Analytics API, please follow these steps:
1. Locate your Package IDs
You will need the Metadata Package IDs of the packages that you want to enable - they will always be in the format '033xxxxxxxxxxxx'.
Login to your License Management Organizatino (LMO). This is the organziation where your License Management App (LMA) is installed. Head to the custom LMA object "Packages" and locate your package in the list. On the Package Detail page you can find the id in the field "Package ID".
If you cannot find the Package object, ensure that you have the necessary permissions. If you cannot locate the Package ID field, ensure that it has been added to the Package page layout.
For 2nd generation packages, you can also get the necessary package IDs by running the following sfdx command in your terminal:
sfdx force:package:list --verbose
2. Log a case in the Partner Community
Please refer to the official Salesforce step-by-step guide: