Hi - I’m wondering if there’s a way to connect to the reporting data inside Discourse’s dashboard? I’d like to build a dashboard that includes some of the metrics / data that isn’t available via Google Analytics, such as likes, comments, topics, posts, etc…
Specifically, is there a way to pull this data into a google sheet?
Alternatively, do you know if this data is accessible somehow via google analytics?
Hey - thanks for the reply Bas. I’m aware of those but I’m just trying to get access to the data in order to create my own dashboards. My goal is to sync up a few data sources into one dashboard to look at data holistically across a few channels, domains, etc…
The easiest way to do this is to have the data feed into a google sheet. Do you know how I might do that?
Use this (or prettier, this is just a quick fix) code in the google script:
function discourseStats(url) {
var url = url||'https://meta.discourse.org';
url = url + '/about.json';
var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true});
var data = JSON.parse(response);
var stats = data.about.stats;
var array = []
for (key in stats){
array.push([key, stats[key]])
}
return array;
}