Clipform

Embed on your website

Add a Clipform to any website with a two-line code snippet.

Add an interactive Clipform to any website. Visitors can watch videos and respond directly on your page - no redirects, no popups.

Quick start

Paste this wherever you want the form to appear:

<div data-cf-id="YOUR_FORM_ID"></div>
<script src="https://js.clipform.io/embed.js" async></script>

Replace YOUR_FORM_ID with your form's Form ID - the code at the end of your share link (e.g. the abc123 part of clipform.io/abc123).

That's it. The form renders as a 9:16 vertical video player, centered, up to 460px wide. On phones, tapping the form opens it fullscreen so respondents can answer comfortably - the back button returns them to your page.

Customize with data attributes

Everything is optional - the defaults just work. To tweak them, add attributes to the same <div>:

<div
  data-cf-id="YOUR_FORM_ID"
  data-cf-max-width="400px"
></div>
AttributeDefaultDescription
data-cf-idrequiredYour form's Form ID (your share ID or dynamic link ID)
data-cf-max-width460pxWidth cap. The embed centers itself and never grows wider
data-cf-min-width375pxWidth floor. The embed never shrinks below a usable size
data-cf-height9:16 autoExplicit height. Bypasses the 9:16 ratio - use inside fixed-height containers
data-cf-posterautoYour own poster image URL, or "false" to disable the poster and play button
data-cf-animated-postertrueSet "false" to keep the poster static (no auto-playing loop). Always static under prefers-reduced-motion
data-cf-preloadintentVideo-first embeds load the form once the visitor interacts with the page (moves the mouse, touches the screen, scrolls with a wheel, or presses a key), which keeps your page fast. Either way, an inline embed counts as a view in analytics when it appears on screen (at least half visible for a second), whether or not the form has loaded. Set "eager" to load as soon as the embed nears the viewport
data-cf-inline-on-mobilefalseSet "true" to keep the form inline on phones instead of opening fullscreen
data-cf-auto-resizefalseSet "true" to let the embed grow past 9:16 to fit the form's content
data-cf-source-A label for where this embed lives (e.g. your domain), shown in analytics
data-cf-trackfalseSet "true" to send form events to your own Google Tag Manager or Meta Pixel. Pro plan required - see Track form events
data-cf-platform-The integration that rendered the embed (e.g. wordpress, shopify), for analytics. Set automatically by the official plugins - leave it off for a hand-pasted embed

Sizing

By default the embed fills its container's width up to a 460px cap (centered), holds a 9:16 aspect ratio, and never shrinks below a 375px floor - the smallest width where buttons and progress stay comfortably tappable.

Value
Aspect ratio9:16 (portrait)
Default max width460px, centered (override with data-cf-max-width or your own CSS)
Min width floor375px (override with data-cf-min-width)

The cap is a default, not a constraint - your own CSS on the container always wins:

<div style="max-width: 400px; margin: 0 auto;">
  <div data-cf-id="YOUR_FORM_ID"></div>
</div>

When you pass an explicit height via the JavaScript API, the aspect ratio is bypassed and the embed uses your value exactly. This is useful when embedding inside a fixed-size container:

cfEmbed.embed({
  formId: 'YOUR_FORM_ID',
  container: '#my-form',
  height: '780px',
});

Responsive layout

On mobile, the form looks best when it fills the full screen width with no side padding or decorative borders. On desktop, you can wrap it in a frame or add padding. A common pattern:

<style>
  .form-wrapper {
    width: 100%;
    aspect-ratio: 9 / 16;
  }

  @media (min-width: 640px) {
    .form-wrapper {
      max-width: 420px;
      margin: 0 auto;
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }
  }
</style>

<div class="form-wrapper">
  <div data-cf-id="YOUR_FORM_ID"></div>
</div>

Below 640px the form goes edge-to-edge. Above 640px it gets a centered frame with rounded corners.

Mobile behavior

