If you need an API key for use with the Analytics REST API, you should create a new API key with the analytics ACL. You can do this from within your Algolia Dashboard here: https://www.algolia.com/account/api-keys/restricted
When creating the API key, you can specify the analytics ACL as shown:
More details of how you can use this key can be found here: https://www.algolia.com/doc/rest-api/analytics/