← Attribution docs
Install guide
Other platforms
MTK Attribution works on any site that renders a real form in the page. The method is always the same two ideas: load the tag, then point a few hidden fields at your attribution data — either by naming the field, or by dropping a [mtk:…] token into its default value.
1
Load the tag on every page
Paste the loader into the site's <head>, or add it as a Custom HTML tag in Google Tag Manager firing on all pages.
<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.
2
Add hidden fields — pick whichever your platform allows
Two interchangeable ways to populate a field:
- By name — if the platform lets you set a field's
nameattribute, name it the HTML Name from your field map (e.g.mtk_first_source). The tag fills it and pushes it to the dataLayer under that name. - By token— if you can't control the name (most hosted builders), paste the
[mtk:…]token into the field's default value. The tag replaces it on load and at submit.
3
Publish and verify
Publish, then land on the page with a test URL like ?utm_source=googleads&utm_medium=cpc, submit the form, and confirm the values arrive where the platform stores submissions.
Notes for specific platforms
- HubSpot Forms
- In the form editor add a Hidden field and set its default value to the
[mtk:…]token. Use the inline (non-iframe) embed so the tag can reach the fields. - Shopify
- Add the tag in theme.liquid(or via GTM). On contact / newsletter forms, add a hidden input named to the field-map key, or drop the token into a hidden field's value.
- Contact Form 7 / WPForms
- WPForms: add a Hidden field and put the
[mtk:…]token in its Default Value. Contact Form 7 pastes hidden inputs straight into the form template, with a wrinkle worth reading first — see the dedicated Contact Form 7 guide. Load the tag via GTM or a headers plugin either way. - Typeform & embedded iframes
- Forms inside a cross-origin iframecan't be read from the parent page. Use a native/inline form, or a
postMessagebridge — the standard tag can't reach across the iframe. - Plain / Custom HTML
- Add a hidden input and set its
nameto the field-map key (e.g.<input type="hidden" name="mtk_first_source">), or put the token in itsvalue. For JS-built forms that post their own payload, see the dedicated Custom HTML guide.
Rule of thumb: if the form renders as real fields in the page (not a cross-origin iframe) and you can add a hidden field, the tag can populate it. Tokens and names both come from Dashboard → license → Tag config → Field map. Stuck? Troubleshooting.