Hello,
I would be interested in getting user engagement stats per user per video through APIs in Python. I have been going through the various reports that getTable method supports, but not sure which report would fit my use case. Highly appreciate guidance on where should I be looking for that kind of data. I have also provided an example for better understanding below.
Example:
User 1 :
Video1 (total_completion_rate)
Video2 (total_completion_rate)
Video3 (total_completion_rate)
User 2:
Video1 (total_completion_rate)
Video2 (total_completion_rate)
Video3 (total_completion_rate)
You can use the below PHP script as reference and write the equivalent in Python (or any other language for that matter).
This script also gets the referenceId for each entry (if set) and the last view time (if available - this relies on viewing history data being present).
If you have no use for these metrics, you may drop the code used to obtain them, of course.
Hello @jess,
Thank you for your response. I tried using the details(report_id, params, excludedFields) that you provided in the developer console and this is the response that I get. I can only see the headers but not the data pertaining to it. I have attached a screenshot for reference. Am I missing something?
If you’re referring to LAST VIEW TIME in the CSV file resulting from running this script then, as the column name and code imply, it’s the timestamp of the last time the video was watched by given user ID.
Hello @jess,
I followed your suggestions and converted the code into Python. For the “Last_View_Time” data, this is the response that I get in Developer console. I can see that all user_id have viewed content but the object that has “Last_View_Time” data is empty. What is it suppose to mean?