Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.tally.so/llms.txt

Use this file to discover all available pages before exploring further.

The standard embed renders a Tally form inside an <iframe> on your own page. The widget script lazy-loads each embed, forwards the page URL and query parameters to the form, and exposes a window.Tally object for manual control.

Add the widget script

Include the Tally widget script once on any page that contains an embed:
<script src="https://tally.so/widgets/embed.js"></script>

Add an embed

Place the embed HTML wherever you want the form to appear. The data-tally-src attribute holds the embed URL — copy the one from the Share tab of your form.
<iframe
  data-tally-src="https://tally.so/embed/mRoDv3?alignLeft=1&hideTitle=1&transparentBackground=1&dynamicHeight=1"
  loading="lazy"
  width="100%"
  height="200"
  frameborder="0"
  marginheight="0"
  marginwidth="0"
  title="Newsletter"></iframe>

Tally.loadEmbeds()

Embeds aren’t loaded by the script alone — call Tally.loadEmbeds() after the script has loaded:
Tally.loadEmbeds();
Embeds in the viewport (or within 500px of its edges) are loaded immediately. The rest are loaded lazily via an IntersectionObserver as they scroll into view.
If you’re rendering embeds in a SPA, see the React and Next.js examples for the correct loading pattern.

Save page URL and query parameters

The widget automatically forwards the host page’s path and query parameters to the embed. To capture them in your submissions, add matching hidden fields to your form. For example, given the page URL:
https://company.com/register?ref=downloads&email=alice@example.com
Hidden fields named originPage, ref, and email will receive the following values:
Hidden fieldValue
originPage/register
refdownloads
emailalice@example.com

Events

Embeds emit JavaScript events when the form is loaded, when the respondent navigates between pages, and when the form is submitted. See Events for the full payload reference.