From the very start, when I started to write the python wrappers around the different APIs of Adobe, I wanted to realize the Adobe Analytics API. I started with the Adobe Analytics API 1.4 (that you can check here for article and here for github) and now I am finishing with the Analytics API 2.0. I can say that I closed the loop on this project now and I have learned so much during that period of time (1 year and half) that I am barely the same person regarding the approach for python modules.
I will probably do another blog post about that but these projects taught me so much and made me a better technical person. Not only on Python but also on JavaScript, my other language and probably as an Analytics person.
But I guess that you are not here today to read that, you are here to see how the Analytics API 2.0 has been approached and what you can expect from my wrapper. So without further delay here we are.
Analytics API 2.0 : The scope
The scope of the API wrapper has much decreased with this API. Not that I wanted to reduce it but it is just the capabilities of the API has been greatly reduce. I actually wrote an article about it here.
The API 2.0 is really focusing on reporting and the dimensions, metrics and segments retrieval. Basically reporting and everything you need for the reports. Therefore the possibility of using the Adobe Analytics 2.0 API for Data Warehouse or other type of actions is not possible.
The python wrapper will give you the opportunity to :
- Retrieve elements:
- Segments
- (Calculated) Metrics
- Date Ranges
- Dimensions
- Users
- Edit elements:
- Segments
- Delete elements:
- Segments
- Retrieve reports
If you are familiar with my 1.4 API, there is no class to help you create a statement to retrieve your reports.
There are several reasons for that but it is not impossible that I do that at some points.
Analytics API 2.0 : Use cases
What you are probably most interested in is the report functionalities. However, I see easier benefit to use the segment functionalities than the report. The report will mostly run a copy of workspace and return it to you. It can be useful if you want to realize some of the following (not supported at the moment) :
- Aggregating different Report Suite data into one report
- Aggregating different Company data in one report
- Use data to feed another report
- On that point Data Warehouse can also be a (better) option. Especially for dimension with lots of unique values, where (low traffic) appears.
- Use data for Machine Learning capabilities
All of these use-cases imply that you are quite familiar with your reports and that you have a team dedicated to play with data (and another one making sure that nothing breaks). It seems easy set up but it is not. Lots of persons, me included, would love to dig into more advanced topics but you need to setup a team of blue-collar workers that ensure data consistency, and it would be easier if they have support from your application dev teams.
On the contrary, the segments use cases can be quite easy to realize and can have direct benefit to everyone.
- Detect high number of segment per user
- Detect duplicate segments
- Verify segment naming convention
- Clean (delete) segments
Analytics API 2.0 : requirements
The requirements that you should meet to use this python wrapper for the analytics API are the following:
- python 3.7 (although it probably works for lower version)
- python modules:
- pandas
- requests
- jwt
- pathlib
Especially, you would need to prepare an Adobe IO account to connect to the API.
The wrapper is supporting JWT authentication and you would need to setup that on your own.
Don’t worry, I get you cover with a basic articles on how to realize that :
- Adobe IO JWT connector (don’t have to create the python script)
- Create a CRT file for windows
Also, what you would need to have in order to use the wrapper, is the wrapper itself :).
You can find it at this address :
https://github.com/pitchmuc/adobe_analytics_api_2.0
When you have this cover, you can start to read the other articles that cover the usage of this wrapper.
Articles | Comments |
Adobe IO : JWT authentication | How to create JWT authentication with OpenSSL and python |
Adobe IO : Analytics API 2.0 : Introduction | What you need to know about this module |
Adobe IO : Analytics API 2.0 : Connection to Analytics | Getting started with the python wrapper. |
Adobe IO : Analytics API 2.0 : Retrieving Elements | How to retrieve evars, metrics, users, segments, etc… |
Adobe IO : Analytics API 2.0 : Reporting | How to get a report from the new Analytics API 2.0 |
Adobe IO : Analytics API 2.0 : Tutorial | Video to demonstrate how to use the Analytics API 2.0 with the python wrapper |