v1.1.0

Tracking Snippet

One script tag that captures UTMs and Meta click IDs, remembers them across your funnel, and passes them to Hermon with every opt-in — no per-platform custom scripts.

What it does

  • Captures UTM parameters and fbclid from the URL, the Meta pixel cookies _fbp / _fbc, the landing page and the referrer.
  • Remembers them in first-party storage on your domain, so they survive multi-step funnels, page reloads and booking pages on a subdomain.
  • Passes them on to your opt-in forms and to Typeform, Cal.com and Calendly links and embeds, so they reach Hermon with the opt-in.

Install

Paste this tag into the <head> of every page in your funnel, replacing the key with your workspace’s public key (it starts with pk_live_).

HTML
<script src="https://cdn.hermon.io/s/v1.js" data-key="pk_live_your_public_key"></script>
Place it before any Typeform, Cal.com or Calendly embed scripts. Embeds read their settings when they load, so the snippet must run first.
The public key is safe to show in your page source. Never put your secret API key (sk_live_) in the browser.

Optional attributes

AttributeDefaultDescription
data-keyrequiredYour workspace public key (starts with pk_live_). Safe to expose in the browser. Without a valid key the snippet stays inactive.
data-expiry-days90How many days captured values are kept in the visitor’s browser (max 730).
data-debugoffSet to "true" to log captured, stored and injected values to the browser console.

Fields sent to Hermon

These are the exact names the snippet uses. Empty values are left out. When you create hidden fields in a page builder, Typeform or Cal.com, use these names.

FieldDescription
utm_sourceTraffic source, e.g. facebook
utm_mediumTraffic medium, e.g. paid
utm_campaignCampaign name
utm_contentAd set / content name
utm_termAd / keyword name
fbclidMeta click ID from the ad URL
fbcMeta click cookie (_fbc). Built from fbclid when the Meta pixel is not on the page
fbpMeta browser cookie (_fbp), when the pixel is present
landing_pageFirst page of the visit
referrerPage the visitor came from
hermon_pkYour public key, so Hermon can verify which workspace captured the data
hermon_uaThe visitor’s browser user agent

First touch and last touch

  • The first touch is recorded on the visitor’s first visit and never changes.
  • The last touch is replaced only when the visitor arrives on a URL that carries utm_* or fbclid. Normal page-to-page navigation does not change it.
  • Hermon receives the last touch, falling back to the first touch. Both are available through hermon.getAttribution().

Where values are passed

DestinationHowWhat it keepsSetup needed
Website formsHidden inputs added to every form that has an email fieldAll fieldsNone (page builders: create the hidden fields)
TypeformAdded after # in links; data-tf-hidden on embedsDeclared hidden fields onlyDeclare the hidden fields
Cal.comQuery parameters on links and data-cal-configutm_* automatically; others via hidden booking questionsHidden booking questions for non-UTM fields
CalendlyQuery parameters on links and inline widgetsutm_* onlyNone

Step-by-step setup per platform: Platform setup.

JavaScript API

For custom forms and single-page apps that send the opt-in themselves.

Browser console / your code
// Stored first-touch and last-touch values
hermon.getAttribution();
// → { public_key, first_touch: {...}, last_touch: {...} }

// Flat map of the fields above, ready to submit with a custom form
hermon.getFields();
// → { utm_source: "facebook", fbclid: "IwAR...", hermon_pk: "pk_live_...", ... }

hermon.debug(true);   // turn on console logging for this session
hermon.version;       // e.g. "1.0.0"

// Safe to call before the script has loaded
window.hermon = window.hermon || [];
hermon.push(function (h) {
  console.log(h.getFields());
});

Check that it works

  • Open your funnel with ?utm_source=test&hermon_debug=1 and open the browser console. You will see what was captured, stored and injected. Debug mode stays on for the browser session; ?hermon_debug=0 turns it off.
  • In production, watch the click ID coverage on the Meta Conversions API health panel in Hermon: the share of opt-ins that arrive with a Meta click ID.

Updates and versions

s/v1.js always serves the latest 1.x release, so fixes reach your pages within minutes without changing your install. Breaking changes ship as a new major version (s/v2.js) and never replace v1. To pin an exact version, use s/1.0.0.js. See the changelog.

Troubleshooting

  • Nothing in the console in debug mode — the tag is missing on that page, or the key is invalid (debug mode prints a warning).
  • Values missing in Typeform or Cal.com — the hidden fields / hidden booking questions are not created with the exact field names.
  • A form inside an iframe from another domain cannot be reached by the snippet. Use that tool’s hidden-field setup.
  • Buttons that navigate with JavaScript instead of a normal link are not decorated. Use an <a href> link or the embed.
  • Content Security Policy — if your site sends a CSP header, allow https://cdn.hermon.io in script-src.
  • Attribution dropped — if the hermon_pk sent with an opt-in belongs to another workspace, Hermon still creates the lead but ignores its traffic data. Check that the key in the tag is your own.
The snippet stores attribution data only and does not fire any ad pixel. Showing a cookie or consent banner where required remains your responsibility.