Skip to main content

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.

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_id which 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

Install the package using:

pip install git+https://github.com/varnitsingh/easyAdobeAnalytics.git

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

easyAdobeAnalytics-1.0.1.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easyAdobeAnalytics-1.0.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file easyAdobeAnalytics-1.0.1.tar.gz.

File metadata

  • Download URL: easyAdobeAnalytics-1.0.1.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

Hashes for easyAdobeAnalytics-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ca771fde52a4c618b1aaffdd839ca4b11241921626f6e905296dae0e23434a70
MD5 fda110c7bd8f9294b094571ecc1b3ddd
BLAKE2b-256 498f398341ea37278e80ceedad4d3d0863e783242b85e01dbc33c396ec982e55

See more details on using hashes here.

File details

Details for the file easyAdobeAnalytics-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for easyAdobeAnalytics-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 802f312abbeccad2cce3f3e64584493962fddb3197ff58db208534f76cf5c5da
MD5 8082a47fb43fb0c1b361df5bdd6d807b
BLAKE2b-256 16e7843ee5b3606a3c49e7e22a897ac1e92b7bf5d391d78c5277052b46f75b73

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page