Most commonly, we see surveys linked to campaigns. This is great because it allows a recipient to click out of the campaign and into a new tab which hosts the survey. However, you may want your survey to be embedded within the campaign itself. This way, your recipients can complete the survey without having to leave the campaign.
To do this, you need to create an iframe in your campaign. This iframe is created via the HTML in order to hold the survey like a container.
How to insert the survey iframe into your campaign
You can grab the iframe code of your survey by navigating to the Preview and Deploy stage of a survey and selecting the Deploy Survey button:
You will then need to head to the Embed tab within the pop up and copy the iframe code.
Once you've copied this code, you will need to hop into your campaign. Open up the HTML Editor for the block you would like to add your embedded survey into.
Please note that you may need to adjust the width of your iframe depending on the survey's proportions, the width of the campaign, and the type of block you're inserting the survey into. For example, if you insert the iframe into a multi-column block, it will have a lesser width and therefore will need to be adjusted via the HTML.
You will then need to paste the copied iframe code into the HTML so it looks like the below. The start of the <iframe> tag should come the line after the </table> tag.
What about reporting?
The reporting data for the embedded survey can be found in the usual way, by navigating to the Reports tab and then into the Surveys tab. You'll be able to click into your survey from this list of deployed surveys in order to see responses:
Please note: It's not possible to view an iframe within an email client, so your survey will only appear when the campaign is viewed online. If the survey is embedded in the first page of the campaign, the recipient will be able to see this 'View Survey' text which will allow them to navigate to the survey in a separate browser tab:
To ensure your recipients see your survey embedded within the campaign, the iframe will need to be created on a subsequent page of the campaign.
If you have any questions about setting up an iframed survey, please reach out to firstname.lastname@example.org.