Embed your sampling journey directly onto your website
In this guide, you'll learn how you can embed a SoPost landing page onto another website using a simple snippet of code. Let's get started...
Embedding the page
Using HTML's iframe
tag, it's easy to embed a landing page onto another website. Add the example code to the page of your website where you'd like to embed the page, replacing {insert_URL}
with your SoPost landing page URL.
SoPost will provide you with your landing page URL.
Example embed code
<iframe src="{insert_URL}" width="400" height="900" frameborder="0" marginheight="0" marginwidth="0" sandbox="allow-scripts allow-same-origin allow-forms">Loading…</iframe>
Height and width
You can change the height and width of the iframe on the page using the height and width attributes within the code snippet. This is set in pixels.
Sandbox attribute (optional)
If the site you're embedding on has strict security policies, you may need to add the following into the sandbox
attribute:
allow-scripts
allow-same-origin
allow-forms
ℹ️ Important: Ensure SoPost are aware of the website domain that the page will be embedded on to ensure it loads.