On phones, tapping the poster opens the form in a fullscreen overlay. Respondents stay on your page - the browser back button (or back gesture) closes the overlay and returns them exactly where they were. Progress is kept, so tapping again resumes the form.

Prefer everything inline? Set data-cf-inline-on-mobile="true" (or inlineOnMobile: true in the JavaScript API).

Preventing layout shift

The embed automatically holds its space on your page (a 9:16 box) while the form loads, so surrounding content doesn't jump around. It shows a subtle loading shimmer immediately, so visitors always see that something is on its way.

By default, the embed fetches a thumbnail of the first question (or your form's cover image, if you set one and the form starts with a video) and displays it as a poster with a play button while the interactive form loads behind it. Visitors see content immediately and know the embed is interactive. When they click play, the form crossfades in - if it has already loaded, playback starts instantly; if it's still loading, the Clipform loading screen appears briefly before the form starts.

To provide your own poster image (skipping the auto-fetch), use the data-cf-poster attribute:

<div
  data-cf-id="YOUR_FORM_ID"
  data-cf-poster="https://example.com/my-thumbnail.jpg"
></div>

To disable the poster entirely, set data-cf-poster="false". The embed shows the loading shimmer (or your backgroundColor, if you set one) until the form loads.

If your page is itself inside an iframe that doesn't allow autoplay (for example a CodePen preview or some site builders), the embed skips its poster automatically and shows the form's own play button instead, so one click still starts the video with sound.

JavaScript API

For more control, use the JavaScript API instead of data attributes:

<div id="my-form"></div>
<script src="https://js.clipform.io/embed.js"></script>
<script>
  cfEmbed.embed({
    formId: 'YOUR_FORM_ID',
    container: '#my-form',
    onComplete: function(data) {
      console.log('Form completed:', data.formId);
    }
  });
</script>

Options

OptionTypeDefaultDescription
formIdstringrequiredYour form's Form ID (your share ID or dynamic link ID)
containerstringrequiredCSS selector for the container element
maxWidthstring'460px'Width cap, centered. Your own CSS on the container also overrides it
minWidthstring'375px'Width floor. The embed holds this even in narrower columns
heightstring9:16 autoExplicit CSS height. When set, bypasses the 9:16 aspect ratio
widthstring'100%'CSS width for the iframe
posterstring | falseauto-fetchedThumbnail URL shown while the form loads. Set to false to disable
backgroundColorstring'transparent'Loading background. Replaces the default shimmer
borderRadiusstring'8px'Corner rounding
autoResizebooleanfalseOpt in to grow the embed to the form's content height instead of holding 9:16
inlineOnMobilebooleanfalseKeep the form inline on phones instead of opening fullscreen on tap
sourcestring-A label for where this embed lives, shown in analytics
titlestring'Embedded form'Accessible label for the iframe (screen readers)
trackbooleanfalseSend form events to your own Google Tag Manager or Meta Pixel. Pro plan required - see Track form events

Lifecycle callbacks (onReady, onStarted, onComplete, and more) are listed under Events.

Events

Lifecycle callbacks let your page react to the form - fire your own analytics, show a thank-you message, or redirect after completion. Pass them to cfEmbed.embed():

cfEmbed.embed({
  formId: 'YOUR_FORM_ID',
  container: '#my-form',
  onStarted: function (data) { console.log('started', data.formId); },
  onComplete: function (data) { console.log('completed', data.formId); },
});
CallbackFires whenReceives
onReady(iframe)The form has loaded and is readythe iframe element
onStarted(data)The respondent starts a submission (first interaction) - once per submission; after a restart it fires again on the first interaction (on gesture-activated embeds, the move back itself){ formId }
onNodeComplete(data)The respondent finishes a node{ formId, nodeId, index } - index counts nodes completed so far
onComplete(data)The respondent completes the form - once per submission; if they go back after finishing and submit again, it fires again for that second submission (the same count as Completions in your Clipform analytics){ formId }
onEndScreenButtonClick(data)The respondent clicks an end-screen button{ formId, nodeId }
onLoad(iframe)The form is first revealed (legacy - prefer onReady)the iframe element

Privacy: callbacks carry IDs and counts only, never the respondent's answers. Answer content stays between the form and Clipform, so forwarding these events to your own analytics is safe.

Track form events

Pro plan required. Send what happens in your embedded form to your own Google Tag Manager or Meta Pixel, so you can see views, starts, steps and submissions next to your ad and site data. Nothing is sent unless you turn it on.

Turn it on from your form's Embed page with the "Send events to my Google Tag Manager or Meta Pixel" switch, or add the attribute yourself:

<div data-cf-id="YOUR_FORM_ID" data-cf-track="true"></div>

In JavaScript, pass track: true to embed(), popup() or bubble(). If your form isn't on a Pro plan, the attribute does nothing and no events are sent. Your own callbacks (onStarted, onComplete and the rest) work on every plan.

Forwarded events

EventFires whenMatches in your Clipform analytics
clipform_form_viewThe form was opened. For an embedded form, it appeared on screen (at least half visible for a second)Views
clipform_form_startThe visitor made their first deliberate interaction (a tap, click, or keystroke)Started
clipform_step_viewThe visitor reached a step for the first time in this view (the first step is not counted)The step's reach in drop-off
clipform_form_submitThe visitor submitted the final answerCompletions

Every event carries form_id. Step events also carry step (how many steps have been reached so far) and step_id. No answers or personal details are ever sent.

Events go to window.dataLayer (Google Tag Manager) and to fbq('trackCustom', ...) (Meta Pixel), whichever your page has loaded. Your tag or Pixel has to be on the page already, and your own consent setup applies: if a visitor refuses consent and your tags don't fire, nothing is recorded.

Google Tag Manager

Each event is pushed as { event: 'clipform_form_submit', clipform: { form_id: '...' } }. In GTM:

  1. Create a Custom Event trigger. Set the event name to clipform_form_submit (or a regular expression such as ^clipform_ to catch all four).
  2. Create a Data Layer Variable named clipform.form_id if you want the form ID in your tags.
  3. Attach the trigger to a GA4 event tag, or any other tag.

Meta Pixel

Events arrive as custom events. To count a submission as a lead, open Events Manager, create a Custom Conversion from the clipform_form_submit event, and set its category to Lead.

Why the numbers can differ

Your tracker counts should be close to Clipform's, but they won't always match exactly:

  • Bots. Clipform leaves bot traffic out of its analytics. GA4 and Meta filter bots in their own way.
  • Your visitor's browser. Ad blockers, refused consent, and tags that fail to load stop events on your side only. Clipform still counts them.
  • Step counts. If a step's record fails to save, which is rare and not retried, the step shows in your tracker but not in Clipform.

Troubleshooting

Form not loading

  • Check that the Form ID is correct (the 8-9 character code from your share link)
  • Make sure the form is set to Live in the dashboard
  • Check browser console for errors

Form appears but video won't play

  • Embedded forms use click-to-play. The respondent must click the play button to start.

Content is clipped

The embed sizes itself to a 9:16 box from its container's width, so make sure the container has a defined width and isn't constrained to a shorter height. If you're embedding inside a fixed-height container, pass an explicit height option so the embed fills your container instead.

Embed overflows a narrow column

The embed holds a 375px minimum width so buttons and progress stay usable - in a narrower column it overflows rather than shrinking into an unusable form. Give the column more room, or lower the floor with data-cf-min-width if you accept smaller tap targets.

Camera/microphone not working

The embed iframe includes allow="camera; microphone; autoplay; fullscreen; payment; web-share; clipboard-write; screen-wake-lock" permissions. If your site has a strict Content Security Policy, you may need to allow these features in your permissions-policy header.

On this page