Skip to main content

How Turtl works with CMS platforms

Everything you need to embed a Turtl Doc on your website or CMS, plus what to check before you start

You can add a Turtl Doc to almost any website or content management system (CMS) by pasting a small piece of embed code into a page. This article explains how embedding works, what to check before you start, and which embed option works best on the most popular platforms: WordPress, HubSpot, Drupal, Joomla, Adobe Experience Manager and Sitecore. If you use a different CMS, the same principles apply.

How embedding a Turtl Doc works

Every CMS displays your Turtl Doc in the same underlying way: you get embed code for your Doc, then paste it into a part of your CMS that accepts custom HTML. There are two embed options:

  • Turtl standard embed (recommended): Shows an animated preview of your Doc that opens in a Lightbox or another display mode you choose. It uses a short link snippet plus a script tag.

  • iframe embed: Displays your Doc directly inside a frame on the page. It doesn't need any scripts, so it's useful when your CMS won't let you add script tags.

To get the standard embed code, open the share tools for your Doc. One way is from the content listing: click the drop-down menu next to your Doc and select "Share".

Your embed code is generated in the "Embed code" box, where you can also customize the animation and size of your embed.

The iframe embed is a short snippet you add yourself, using your Doc's URL. For full instructions on both options, see How to use the embed code sharing asset.

Note: The standard embed is not loaded inside an iframe, so existing styles on your website page can occasionally affect how the preview looks. If the preview doesn't display correctly, the iframe embed is a reliable alternative.


Before you start

A few things to check will help your embed display and track correctly:

  • Can your CMS add scripts? Many platforms remove script tags for security. If you paste the standard embed and it doesn't appear after saving, your CMS may be stripping the script. Use the iframe embed instead, or ask an administrator to allow the script tag.

  • Where is your Doc served from? When a Doc is embedded on a different domain from where it's hosted, third-party cookie restrictions in some browsers can affect form submissions and analytics tracking. Setting up a custom domain lets those cookies be treated as first-party, which makes tracking more consistent.

  • Engagement is still tracked. Your embed code includes your Doc's ID, so reads and engagement with the embedded Doc are still recorded in your Turtl analytics.

Tip: For reliable tracking when embedding on your own site, set up a custom domain (CNAME) so your Doc is served from your domain.


Embedding a Turtl Doc in popular CMS platforms

Each platform's menus and settings change over time, so for detailed steps we link to the platform's own help documentation. Below is what you need to know about using Turtl embed code on each one.

WordPress

Paste your embed code into a "Custom HTML" block in the block editor, or into the "Text" tab in the classic editor. Both the standard embed and the iframe embed work on self-hosted WordPress.org sites. On WordPress.com, script and iframe tags are only allowed on paid plans with hosting features active, and are removed on the free plan. For detailed steps, see WordPress's guide to the Custom HTML block.

HubSpot

Add your embed code to a page or blog post using the "Embed" option in a "Rich text" module. HubSpot may remove script tags from embeds depending on your template, so if the standard embed doesn't display, use the iframe embed or ask your HubSpot developer to add the code using a custom HTML module. For detailed steps, see HubSpot's guide to embedding external media.

Drupal

Drupal filters HTML based on the text format of the field or block you're editing. The built-in "Full HTML" format allows the iframe embed, but the standard embed also needs the format to allow script tags, which an administrator may need to set up. For security, only allow scripts for trusted administrator roles. For detailed steps, see Drupal's guide to text formats and filters.

Joomla

Joomla's default editor removes script and iframe tags when you save, so an administrator needs to change the text filter settings before either embed option will display. Only turn off filtering for trusted user groups, as it lets those users add any HTML to your site. For detailed steps, see Joomla's guide to editors and HTML filters.

Adobe Experience Manager

Add your Doc using the "HTML" option in AEM's "Embed" component. AEM removes script tags from embedded HTML for security, so use the iframe embed. To use the Turtl standard embed, or if the "HTML" option isn't available, ask your AEM developer or administrator. For detailed steps, see Adobe's guide to the Embed component.

Sitecore

Sitecore removes script tags from "Rich Text" fields, so add your embed code using a dedicated HTML component instead. Sites using Sitecore Experience Accelerator (SXA) can use the "Plain HTML" component. Sitecore XM Cloud doesn't include a built-in component for script-based embeds, so ask your Sitecore developer to add one. For detailed steps, see Sitecore's guide to embedding HTML in SXA.


Other CMS platforms

The same two methods work on most other platforms. Add the standard embed or the iframe code to whatever embed, custom code or HTML element the platform provides. Typical locations include:

  • Webflow: An "Embed" (HTML embed) element.

  • Squarespace: A "Code" block.

  • Wix: An "Embed HTML" or "Custom Element" element.

  • Headless CMS platforms, such as Contentful: Your page is built by your web developer, so ask them to add the embed code to the page template.

Tip: If the frame size doesn't match your layout, iframe embeds can display too small or look awkward. Adjust the width and height in the iframe code and follow responsive web design best practices so the Doc displays well on all devices.

Did this answer your question?