Adobe Analytics data – Reports API v2.0 & Python
Adobe Analytics v2.0 API offers quite a lot of functionality. Adobe has made huge steps over the last few years in documenting and rebuilding its APIs. The majority of the information can be found at https://github.com/AdobeDocs/analytics-2.0-apis. One of the most useful ones is the Reports API for downloading analytics reports data. This can be utilized in automated Python (or other programming languages) data pipelines and/or ad-hoc analysis in setups outside of Analysis Workspace.
However, the API exposed currently is not – for lack of a better word – very well structured and programming-friendly. The major drawback is that it was built with the intent of serving Analysis Workspace. This means that it requires a specific JSON data structure that defines the report to be requested (sample).
Depending on the number of dimensions added to the report, this can get very complicated very quickly. In order to get around that, I have created a Python package that allows to better manage multiple dimensions without the added burden of worrying about multiple breakdowns.
Python package overview
The package offers some basic high level wrappers and abstracts the complexity of “how to make data requests for multiple breakdowns”.
It relies on using a service account with developer access. To install the latest version using pip (either from PyPi or GitHub)
- PyPi: pip install analytics-mayhem-adobe
- Github: pip install git+https://github.com/konosp/adobe-analytics-reports-api-v2.0