How it works
You paste the LeadForms code into Wix once, and it covers every page. How the quiz shows up is something you choose in LeadForms, on the “Publish” tab: the LeadForms button in the corner or as a banner, auto-open (after a delay, when the visitor shows interest or when they are about to leave the page) and other options. You no longer need a second code for each option.
Copy the LeadForms code
In the quiz editor, open “Publish” → “On website” and expand the “Site code” block. Copy the code, which looks like this:
It is one code for the whole site: it loads all your quizzes and widgets. If the code is already installed, the block is called “LeadForms code found on your website”: you do not need to paste it again, go straight to the “Choose how to show the quiz” step.
<script async src="https://script.leadforms.org/v1.js" data-key="YOUR_KEY"></script>. Your key is already filled in.It is one code for the whole site: it loads all your quizzes and widgets. If the code is already installed, the block is called “LeadForms code found on your website”: you do not need to paste it again, go straight to the “Choose how to show the quiz” step.
In Wix, open “Settings” → “Custom Code”
In your site’s dashboard, go to “Settings” and, in the “Development & integrations” section, choose “Custom Code”. Code added there goes on every page of the site at once.
Learn more about custom code in the Wix Help Center.
Learn more about custom code in the Wix Help Center.
Click “Add Custom Code”
Code can go in the head or in the body of your pages. Put the LeadForms code at the end of the body (it also works in the head). Click “+ Add Custom Code” at the top right.
Paste the code and choose “Body - end”
Paste the LeadForms code into the text box and give it a clear name, for example “LeadForms code”.
Under “Add Code to Pages”, choose “All pages”, and under “Place Code in”, choose Body - end. Click “Apply”.
You will not need to paste any more code: your next quizzes and widgets load through this same code.
Under “Add Code to Pages”, choose “All pages”, and under “Place Code in”, choose Body - end. Click “Apply”.
You will not need to paste any more code: your next quizzes and widgets load through this same code.
Choose how to show the quiz and click “Publish”
Go back to LeadForms, to the “Publish” → “On website” tab. In the “Where the quiz appears” step, choose “Window over the site” or “Side panel”, and in the “How it opens” step choose, for example, “LeadForms button: in the corner or as a banner” or “Auto-open”. You can pick several at once. This is also where you choose the devices and pages that show the quiz.
Click the “Publish” button at the bottom of the tab. Until you do, the changes will not reach your site.
Click the “Publish” button at the bottom of the tab. Until you do, the changes will not reach your site.
Leave the settings: “Site Actions” → “Edit Site”
The code is in place; now you need to go back to the editor. In the dashboard, click “Site Actions” and choose “Edit Site”.
Publish your Wix site
The “Publish” button is at the top right of the Wix editor. Until the site is published, the changes are only visible there.
Done! The quiz is in place. To check the setup, go to LeadForms, click “Check page” in the “Site code” block and enter your site’s address.
Done! The quiz is in place. To check the setup, go to LeadForms, click “Check page” in the “Site code” block and enter your site’s address.
More quizzes and changing how they show
You do not need to touch the code in Wix again. To change how the quiz shows up (for example, to turn on auto-open) or to add another quiz to your site, set it up on the “Publish” → “On website” tab and click “Publish”.
Stuck with the setup?
If something does not work, and we will sort it out with you.