Pulling metric "Total Time Spent" using Discover API

i was wondering if it is possible to pull "Total Time Spent" metric using Discover API, this metric is not in the list and also it is not available in Site Catalyst. i tried using "TotalTimeSpent" but throwing error "Invalid Metric"

I am facing the same problem...is there any solution to this?

Reply

If you are on SiteCatalyst v15 you can get this metric in most reports (as of v15.3). Try queuing up a ranked report like this for example...

{
    "reportDescription":{
        "reportSuiteID":"[myReportSuiteID]",
        "date":"2012-12",
        "metrics":[
            {
                "id":"totalTimeSpent"
            }
        ],
        "elements":[
            {
                "id":"searchengine"
            }
        ]
    }
}

From the v15.3 release notes...

"Total Time Spent metric is now available on traffic and commerce reports. Total time spent displays the total number of seconds spent by all visitors on the selected page or app, or on a page or app that set the reported value."

I hope that helps.

-Sean

Reply

Thanks Sean.

The problem is I am using SC 14.

While pulling report manually I am using Discover in getting 'Total Time Spent' metric.

However while using discover api it throws an error (I am using Java for Discover API implementation).

Any solution for that?

Reply

I'm not aware of a solution for that. I haven't been using the Discover API recently. Reminder that the Discover API is deprecated and I don't believe there is documentation available about the metric ids that are valid for it.

-Sean

Reply

Thanks Sean. I found the way for pulling Total Time Spent. I am using average time spent on page.

However I am not sure if I dont use Discover API what could be the way out. Do Sitecatalyst functions give the same output?

Gaurav

I'm not aware of a solution for that. I haven't been using the Discover API recently. Reminder that the Discover API is deprecated and I don't believe there is documentation available about the metric ids that are valid for it.

-Sean

Reply

So, I guess you are asking whether the "averageTimeSpentOnPage" metric applies to SiteCatalyst v14. The answer is yes, but I believe only for traffic reports that have pathing enabled. So it would work for the Pages report and any other Custom Traffic (i.e. prop) report for which the pathing feature has been turned on.

Hopefully you will be migrating to SiteCatalyst v15 soon so you will have the "totalTimeSpent" metric available in SiteCatalyst reports.

Reply

Must be logged in to comment. now to comment!