Statistics for Ghost Websites


#1

I put together a quick website that I thought the community might find interesting. Basically, it uses the public API of a ghost website to show statistics about number of posts, words per post, and a few other stats.
(GhostGraphs.com)

It’s a proof-of-concept at this point. The public API is deprecated and will probably go away soon, so I’m thinking about options for connecting the site as a custom integration.


#2

Hey Good Work :100:
I like this Concept
OpenSource?


#3

This is veerrry cool!


#4

I have

Website detected, but no API found. Are you sure this website uses Ghost and has public API enabled?

How to fix it?


#5

I will post it on GitHub!

It’s just a simple Flask app running on Heroku. It looks for the API keys exposed in the head. For example:

<script>
ghost.init({
	clientId: "ghost-frontend",
	clientSecret: "5b660bcab961"
});
</script>

Then it builds an API request and charts that data.
(edit: I added functionality for content API too)


#6

What’s the website address?

Make sure your Public API is enabled. In your website settings go to Labs > Public API.


#7

You will probably need to change some code on your app at some point because Public API is deprecated. You will need to use Ghost’s Content API. Users will need to somehow comunicate between their blog and your app with an integration. Ghost API Versioning.


#8

It is my case. I have the nevest version of Ghost. Content API V2 is great, but possibility of expose the public API v0.1 vanished from admin panel.


#9

Hi Daniel, I just updated the website so it should work now. However, you need to make a custom integration:

  1. Go to Settings > Integrations > Add Custom Integration
  2. Name the integration “GhostGraphs”
  3. Then copy the “Content API Key”
  4. Go to Settings > Code Injection
  5. Add the following to your blog header, replacing “content” with the API key you copied
<!-- GhostGraphs.com -->
<meta name="ghostgraphs" content="7731dea759b0b453e5e2c7a9d7" />

Then it should work! Let me know if it doesn’t.


#10

Awesome :tada: Quick Update :100:


#11

See here for the source code: https://github.com/ekerstein/ghostgraphs


#12

Thanks for the code :smile: Forked :joystick: