Install on your site

One script tag connects a website to your workspace. Once it is on the site:

  • Your forms can be placed anywhere on the site, keeping their design, steps and spam protection.
  • The forms the site already has are captured automatically, with no ids or edits needed. Contact Form 7, WPForms, Gravity Forms, Elementor, Webflow, HubSpot and plain HTML forms all work.
  • Page views, form starts, abandons, clicks and conversions are recorded, with campaign attribution.

1. Copy your snippet

In the dashboard, open Install for the workspace. Copy the snippet; it looks like this:

<script async src="https://<your app address>/embed/v1.js" data-site="site_…"></script>

The site_… key is public, like an analytics ID. It only works on the domains verified for the workspace.

2. Add it to every page

Paste it into the <head> of every page, or use the guide for your platform:

The Install screen shows when the script has been seen on your domain.

3. Place a form

Put this where the form should appear. Replace the id with your form's id from its Share screen:

<div data-uniform="frm_…"></div>

From JavaScript, after the script has loaded:

window.uniforms.render("#signup", "frm_…");

Leave a form or field out

Add data-uniform-ignore to a <form> or a field and it is never read. You can also switch any captured form off in the dashboard.

Some fields are never read, whatever the setting: passwords, card details, hidden fields, file uploads, and security tokens.

Name a captured form yourself

Captured forms are recognised and named automatically. To choose the name, add data-uniform-form="newsletter" to the <form>.

Custom events

Mark any element to record a click on it:

<a href="/pricing" data-uniform-event="pricing_clicked">See pricing</a>

Or call the script from your own code:

window.uniforms.track("video_played");
window.uniforms.conversion("trial_started", { value: 49, currency: "USD" });

What is recorded

Page views (including single-page apps), forms seen, started, submitted and left unfinished (which field, never its value), phone, email, outbound and download clicks, and your own events. They're counted per day on the Site tracking screen. Nothing a visitor types is part of an event.

Send events to your analytics tools

On Site tracking, add the id of Google Analytics 4, Google Tag Manager, Meta Pixel, Microsoft Clarity or Plausible. Events are passed to the tool using its standard names (for example generate_lead in Google Analytics and Lead in Meta). Switch on Load its tag if my site doesn't to have the script add the tool for you.

For Google Analytics you can also add a Measurement Protocol API secret (Admin, Data streams, your stream, Measurement Protocol API secrets). Confirmed leads are then sent from our server too, so ad blockers and pages that navigate away don't lose them. The secret is stored encrypted and never shown again. Leads are sent as generate_lead, so don't also call uniforms.conversion() for the same form.

React to a submission

Every embedded form fires a uniforms:submit event on the page when it is sent, so you can show your own message or fire another tool's tag:

document.addEventListener("uniforms:submit", (event) => {
  console.log(event.detail.formId, event.detail.submissionId);
});

Hosted form pages

When the service serves public forms from its own address, Google Analytics, Meta Pixel, Microsoft Clarity and Plausible also run on your hosted form pages (/f/…): they load there and receive form views, submissions and leads. Google Tag Manager works on your own website only, not on hosted pages. Hosted pages have no cookie banner of their own, so connect only tools you may load without one for your visitors.

Cookie consent

Add data-consent="wait" to the script tag to record nothing about the visitor (no visitor id, page views or events) until your cookie banner calls:

window.uniforms.consent(true);

Embedded forms still work before consent.

Limits

  • Forms inside another company's iframe (an embedded Typeform, Google Form or Calendly, for example) can't be read by any script on your page.
  • If the site sends a strict Content-Security-Policy, allow your app address in script-src, frame-src and connect-src.
  • Caching and optimization plugins that "delay JavaScript" hold the script back until the visitor interacts. Exclude embed/v1.js from that setting.