Introduction

This article will instruct you on how to embed Trustmary's testimonials and surveys to your site when using the Elementor theme and editor in WordPress. If you're looking for instructions on the same subject, but for a different WordPress editor, please refer to the main article covering the integrations of Trustmary and WordPress.

Getting the code snippets

Widgets

Start by navigating to the Widgets section in Trustmary. In there, select a widget or create a new one.

Once in the widget editor, select the Add to website tab at the top of the screen. Here you'll find the code snippets needed to embed the widgets.

What to do with the snippets?

Note, that the two snippets of code serve different purposes.

The first snippet, Trustmary tag, is a global script which enables the loading of the widgets. This script needs to be installed once, either with Google Tag Manager or inside the <head> tag of a website. We recommend installing the script with Tag Manager, as scripts installed like this are activated more reliably and with less interference to other components of a site. For the installation process, check out this guide.

The second snippet is the embed code itself. This snippet loads a widget into where it is placed on the site.

Surveys

For surveys, the embed code can be found in the Collect tab of the survey in question. Once there, scroll down to the end of the page and you will see a section titled Embed to Website. Click Copy under the code snippet and you're ready to move to the next stage.

Embedding the code in Elementor

Once you have the code, you're ready to embed it into your web page. Start by opening up your dashboard in WordPress and navigating to Pages. Here you can either add a completely new page by clicking Add New, or edit an existing page by selecting one.

wp wordpress trustmary integration

This opens up the default page editor. To open the Elementor page editor, click the button that reads Edit with Elementor near the top of the editor.

Find the HTML element from the elements section in the sidebar and drag & drop it into your page. After this, the element's settings are automatically opened and you're greeted with a textbox where you can enter your embed code.

Once the code is in place, click on the Publish button at the bottom of the sidebar, and you're done!

Did this answer your question?