Hello!
I'm trying to create a warehouse report with Total Time Spent (totaltimespent) metric using API 1.4 but get the error:
"error":"metric_not_supported_in_warehouse","error_description":"Metric \\"totaltimespent\\" not supported in warehouse requests","error_uri":"https:\\/\\/marketing.adobe.com\\/developer\\/en_US\\/documentation\\/analytics-reporting-1-4\\/metrics"
Does it mean Total Time Spent metric isn't supported in warehouse report OR it has some different name?
Thanks in advance!
Solved! Go to Solution.
Views
Replies
Total Likes
Not to throw your whole process into disarray... but maybe this is something you should consider using API 2.0 for? I say this because if you are getting "metric not supported" it seems like this isn't something you can overcome using that version of the API....
Workspaces all use version 2.0, so if the metric appears there it should return via the API.
A little known fact about building API 2.0 calls, is that you can get the API calls used to build your Workspaces using the Debug mode, then you can tweak the API calls if needed.
First enable Debug mode:
This will add a new icon to your freeform tables:
When you click on this, it will have a popup asking if you want to get the call for the freeform or the sparkline.. choose freeform table:
Now you will be presented with times for each API call:
When you select the time(s), it will open a new window that will show the API call in multiple formats including JSON and CURL, etc.
Maybe this will have better luck getting the Total Time Spent? Or maybe that metric truly isn't available this way? I don't use the Time Metrics in Adobe...
Views
Replies
Total Likes
Hey @Andrii2023 related to Time spent this document states which metrics are supported in data warehouse - https://experienceleague.adobe.com/docs/analytics/components/metrics/time-spent.html?lang=en
Total seconds spent is something available in Data Warehouse and I believe the ID for the same is - itemtimespent
Views
Replies
Total Likes
Thank you @f_husain, I read this doc before and it says that Total Time Spent is available in Date Warehouse. And indeed it works in Adobe Analytics Data Warehouse UI to request a report.
But I use API requests in my application and got the error.
Also tried to use "itemtimespent" name but the error is
metric_id_invalid
Views
Replies
Total Likes
Not to throw your whole process into disarray... but maybe this is something you should consider using API 2.0 for? I say this because if you are getting "metric not supported" it seems like this isn't something you can overcome using that version of the API....
Workspaces all use version 2.0, so if the metric appears there it should return via the API.
A little known fact about building API 2.0 calls, is that you can get the API calls used to build your Workspaces using the Debug mode, then you can tweak the API calls if needed.
First enable Debug mode:
This will add a new icon to your freeform tables:
When you click on this, it will have a popup asking if you want to get the call for the freeform or the sparkline.. choose freeform table:
Now you will be presented with times for each API call:
When you select the time(s), it will open a new window that will show the API call in multiple formats including JSON and CURL, etc.
Maybe this will have better luck getting the Total Time Spent? Or maybe that metric truly isn't available this way? I don't use the Time Metrics in Adobe...
Views
Replies
Total Likes
That's exactly what I was trying to grab report request from UI. Total Time Spent has the same id I try to use in my report request. Obviously, warehouse type of report within API 1.4 doesn't support this metric. I decided to keep using my report with source=standard.
Thank you Jennifer for the suggestion!
Views
Like
Replies