Hello Kentico Team,
You all helped me put together a tool recently that can track total page views in the last month and the last year using the WebAnalytics API:
However, this same code does not return any information when applied to CMSFile items. Is there a similar API I can use in a transformation to get the number of downloads for a file in the tree? Total downloads is fine, but being able to adjust it by a date range like in the example above would be ideal.
Thanks in advance.
Well, you already posted the code you are using to get a report and that method hold one parameter code name - which is the code name of the report. Have you tried changing the code name of the report and replace it with the code name of the file downloads report?
So, instead of pageviews use filedownlaods.
Habe you tried changing the code name of the report to be the file download report? (e.g. filedownloads.monthreport)
Could you provide some more information about this, or maybe a link to the API you are referencing. Googling "filedownloads.monthreport" only brings up this discussion.
Thank you Juraj, that appears to have done the trick.
By the way, is this API anywhere on the DevNet site? It's really useful stuff, and I'd love to play with it some more for future reporting projects.
The API documentation is available here. But in this case, it was rather of changing the parameter values - the report code name. You can find the report code nemae if you will go to Reporting app -> Web analytics reports and edit desired report. Then, on the General tab you can see its code name.
Please, sign in to be able to submit a new answer.