Activity Reporting - Get Conversion and Impression Data by Date

Avatar

Avatar

zach_shearer

Avatar

zach_shearer

zach_shearer

16-09-2020

Currently it is not possible to add a date or timeframe dimension to a report in Adobe Target when one doesn't have access to Analytics for Target. See the following forum thread for reference: 

 

https://experienceleaguecommunities.adobe.com/t5/adobe-target-questions/activity-reporting-get-conve...

 

I'd like to request that it be possible to segment activity reporting by hour, day, week, month, quarter, year, and date. I'm probably missing a level of granularity there. 

 

date reporting
2 Comments (2 New)
2 Comments

Avatar

Avatar

Amelia_Waliany

Employee

Avatar

Amelia_Waliany

Employee

Amelia_Waliany
Employee

01-10-2020

Thank you for sharing this feedback, @zach_shearer! This is something that the Adobe Target Product Management team will consider for the future of Target reporting. Please feel free to share more details on this thread. Thanks!

 

Warmly,

Amelia

Status changed to: Investigating

Avatar

Avatar

zach_shearer

Avatar

zach_shearer

zach_shearer

07-10-2020

Thanks @Amelia_Waliany . Your developers can see the the process that I followed with my incredibly messy Python script. If it is helpful, I can provide the contents of the supporting functions. In short, a report segmented by day should be available in the user interface. 

 

def main():
    # Get array of date ranges to query the API with.
    dateRange = create_date_range_array(startDate, endDate)

    # Testing
    # print(dateRange)

    # Create list to store reports from the API
    reportsArray = []

    # Loop through date range array and query the API for reports.
    for date in dateRange:
        # Print currently working report
        print('Getting current report for date: %s' % date)

        # Make the API request
        reportResponse = get_Adobe_abTestResult(adobeTarget_activityId, date, headers)

        # Loop through the experiences in the response and add a date column with the appropriate date
        for experience in reportResponse:
            experience['date'] = date

        # Append the report to a list of reports.
        reportsArray.append(reportResponse)

        # Sleep to avoid hitting API limits.
        sleep(1)

    # Create dataframe array to store dataframes
    reportDataFrameArray = []

    # Loop through the reports array and json_normalize them
    for report in reportsArray:
        tempDataFrame = pd.json_normalize(report)
        reportDataFrameArray.append(tempDataFrame)

    # Concat all of the dataframes in the dataframe array.
    allReportsDataFrame = pd.concat(reportDataFrameArray)

    ### Testing
    # print(reportsArray)

    # Convert the dataframe to a csv.
    allReportsDataFrame.to_csv(
        'Adobe Target - A-B Test Report - Activity ID({0}) - Date(Start-{1}|End-{2}).csv'.format(adobeTarget_activityId,
                                                                                                 startDate,
                                                                                                 endDate),
        index=False)