Install on WordPress
WordPress has two places for code that work with Voxtrics surveys: the site-wide Footer of the WPCode plugin for a popup, a popup with no button or a chat survey on every page, and the Custom HTML block for an inline form placed on a page. Both work on a WordPress site you host yourself and on WordPress.com with any paid plan.
Before you start
- In Domains, add the domain your WordPress site opens on, for
example
example.com, or its WordPress.com address such asyour-site.wordpress.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
formIdvalue.
Popup, popup with no button or chat: WPCode
WordPress has no field of its own for code that runs on every page, so the code goes in through a plugin. These steps use WPCode (formerly Insert Headers and Footers), a free plugin made for this.
-
In your WordPress dashboard, open Plugins → Add New Plugin, search for WPCode, click Install Now, then Activate.
-
Go to Code Snippets → Header & Footer.
-
In Footer, 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>Footer code runs at the end of every page, after the page itself has loaded.
-
Click Save Changes.
WPCode's own guide to these fields: Using the Global Header & Footer settings.
Inline form: the Custom HTML block
-
Open the page or post in the editor and click + where the survey should appear.
-
Search for Custom HTML and add the block.
-
Paste your survey's embed code, with your survey's ID in place of
YOUR_SURVEY_ID:<div id="feedback-widget"></div> <script src="https://feedback.voxtrics.io/assets/prod/index.iife.js"></script> <script> window.SiteUtilsFeedback.initiateFeedbackModule({ formId: 'YOUR_SURVEY_ID', container: document.getElementById('feedback-widget'), }); </script> -
Save the page.
Pages built with Elementor take the same code in its HTML widget, and Divi pages in its Code module.
If the survey doesn't appear
- Check that the survey is published and belongs to the domain your site opens on. A domain added as
example.comcoverswww.example.comtoo, but notyour-site.wordpress.com. - Clear the cache of your caching plugin or your host after adding the code: a cached copy of the page doesn't have it yet.
- Plugins that delay, defer or combine JavaScript to speed the site up (WP Rocket, LiteSpeed Cache,
Autoptimize and the like) can start the survey late or stop it. Exclude
feedback.voxtrics.ioandSiteUtilsFeedbackfrom those settings. - Code placed in WPCode's Header runs before the page has loaded, so the survey doesn't start. Move it to Footer.
- The survey stays on the site only while WPCode is active: deactivating the plugin removes it.
- On-site and email surveys aren't placed on a site. Share their link instead.