How to Match Embedded Klaviyo Forms to Shopify Themes

Match an embedded Klaviyo form to a Shopify theme in two steps: get signups working, then match the design. Publish the form, enable Klaviyo’s onsite JavaScript, and add it through an app block or Custom Liquid - not both.
Then check the details:
- Placement and layout: Show the form only on intended pages, align it with nearby content, and check mobile wrapping or consider why multi-step forms beat static ones for better engagement.
- Fonts and controls: Match colors, text, fields, and buttons while keeping labels, errors, and keyboard focus clear.
- Live signup tests: Check consent, list membership, and any double opt-in confirmation. A profile alone does not confirm a subscription.
Before release, test the live form on desktop, mobile, and at 200% browser zoom. Save the setup and screenshots as a reference for later theme or form changes.
Match Klaviyo Forms to Shopify: Setup to Live Testing
How to Create Signup Forms for Shopify in Klaviyo
sbb-itb-5f36581
Choose Where the Form Appears
Place the form where it fits the page’s purpose, such as below related content or in the footer - not between unrelated sections. Add it through the theme editor using the app block or a supported custom block.
Add the Klaviyo Embedded Form App Block
Go to Online Store > Themes > Customize, open the page template, and add the Klaviyo Embedded Form block to a compatible section. Enter the form ID, position the block near related content, save, and check the preview.
Available placements depend on your theme, section, and template. If the template doesn’t support the app block, use Custom Liquid.
Use Custom Liquid When Needed
Paste the embed snippet into a supported Custom Liquid block or section if the app block isn’t available. Keep Klaviyo’s onsite JavaScript enabled, and use only one placement method to avoid duplicate embeds.
Only edit theme files if neither editor option works. Duplicate the theme first, record which file you change, and test the duplicate before publishing. Add the snippet to the most specific section or template that fits - not a global layout file.
Next, limit the form to the pages that need it.
Show the Form Only on Intended Pages
A form in a shared template appears on every page assigned to that template. A shared footer can also display it across multiple templates.
For a single-page signup, create a separate template, add the form, and assign that template to the page in Shopify admin. Preview both the target page and one page that shouldn’t show the form to check its placement.
Then adjust the width and spacing to match the content area.
Match Form Width and Spacing
Once placement is set, match the form’s width to the surrounding Shopify section. Then adjust the spacing.
Align the Form With the Content Container
Align the form with nearby headings, product grids, newsletter copy, or footer columns - not the viewport edges. Check the Shopify section’s maximum width and left and right padding. Set the Klaviyo form to fill that space, or choose a narrower width on purpose.
Width changes not taking effect? Inspect the Shopify wrapper in your browser’s developer tools. Compare its width, max-width, and left and right padding with the form container’s values. The narrower container sets the limit. Increasing the embed width won’t override a smaller parent wrapper.
Treat outer padding and field spacing as separate settings.
Adjust Section Padding and Field Gaps
Start with Shopify’s section padding, then adjust Klaviyo’s internal padding. Set the gaps between elements last. This helps prevent doubled-up spacing: Shopify controls the outer space; Klaviyo controls the space inside the form.
| Layout element | Shopify theme reference | Control to adjust | Validation check |
|---|---|---|---|
| Content width | Heading or grid edges | Wrapper and embed width | Aligned boundaries |
| Outer spacing | Adjacent sections | Section padding | No doubled whitespace |
| Field gaps | Nearby forms | Field spacing | Clearly separated elements |
| Button alignment | Input edges | Button and column width, alignment | Aligned with fields |
Keep labels closer to their inputs than separate fields are to each other. Leave enough room between consent text and the button to keep both easy to read. Avoid combining field margins with parent row gaps unless you want the extra space.
Use scoped CSS only when the built-in controls can’t produce the spacing you need. Then check the form on mobile.
Fix Mobile Wrapping and Overflow
Test the form in a narrow mobile preview, or consider using multi-step form design to improve the mobile experience. Check that side-by-side fields and buttons stack, widths remain flexible, and consent text wraps within Shopify’s side padding.
If content overflows, inspect min-width, width, padding, box-sizing, and white-space on both parent and child elements.
Match Fonts, Colors, and Controls
Match Typography and Backgrounds
Once placement and spacing are set, match the form’s style to your theme. Use Shopify’s theme settings as a reference and apply those values in Klaviyo. Adjust headings, labels, fields, buttons, and consent copy separately. Set the font family, size, weight, and line height where supported. Check the storefront, not just the editor preview. Make sure custom fonts load, or choose a suitable fallback.
Match the section’s text and background colors as well. For dark or image-based sections, use a solid or sufficiently opaque form background to keep text readable. Check labels, placeholders, consent text, and messages separately. Aim for at least 4.5:1 contrast for body and button text and 3:1 for control boundaries and state indicators, where applicable.
Style Buttons, Fields, and Messages
Match Klaviyo buttons and inputs to nearby Shopify controls. Check the fill color, border, corner radius, height, padding, and capitalization. Keep visible labels instead of relying on placeholders. Tab through fields, consent checkboxes, links, and the submit button to confirm that every active control has a clear focus indicator. Never remove the focus outline just to match the design.
Keep consent copy and messages specific and consistent with your brand’s voice. Submit invalid input and check that error messages explain the problem through text - not color alone. Then complete a valid signup and review the success message. Both states should stay readable against the section background, including on mobile. For longer forms, improving accessibility and reducing friction through a multi-step layout can further boost completions.
Add Scoped CSS Only When Needed
Use CSS only for typography details that theme controls can’t reach, such as precise line height or letter spacing. Inspect the rendered form, then scope every rule beneath a stable, form-specific wrapper. Avoid global input or button rules and generated class names that may change.
Save a copy before editing. After your changes, recheck responsive layouts, keyboard focus, errors, and success states. Then publish and test the live form on the storefront.
Publish and Test the Live Form
Once placement and styling are set, check the form on the live storefront.
Publish the Shopify theme and the latest Klaviyo form version. Then confirm the live page uses the intended theme, block, and Klaviyo.js.
Check Live Placement and Styling
Open the live storefront in a private browser window to reduce the effects of previous visits and cookies. Check both the target page and one unaffected page at desktop and mobile widths. Review alignment, spacing, fonts, button size, field wrapping, and success-message placement.
Test with the form’s live targeting and consent rules in place. Private browsing doesn’t automatically make a visitor eligible. If the layout looks right, submit a test signup to check that the form works and follows best practices for lead forms.
Test Signups and Consent
Submit an email address you control that hasn’t been used for another test. Confirm the success message or redirect, then check the profile, list membership, and consent record in Klaviyo. A profile does not confirm subscription. If double opt-in applies, complete the email confirmation before expecting Subscribed status. Check segment eligibility separately against the segment’s conditions.
Test blank required fields, invalid email input, required consent controls, and repeat submissions. Also run a keyboard-only test. Check focus order and make sure validation feedback is usable - not just that submission succeeds.
Fix Missing Forms and Style Differences
If the form is missing or looks different on the live page, find the cause before changing the design again.
For a missing form, check publication status, the live template, block location, form ID or embed code, and Klaviyo.js. Next, check targeting, consent rules, and conflicting embeds or onsite code.
For styling differences, inspect wrapper dimensions, font loading, inherited theme styles, and scoped CSS. Disable browser extensions and retest one change at a time.
Record the URL, form ID, viewport width, consent choice, timestamp, and screenshot so you can reproduce the failure.
Conclusion: Keep Styling and Signups Working
Save the final form setup as your baseline: form name, ID, Shopify theme, target templates, placement method, and intended width and spacing. Store desktop and mobile screenshots alongside the date of your last successful signup test.
After publishing, updating a theme, editing a form, or switching themes, compare the live form with that baseline. If you switch themes, reenable Klaviyo Onsite JavaScript in the new theme’s app embeds.
For every release, check the design, accessibility, and signup process. Test the final layout on the live storefront, including keyboard navigation and 200% browser zoom, to make sure the form stays usable and visually consistent. Then test a live signup through the correct consent and confirmation flow. Treat both a theme-matched design and a signup that submits without errors as release requirements.
FAQs
Will my embedded form inherit future theme changes?
It depends on how you added it. A Klaviyo Embedded Form app block stays linked to its Shopify section or block. The form will still work, but theme changes may affect how it looks or where it appears.
Test your form again after theme updates. If you spot styling issues, adjust the settings in the Klaviyo form editor or check your Shopify theme’s CSS for conflicts.
Can I style the same form differently on different pages?
Yes. Embedded forms in app blocks or Custom Liquid containers can use template-specific CSS overrides in your Shopify theme.
Apply custom CSS to a specific page template, or use a page-specific CSS selector to target its parent container. This lets you adjust the form’s layout, spacing, and width.
How can I test styling changes without affecting live signups?
Before publishing, check your changes in the Shopify theme editor’s preview mode. Then open an incognito or private browser window to see how the form looks to new visitors. Klaviyo often hides forms from known subscribers or returning visitors.
Record your working configuration, including the active theme and its version. Check both desktop and mobile views to confirm the design responds to screen size and the formatting looks right.
Related Blog Posts
Get new content delivered straight to your inbox
The Response
Updates on the Reform platform, insights on optimizing conversion rates, and tips to craft forms that convert.
Drive real results with form optimizations
Tested across hundreds of experiments, our strategies deliver a 215% lift in qualified leads for B2B and SaaS companies.

.webp)


