‹ Back to home

Embed guide

Drop a form onto any site with a single web-component tag.

1. Add the script

<script src="https://forms.higherstack.ca/embed.js" async></script>

2. Place the form

<higherstack-form form-id="your-form-id"></higherstack-form>

Conversion tracking & consent

On submit, the embed automatically captures first-party attribution data from your page — ad click IDs (gclid, fbclid, ttclid, …), utm_* campaign parameters, the page URL and referrer — so submissions can be attributed to campaigns and reported as conversions if you've connected an ad platform.

If your site uses a consent-management platform (CMP), wire its decision through before the visitor submits:

// e.g. in your CMP's onConsentChange callback
window.hsFormsConsent = marketingAllowed ? 'granted' : 'denied';

When set to 'denied', the embed collects no identifiers — no click IDs, cookies, URLs or referrer — only an anonymous event ID used for de-duplication.

Find your form id in the builder under Publish → Embed. The form inherits your theme and posts securely to your backend. Prefer a standalone page? Share /f/your-form-id directly.

Need help? Contact us.