This is an attempt at a usable python library to query report data from Adobe Analytics 1.4 API.
Project description
easyAdobeAnalytics
This is an attempt at a usable python library to query report data from Adobe Analytics 1.4 API.
Installation
Install the package using:
pip install easyAdobeAnalytics
You can also find the package on PyPI.
How it works
- For authentication, you need to retrieve an access token from Adobe using client id and client secret.
- First step is generating a json structure required by Adobe for querying data.
- Depending upon if you need segments to be queried individually or not, generate the required number of report descriptions.
- Next, we submit these reports to Adobe Analytics to ready the reports for us.
- Once the report is queried, Adobe returns us a
report_idwhich we can use to track it's status. - If report is not ready yet, we keep checking until it's ready and data is available to be consumed.
- Once the report is ready (depending upon the size of data), we get the actual report data using the
report_id. - Finally we concatenate all the report data returned to create a single dataframe.
How to use
All the functionality is behind the query_and_retrieve function in the package. Define all the variables required and pass it on. Leave the variable as empty list for elements,metrics,segments in case you don't wish to provide one for a report.
Example:
from easyAdobeAnalytics import query_and_retrieve
def easy_example():
client_id = '<your-client-id>'
client_secret = '<your-client-secret'
company_id = 'company_id'
rsid = "report_suite_id"
elements = ['element_id_1','element_id_2']
metrics = ['metric_id_1','metric_id_2']
segments = ['segment_id_1','segment_id_2']
query_segments_individually = False # True in case you want each segment to be queried individually.
date_from = '2024-12-3'
date_to = '2024-12-17'
date_granularity = "Day" # Month, Year
report_data = query_and_retrieve(client_id,
client_secret,
elements,
metrics,segments,
rsid,date_from,
date_to,
date_granularity,
company_id,
query_segments_individually)
print(report_data.head())
if __name__ == '__main__':
easy_example()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easyAdobeAnalytics-1.0.2.tar.gz.
File metadata
- Download URL: easyAdobeAnalytics-1.0.2.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f010e33b7055ff034b32416be30dd60986f1b5a84c73175d7a2020bed34f894a
|
|
| MD5 |
0f570ac37cc900f514690e7984288e4e
|
|
| BLAKE2b-256 |
55ab7ce05ef3b252d6f1fd1633b9811f16a87bdb00060852cc9e7ff2b049de72
|
File details
Details for the file easyAdobeAnalytics-1.0.2-py3-none-any.whl.
File metadata
- Download URL: easyAdobeAnalytics-1.0.2-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2dcae9fb08964386af895db90a196feaf320668fa23c5579ea3ebb3b19dcea5
|
|
| MD5 |
c3026411745cab975e359f6fec4d0c00
|
|
| BLAKE2b-256 |
498ad1d081a7a11a87411fd6ea25a93d6e7a9cc486b329222e33466337e78a86
|