How to add Asklet to Drupal
Show Asklet under every Drupal article with a custom block - no module needed.
Steps
- 01
Copy your snippet
In Asklet, open your website and click Copy website snippet at the top.
- 02
Create a custom block
Add a basic block (Content → Blocks in Drupal 10.1 and later, Structure → Block layout → Custom block library before that). Set the body's text format to Full HTML, switch to Source and paste the snippet.
- 03
Place it below the content
In Structure → Block layout, place the block in the region under the main content. Under Visibility → Content type, tick Article so it only shows on articles.
- 04
Check it on your live site
Open a published article 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.
<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.
- Basic HTML and Restricted HTML remove iframes. Use Full HTML, which only trusted roles should be allowed to use.
- With Pathauto, articles get addresses such as /articles/my-article, so /articles/* covers them all.
Troubleshooting
The iframe disappears when the block is saved
The text format removed it. Switch the block body to Full HTML and paste the snippet again in Source mode.
Common questions
Do I need a Drupal module?
No. A custom block with the snippet is enough, and there is no module to install or keep updated.
Other platforms
All integrationsGet your first answers today.
Set-up takes a few minutes, and the free plan covers one website or app.
Start freeFree plan, no card needed.