Statistics for Ghost Websites

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)

https://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.

5 Likes

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

1 Like

This is veerrry cool!

1 Like

I have

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

How to fix it?

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)

1 Like

What’s the website address?

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

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.

1 Like

blog.gustawdaniel.com

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.

1 Like

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.

2 Likes

Awesome :tada: Quick Update :100:

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

1 Like

Thanks for the code :smile: Forked :joystick:

Made some minor updates to the site. If you’d like to be featured on the website, please let me know!

www.ghostgraphs.com

If you wouldn’t mind featuring https://www.codetips.co.uk :slight_smile:

Site is down