Skip to main content

MailerLite websites and landing pages

MailerLite Website Testimonial Widget Setup

Unlike Mailchimp, whose website builder turns away custom HTML, MailerLite gives you two places for code. Its own pages describe a code block you drop into a website or landing page, and an Analytics and custom code setting that injects code into the header or body of the whole site. The widget’s div goes in the block where testimonials should appear; the script can sit in the block too, or in the body injection. One catch from MailerLite itself: custom code does not run in landing page preview, so you test after publishing.

  • The div in a code block, in its own column
  • The script in Analytics and custom code
  • Why the preview stays blank until you publish

Embed code

Code for your MailerLite site

Enter your widget id. The simple route is the first block alone. If several pages carry widgets, use the div blocks on those pages and put the script once in the site’s body code.

Free tool · runs in your browser

Shown in StoryProof when you copy a widget’s embed code.

Part 1 · Simple route: one code block holding everything

Sites › your website or landing page › edit › add a code block in its own column

<div data-storyproof-widget="YOUR_WIDGET_ID"></div>
<script src="https://app.storyproof.io/embed.js" async></script>

Part 2 · Site wide route: a code block on each page with a widget

Sites › your website › edit page › code block where testimonials go

<div data-storyproof-widget="YOUR_WIDGET_ID"></div>

Part 3 · Site wide route: the script once, in the body code

Sites › your website › Edit settings › Analytics and custom code › body code

<script src="https://app.storyproof.io/embed.js" async></script>

Publish, then open the live URL. MailerLite says custom code does not work in landing page preview mode, so a blank preview is expected.

The code is assembled in your browser from the id you enter. Nothing is stored.

The problem, solved

MailerLite snags, and how StoryProof handles them

  • The preview shows nothing where the widget is

    MailerLite’s own article on interactive features says custom code does not run in landing page preview. People undo a correct install because of it.

  • Several pages, the script on each

    A homepage strip, a sales page wall and a landing page quote mean three pastes of the full code, and three places to fix later.

  • Custom code settings will not save

    MailerLite says custom code injection is for paid accounts. On a free account, the settings route may not be open to you.

  • Subscribers praise us but we never ask

    Your list replies to newsletters with thanks, and none of it reaches the site.

  • Anything could land on our sales page

    An embed that shows every submission would put a half finished or critical comment in front of buyers.

Flip the switch to see how StoryProof handles each one.

In StoryProof

Install it on a MailerLite page

  1. 1

    Prepare the widget

    In StoryProof, choose the approved testimonials for this widget and copy its id.

  2. 2

    Add a code block in its own column

    In the MailerLite editor, add the code block where testimonials should appear. MailerLite suggests giving a code block its own column for control over fit.

  3. 3

    Paste the div, and the script if you are not injecting it

    For one page, paste both lines. For several pages, paste only the div and put the script in the body code instead.

  4. 4

    Inject the script once, if you chose that

    Open the site’s Edit settings, go to Analytics and custom code, and paste the script into the body code.

  5. 5

    Publish and test the live page

    Landing pages are only visible to the public once published. Load the live URL on a phone and a laptop.

What happens next: If you later switch from the simple route to the site wide one, remove the script line from each code block so it is not loaded twice.

Which MailerLite code option to use

  • SituationOne landing page with one widget

    Code block
    Div and script together
    Analytics and custom code
    Not needed
  • SituationA website with widgets on several pages

    Code block
    Div only, on each page
    Analytics and custom code
    Script once, in the body code
  • SituationFree account, settings unavailable

    Code block
    Div and script together
    Analytics and custom code
    Not used
  • SituationA widget in a sidebar or narrow column

    Code block
    Div in its own column
    Analytics and custom code
    Either route for the script

Before you start

Limits on MailerLite

What this does not cover, and what to check on your side. Better to know now than after launch.

  1. 01

    MailerLite pages as of 2026-12-04

    Steps follow MailerLite’s help on its landing page builder and its articles on custom code and interactive features as of 2026-12-04. Not yet followed on a live MailerLite site.

  2. 02

    Paid account for injection

    MailerLite states that anyone with a paid account can add custom code to websites. We did not find a plan rule for the code block itself.

  3. 03

    Preview cannot be trusted

    Custom code does not run in landing page preview, per MailerLite. Only the published page shows the result.

  4. 04

    Not about MailerLite emails

    This guide is for MailerLite websites and landing pages. Widgets do not run inside email campaigns.

FAQ

Questions people ask

Short answers to what usually comes up next.

Does MailerLite allow custom HTML on websites?
Yes. MailerLite’s own articles describe a code block for embeds on websites and landing pages, and a custom code injection setting for header or body code.
Why is the widget missing from my landing page preview?
MailerLite says custom code does not work in landing page preview mode. Publish the page and check the live URL.
Should the script go in the header or the body code?
MailerLite says the tool you add decides. For StoryProof, put the script in the body code, or keep it in the code block next to the div.
Is this the same as the Mailchimp guide?
No. Mailchimp websites do not accept custom HTML, so that guide avoids code. MailerLite accepts code, so the widget goes on the page itself.

Still have a question?Ask the StoryProof teamorbook a demo.

Show subscriber praise on your MailerLite site

Collect and approve testimonials in StoryProof, then drop one widget into a MailerLite code block.

Sources

  1. Integrate tools with custom code, MailerLite. Checked 2026-12-04.
  2. What is a landing page?, MailerLite Help. Checked 2026-12-04.
  3. Interactive website features, MailerLite. Checked 2026-12-04.

Last updated 2026-12-04.