Install on Wix
Wix has two ways of putting code on a site that work with Voxtrics surveys: Custom Code for a
popup, a
popup with no button or a
chat survey, and a Custom Element for an
inline form placed on a page. Wix allows both only
on a site with a Premium plan and a connected domain, and a Custom Element also needs a site without
Wix ads.
On a free Wix address (username.wixsite.com/...) neither is available, so a survey can't be placed
on the page. Link to an on-site survey from a
button instead: it opens on a page of its own and needs no code on your site.
Before you start
- In Domains, add the domain connected to your Wix site, for
example
example.com. A survey loads only on the domain it belongs to.
- Create the survey under that domain and publish it.
- Copy the survey's ID: on the Surveys list, open the
survey's embed code. The ID is the
formId value.
-
In your site's dashboard, go to Settings and open Custom Code in the
Development & integrations section.
-
Click + Add Custom Code and paste this, with your survey's ID in place of YOUR_SURVEY_ID:
<script src="https://feedback.voxtrics.io/assets/prod/index.iife.js"></script>
<script>
window.SiteUtilsFeedback.initiateFeedbackModule({ formId: 'YOUR_SURVEY_ID' });
</script>
-
Under Add Code to Pages, choose All pages and load the code once rather than on each new
page: the survey only needs to start once per visit.
-
Under Place Code in, choose Body – end, then click Apply.
- In the Wix Editor, click Add Elements, then Embed Code, and choose Custom Element.
Drag it to where the survey should appear.
- Click Choose Source, select Server URL and enter
https://feedback.voxtrics.io/assets/prod/index.iife.js.
- For Tag Name, enter
voxtrics-survey.
- Click Set Attributes, then New Attribute. Name the attribute
survey-id and give it your
survey's ID as its value.
- Resize the element to fit your survey, then publish your site.
Wix shows a Custom Element inside a separate frame in the Editor and in preview, so the survey won't
appear there. Check it on your published site.
If the survey doesn't appear
- Check that the survey is published and belongs to the domain connected to your Wix site. A domain
added as
example.com covers www.example.com too.
- Use Custom Code or a Custom Element, not Wix's Embed HTML element: Wix runs that code on a
separate address of its own, so the survey won't load there.
- On-site and email surveys aren't placed on a site. Share their link instead.