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!
AI-generated summary
In a discussion titled “How to use API to pull metrics from Discourse into Google Analytics?”, kmcghy, a non-developer, seeks to integrate Discourse forum metrics—such as new topics, replies, and users—into Google Analytics or Data Studio. sam responds by explaining that Discourse’s API allows pulling topic and user statistics, recommending starting with an admin API key and using endpoints like /admin/reports/topics.json to fetch data. handythinks expresses interest in collaborating on a step-by-step guide, identifying as a marketing professional with limited coding skills but capable of following documentation. kmcghy thanks sam for the guidance. The thread highlights a practical use case for Discourse’s API in analytics integration, with community members seeking accessible solutions for non-developers.
You can pull topic listings off the API and you can even run custom reports if needed using data explorer.
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)
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.
Thanks for the help @sam!