Skip to main content
All integrations

How to add Asklet to HubSpot CMS

Add Asklet to HubSpot pages and blog posts with an embed, or to every post through your blog post template.

Steps

  1. 01

    Copy your snippet

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

  2. 02

    Try it on one post

    Open a blog post or page in the editor and click a rich text module. In the sidebar, open the Insert menu, choose Embed, paste the snippet and click Insert.

  3. 03

    Add it to every post

    In Design Manager, open the blog post template your blog uses (the file with templateType: blog_post at the top). Paste the snippet after the element that holds {{ content.post_body }} and publish the change.

  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.
  • After you publish, view the page source and check that the iframe still has that attribute. If the editor removed it, use the template instead.
  • HubSpot's default themes and themes from the marketplace are read-only. Create a child theme, clone the blog post template into it and edit the copy.
  • Posts live under the blog's root path, such as /blog/my-post, so a pattern like /blog/* covers every post on that blog.

The blog post template

Every blog post template prints the post with {{ content.post_body }}. Your theme wraps it in its own markup, so paste the snippet just after that wrapper closes. Use the src from your own snippet.

<div class="post-body">
  {{ content.post_body }}
</div>
<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>

On landing pages and other pages

For a page built in the drag-and-drop editor, embed the snippet in a rich text module where the survey should go.

For many pages, create a custom module in Design Manager with the snippet as its HTML. Your editors can then add it from the editor sidebar like any other module, without pasting code.

Troubleshooting

Every post shows the default survey

The iframe probably lost referrerpolicy="unsafe-url" on the way in. Check the page source, and if it is missing, move the snippet into the template or a custom module. Then use Test an address on the Pages tab in Asklet.

The survey doesn't show in the editor preview

The widget only appears on the domains you listed in Asklet. Check the published page on your own domain.

Common questions

Do I need a HubSpot app or integration?

No. The snippet is plain HTML. It doesn't connect to your HubSpot account, and Asklet never sees your contacts or CRM.

Do answers create HubSpot contacts?

No. Answers are anonymous and stay in Asklet. Nothing is sent to HubSpot.

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