When it helps
A block works best when the quiz is the main action on the page: a landing page for ads, a “Get a quote” section, a service page. Visitors see the first question right away, with no button or pop-up, and the quiz looks like part of your website.
Open “Publish” → “On website” → “Block in the page”
Open the quiz and go to the “Publish” tab → the “On website” subtab. In the “Where the quiz appears” step, choose “Block in the page”. Right there, set the “Block height” (leave it empty to match the screen height), “Full width”, which devices to show it on (“Show on”: desktop / phone) and how the block looks “On phones”: “Block” or “Button instead of block” (opens the quiz in a window).
Add the LeadForms code to your website
Open the “Site code” block and copy the code. Paste it once on every page of your website, right before the closing
</body> tag. It’s one code for the whole website: if it’s already installed, skip this step.<script async src="https://script.leadforms.org/v1.js" data-key="YOUR_KEY"></script>
Paste the block code where the quiz should go
At the spot on the page where the quiz should appear, paste the short block code. Replace
ID with your quiz number, the same one as in the direct link https://quiz.leadforms.org/ID.<div data-leadforms-block="ID"></div>
Publish the quiz
Click the “Publish” button at the bottom of the “Publish” tab: without it, your changes in “Publish” don’t reach your website. To make sure everything is in place, click “Check page” and enter the page address: your account will show whether the code and the block are found.
Done
The quiz becomes part of the page content, right where you pasted the block code. On phones, it looks the way you chose in the “On phones” setting.
If the quiz is already on your website with the old code, it keeps working, but the new display options and widgets only come with the new code. The “Migration guide” in your account shows what to replace.
If the quiz is already on your website with the old code, it keeps working, but the new display options and widgets only come with the new code. The “Migration guide” in your account shows what to replace.
FAQ
Yes. The block shows wherever its code is pasted: add
<div data-leadforms-block="ID"></div> to every page you need. The LeadForms code must be on all those pages too, and the block settings in “Publish” are shared by all placements.