There is no C# API (yet) to retrieve the top X most visited pages.
You can query the tables directly though. Something like this should work:
SELECT TOP 10 p.protocol, p.domain, p.path, COUNT(p.id) pageviews
FROM [uMarketingSuiteAnalyticsPageview] pv
JOIN uMarketingSuiteAnalyticsPage p
ON pv.pageId = p.id
GROUP BY p.id, p.protocol, p.domain, p.path
ORDER BY COUNT(p.id) DESC
If you also want Umbraco node ids you can get those by joining the uMarketingSuiteAnalyticsUmbracoPageVariant table (on pageview.umbracoPageVariantId).
C# API
Is it possible to access page view data via the C# API? I wish to access the top 10 viewed pages.
Hi Matthew,
There is no C# API (yet) to retrieve the top X most visited pages. You can query the tables directly though. Something like this should work:
If you also want Umbraco node ids you can get those by joining the uMarketingSuiteAnalyticsUmbracoPageVariant table (on pageview.umbracoPageVariantId).
If this does not work for you, let me know!
Regards, Daniël
is working on a reply...