Starting Guide for the Adobe Analytics API
Before you start using the module, there are several things that you need to do to ensure the possibility.
Adobe prep side
- Make sure that you have a marketing cloud id and you are an administrator.
Most of the method that the API uses are based on you having administrator access.
- Go to User Access Legacy in Adobe Analyitcs:
- Once you are on the page, click on “Legacy Oauth Application” follow by “Add Application”
- You will be presented with the different services that you want your API client to have access to.
If you have a specific requirement for your API (ie : one app only for reports, another for user management) I would recommend to split your different API with the specific access.
For the sake of my test account, I gave myself access to all services. The minimum access I would recommend for using this Python API are :
- Clalculated Metrics
- Data Warehouse
- Once you are done with the previous step, it is the easiest one :
Retrieve the API Key and Client Secret.
The API key and Client Secret are important information that you need to retrieve in order to use the API.
Copy them and keep them somewhere safe
Python prep side
You will need some preparation on Python side so you can use the API.
- Install Python 🙂
- Install the following library :
- json (should be by default)
- time (should be by default)
- Get to my GitHub and get the python module “aanalytics” : https://github.com/pitchmuc/adobe_api_1.4
- Place this python module to the Lib folder and make sure Python has access to that folder.
The folder should be something like : python37/Lib
Inside there are lots of .py files
- in the aanalytics.py file, you will have on the first lines those elements :
You will need to fill the 2 first elements with the information you have retrieved on the first step.
The last information is the report suite you would like to use for reporting.
When you have done all of those steps, you can start with the different step for Adobe Analytics API.
In case you need to update your reportsuite to deal with multiple reportSuite, you can change it by assigning a new value on your console
example : aanalytics._reportSuite=’mynewreportsuite’
This will reset your report suite for the life of your python kernel
On this series, you may want to read
|Introduction||What is to know about the Adobe Analytics API with Python|
|Requirements||What is necessary to know and to be done before you start with the aanalytics module|
|Statement creation||What is a statement and why is it import for the API|
|Statement Class||What is a the statement Class and how can it help you created a statement|
|Getelements method||Explanation on how the getElements method works|
|Getelements method||Explanation on how the getReport method works|
|Getelements method||Explanation on how the retrieveReport method works|