# Google Analytics

**URL:** https://meta.discourse.org/t/google-analytics/74004
**Category:** Data & reporting
**Tags:** analytics
**Created:** [November 13, 2017, 6:02pm UTC](https://meta.discourse.org/t/google-analytics/74004 "2017-11-13T18:02:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dfrick](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@dfrick](https://meta.discourse.org/u/dfrick)
#### Post date: [November 13, 2017, 6:02pm UTC](https://meta.discourse.org/t/google-analytics/74004/1 "2017-11-13T18:02:17Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Bas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bas/32/294929_2.png) [@Bas](https://meta.discourse.org/u/Bas)
#### Post date: [November 14, 2017, 8:38am UTC](https://meta.discourse.org/t/google-analytics/74004/2 "2017-11-14T08:38:44Z")

</div>

Hi David,

You could take a look at [Community Analytics](https://community-analytics.com) or [DiscourseMetrics](https://discoursemetrics.com) which do a lot of these things for you.

Happy to answer any questions about the former, since – disclaimer – I built that Community Analytics one with a friend of mine.

And I’m pretty sure @DiscourseMetrics.com is happy to answer any questions about … DiscourseMetrics 🙂

---

<div class="post-metadata">

### Author: ![dfrick](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@dfrick](https://meta.discourse.org/u/dfrick)
#### Post date: [November 21, 2017, 8:44pm UTC](https://meta.discourse.org/t/google-analytics/74004/3 "2017-11-21T20:44:03Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Bas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bas/32/294929_2.png) [@Bas](https://meta.discourse.org/u/Bas)
#### Post date: [November 22, 2017, 9:48am UTC](https://meta.discourse.org/t/google-analytics/74004/4 "2017-11-22T09:48:56Z")

</div>

Ah, that’ll require some json and Google app script trickery 🙂

You can get the data in json from here: [https://meta.discourse.org/about.json](https://meta.discourse.org/about.json)

Here’s an example: [https://docs.google.com/spreadsheets/d/1eR6JX7r28nkoOTM-A0eLdFIDFwEn0vYpm9RJTtrO5cg/edit?usp=sharing](https://docs.google.com/spreadsheets/d/1eR6JX7r28nkoOTM-A0eLdFIDFwEn0vYpm9RJTtrO5cg/edit?usp=sharing)

Use this (or prettier, this is just a quick fix) code in the google script:

```javascript
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;
}

```
