Elementor
Elementor names form fields form_fields[id], which you can't change, so — like Gravity Forms — you populate hidden fields with a [mtk:…] token in the Default Value. The tag replaces it on load, when new content is injected (e.g. a popup opening), and at submit. Needs Elementor Pro (the Form widget is a Pro feature).
Add the tag to your site
Add the loader to your site's <head> on every page. Easiest routes:
- a headers plugin — e.g. WPCode or Insert Headers and Footers → Header, or
- your theme's header (Appearance → Theme File Editor or a child theme's
header.php), or - Elementor's own Custom Code (Elementor → Custom Code → location <head>, on the entire site).
<script src="https://attr.boggsmtk.com/v1/tag.js?k=YOUR_LICENSE_KEY"></script>
Swap YOUR_LICENSE_KEYfor the client's key from the dashboard.
Put it in the <head> directly, not in Google Tag Manager. When GTM is blocked — an ad blocker, a privacy browser, a consent banner the visitor never accepts — nothing inside the container fires, and a tag that lives in GTM never loads. That lead arrives with empty attribution fields. Loaded straight from the <head>, the tag runs whether or not GTM does. A GTM Custom HTML tag on all pages still works if the <head> is genuinely off-limits, but treat it as the fallback, and expect to lose the leads whose browser blocks the container.
Edit the form and add a Hidden field
Edit the page with Elementor, click the Form widget, then in the left panel open Content → Form Fields and click + Add Item. On the new field, set Type to Hidden.
Paste the token into Default Value
On that hidden field:
- Set Default Value to the token, e.g.
[mtk:last.channel]. - Give the Label anything you like (e.g.
mtk_last_channel) — it's only for your reference.
Add one hidden field per value you want to capture. Then click Update to save the page.