# How to use API to pull metrics from Discourse into Google Analytics?

**URL:** https://meta.discourse.org/t/how-to-use-api-to-pull-metrics-from-discourse-into-google-analytics/67406
**Category:** Development
**Created:** [3 Agosto , 2017 19:26 UTC](https://meta.discourse.org/t/how-to-use-api-to-pull-metrics-from-discourse-into-google-analytics/67406 "2017-08-03T19:26:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kmcghy](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@kmcghy](https://meta.discourse.org/u/kmcghy)
#### Post date: [3 Agosto , 2017 19:26 UTC](https://meta.discourse.org/t/how-to-use-api-to-pull-metrics-from-discourse-into-google-analytics/67406/1 "2017-08-03T19:26:51Z")

</div>

Hello all — I am not a developer, so please forgive any ignorance, but I am looking to determine if it’s possible to use the Discourse API or webhooks to pull metrics Discourse is tracking in my community forum into Google Analytics and/or Google Data Studio? Specifically, I want to track new topics, new replies, new users and cumulative users. Thanks in advance for any help!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [11 Agosto , 2017 17:23 UTC](https://meta.discourse.org/t/how-to-use-api-to-pull-metrics-from-discourse-into-google-analytics/67406/2 "2017-08-11T17:23:58Z")

</div>

You can pull topic listings off the API and you can even run custom reports if needed using [data explorer](https://meta.discourse.org/t/32566?silent=true).

A great place to start would be to create an admin api key and then, for example, look at `/admin/reports/topics` when clicking refresh in chrome dev tools you will see it hits:

`/admin/reports/topics.json?start_date=2017-07-11&end_date=2017-08-10&category_id=all&group_id=&_=1502472121727`

So you can use that particular endpoint to get topic stats (you can similarly get user stats and so on)

---

<div class="post-metadata">

### Author: ![handythinks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/handythinks/32/119605_2.png) [@handythinks](https://meta.discourse.org/u/handythinks)
#### Post date: [13 Agosto , 2017 04:05 UTC](https://meta.discourse.org/t/how-to-use-api-to-pull-metrics-from-discourse-into-google-analytics/67406/3 "2017-08-13T04:05:36Z")

</div>

I’d be interested in collaborating with someone on the how to: on this. I’m not sure I understand what to do, but tracking these events is something I’d really like to do. I’m a cowboy coding marketing guy with enough chops to follow docs but not to figure it out on my own.

---

<div class="post-metadata">

### Author: ![kmcghy](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@kmcghy](https://meta.discourse.org/u/kmcghy)
#### Post date: [14 Agosto , 2017 15:32 UTC](https://meta.discourse.org/t/how-to-use-api-to-pull-metrics-from-discourse-into-google-analytics/67406/4 "2017-08-14T15:32:32Z")

</div>

Thanks for the help @sam!
