Skip to main content
All integrations

How to add Asklet to Ghost

Show Asklet at the end of every Ghost post with an HTML card or a theme edit.

Steps

  1. 01

    Copy your snippet

    In Asklet, open your website and click Copy website snippet at the top.

  2. 02

    Add it to one post

    In the Ghost editor, insert an HTML card and paste the snippet.

  3. 03

    Or add it to every post

    Paste the snippet into post.hbs in your theme, below the post content, and upload the updated theme.

  4. 04

    Check it on your live site

    Open a published post on a domain you listed in Asklet and answer the survey. To keep your own test answers out of the results, add the page in Asklet first: new pages start in test mode.

Your snippet looks like this
<iframe src="https://asklet.io/embed/s/<your-site>" title="Article feedback" width="100%" height="480" loading="lazy" referrerpolicy="unsafe-url" style="border:0"></iframe>
  • Keep referrerpolicy="unsafe-url" on the iframe - Asklet uses it to know which page the reader is on, so the right survey appears.
  • Ghost's Code injection puts code in the site header or footer, so the survey would sit below the footer on every page. Use an HTML card or post.hbs to place it after the article.

Add it to every post in post.hbs

In Ghost Admin, download your active theme from the design settings and unzip it. Open post.hbs, find {{content}}, and paste the snippet after the element that wraps it. Zip the theme again and upload it.

Ghost uses post.hbs for posts only. Pages use page.hbs when your theme has one, so pages stay without a survey unless you add it there as well. Use the src from your own snippet.

{{!-- post.hbs, after the post content --}}
<section class="gh-content">
  {{content}}
</section>

<iframe
  src="https://asklet.io/embed/s/<your-site>"
  title="Article feedback"
  width="100%"
  height="480"
  loading="lazy"
  referrerpolicy="unsafe-url"
  style="border:0"
></iframe>

Choose which posts show which survey

Ghost publishes posts at the root of your site by default, such as /my-post/, so a pattern like /blog/* matches nothing. Set the survey you want on every post as the website's default survey in Asklet, then add pages only for the posts or sections that need a different one.

If your routes.yaml puts posts under a prefix such as /blog/, a pattern like /blog/* works as on any other site.

Troubleshooting

The survey doesn't appear after a theme edit

Check that the uploaded theme is the active one, then open the post in a private window, since Ghost and your CDN can cache the old page for a few minutes.

Every post shows the same survey

That is the website's default survey. Add a page in Asklet with the post's path, or a pattern, and pick another survey for it.

Common questions

Does it work with Ghost members-only posts?

Yes. The widget is shown to anyone who can see the page, and answers stay anonymous.

Can I add the survey without editing my Ghost theme?

Yes, post by post. Insert an HTML card at the end of the post and paste the snippet. Editing post.hbs once covers every post instead.

Does the widget need a cookie banner on Ghost?

No. Asklet sets no cookies and stores no identifiers, so it adds nothing to your consent banner.

Related guides

Other platforms

All integrations

Get your first answers today.

Set-up takes a few minutes, and the free plan covers one website or app.

Start free

Free plan, no card needed.

en