Install on WordPress or another CMS
WordPress & CMS is a set of copy-and-paste snippets, not a credential. You pick your platform, paste one block of code into that platform’s global head area, and add hidden inputs to your forms. There are two snippets to choose between, and this article tells you which one to take. If your site runs Google Tag Manager, deploy the tag through GTM instead and skip the head editing.
Before you start
Permissions required
You need somebody who can edit your site’s global head area — a WordPress administrator who can edit `functions.php` or add a snippet through WPCode, or the equivalent settings screen on your platform. Nobody needs an admin role in MarqIQ to read the guide.
Plan required
Reading the guide and pasting its snippet works on every plan. Pushing the MarqIQ tag into a container in one click needs Pro or above; on Starter you paste the tag in yourself, which is what this article describes.
Two snippets exist. Pick one.
The WordPress & CMS guide screen carries its own snippet, which fills the eight bare names `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, `entry_url`, `current_url` and `referral_url`. The MarqIQ tag from Script & Deploy fills a different set of thirty-four names, and none of those thirty-four is one of these eight. Running both on one page means two scripts writing into the same form. Choose the route in the first section below and use only that one.
- Edit access to your site template, theme or settings screen.
- The list of forms you want attribution on, and the ability to edit each one.
- Your MarqIQ API Key, only if you are taking the MarqIQ tag route. Opening Script & Deploy creates it.
Choose your route first
Both routes put a script in your site’s head. They differ in what happens afterwards.
| The MarqIQ tag | The guide’s own snippet | |
|---|---|---|
| Where you copy it | Script & Deploy, the CDN Install card, Copy tag | WordPress & CMS guide, the Universal tracking script panel |
| What it is | One `<script src=…>` line ending in your API Key | About thirty lines of inline JavaScript |
| Input names it fills | Thirty-four, listed in Which fields the script fills | Eight, listed further down this page |
| Reaches MarqIQ | Yes — submissions reach the Script Capture Quality strip on Home | No. It writes into your form and stops there |
| Honours Wait for cookie consent | Yes, and it always honours Global Privacy Control and Do Not Track | No. It writes to `sessionStorage` on every page load |
| Refills a form that appears late | Yes — on load, whenever the page changes, and again at submit | No. It fills once, when the page has loaded |
| Settings changes reach the site | In about six minutes, with no re-paste | Never. You edit the snippet by hand |
Take the MarqIQ tag unless your site must not call an external script.
Note
The per-platform steps below tell you where each platform keeps its global head area. That location is the same whichever snippet you paste there.
Open the guide
Open Tracking Script in the sidebar.
Choose WordPress & CMS guide.
The page is headed WordPress & CMS Setup Guide. Reaching it from Integrations works too — the WordPress & CMS card reads View setup guide →, because there is nothing to connect.
Read the panel headed All 8 fields to capture — use these exact names.
Five UTM parameters sit on the left. Three URL fields sit on the right, under URL fields (JS only), because no platform can read them from a query string.
Select your platform from the list on the right.
WordPress plugins are grouped on the left of that list: WPForms, Gravity Forms, Contact Form 7, Elementor and Custom HTML. Everything else sits under Other CMS platforms: Webflow, Squarespace, Wix, Framer and Shopify.
Click Copy on each code block you need.
Selecting a platform collapses the Universal tracking script panel and opens that platform’s steps below the list. Click the panel header to open it again.
Install on WordPress
WordPress has no head settings screen, so the script goes in your theme’s `functions.php` or through a snippet plugin. The guide gives you a ready-made `functions.php` block that hooks the script onto `wp_head`.
Copy the `functions.php` block from your platform’s steps.
It is labelled functions.php — inject tracking script globally under WPForms, Gravity Forms and Elementor, and functions.php — inject script on all pages under Contact Form 7 and Custom HTML. The code inside is the same in both.
Paste it at the end of your child theme’s `functions.php`.
Editing the parent theme means losing the change at the next theme update. If you have no child theme, add the snippet through WPCode instead — the guide names that plugin for this reason.
Save the file.
Load any page of your site.
Search the page source for `utm_source`.
The script is inline, so the whole block appears in the source. Nothing appearing means the hook did not run.
WPForms
Open your form in the WPForms builder.
Drag a Hidden Field into the form for each of the five UTM parameters.
Set each field’s Name to the parameter name.
Use `utm_source`, `utm_medium`, `utm_campaign`, `utm_term` and `utm_content`, spelled exactly.
Open Smart Tags → Query String in Default Value and enter the parameter name.
WPForms reads the value out of the address itself, so these five need no JavaScript at all.
Add three more Hidden Fields named `entry_url`, `current_url` and `referral_url`.
Leave Default Value empty on all three. A Smart Tag cannot read them, because they are not query parameters.
Gravity Forms
Open your form in the Gravity Forms editor.
Add a Hidden field from Advanced Fields for each UTM parameter.
Set each field’s Parameter Name to match the UTM name.
Enter `{get:utm_source}` in Default Value, swapping the key for each field.
Set the Default Value of your `current_url` field to `{embed_url}`.
Gravity Forms fills that one natively. `entry_url` and `referral_url` have no merge tag, so they need the `functions.php` snippet and an empty Default Value.
Contact Form 7
Take care
Contact Form 7 has no tag for a query parameter and none for the page address. All eight values come from the snippet, so the `functions.php` step is not optional here.
Install the free CF7 Hidden plugin.
Recent versions of Contact Form 7 carry a built-in `[hidden]` tag. Where yours does, use it and skip the plugin.
Paste all eight `[hidden]` tags into your form template.
The guide’s block CF7 form template — paste inside the form holds them in the right order.
Add the `functions.php` snippet.
Open the Mail tab on the form.
Paste the eight merge tags into the email body.
The guide’s block CF7 Mail tab — tracking field values holds them. Contact Form 7 sends only what the Mail tab names, so a filled hidden field that is missing here reaches nobody.
Elementor
Edit your form widget in Elementor.
Add a field per UTM parameter and set its type to Hidden.
Set both ID and Name to the UTM name.
Enter `{url_param key="utm_source"}` in Default Value, swapping the key per field.
This tag needs Elementor Pro — the licence for Elementor itself, not a MarqIQ plan. It reads query parameters only.
Add Hidden fields named `entry_url`, `current_url` and `referral_url` with an empty Default Value.
A plain HTML form inside WordPress
Add the `functions.php` snippet.
Copy the block labelled HTML — all 8 hidden fields.
Paste the eight inputs inside your `<form>` element.
The snippet handles all eight in this case, because a hand-built input carries the name you gave it.
Install on Webflow, Squarespace, Wix, Framer or Shopify
Each of these keeps its head area in a settings screen. The guide gives the exact path, and the same Universal tracking script goes into all of them.
| Platform | Where the script goes | What the guide warns about |
|---|---|---|
| Webflow | Project Settings → Custom Code → Head Code, then publish the site | No native URL parameter fields. Add a Text Input, set its type to Hidden, and set the Name attribute for all eight |
| Squarespace | Settings → Developer Tools → Code Injection → Header | Form blocks support no true hidden field. Add a text field per value, set its Field Name — not its label — and hide the lot with the CSS block in Settings → Advanced → Code Injection → Footer |
| Wix | masterPage.js, with Dev Mode switched on from the top bar | Standard Wix forms accept no custom hidden field name. The guide gives Velo code that uses `wix-storage` and matches on Element ID |
| Framer | Site Settings → General → Custom Code, in the End of <head> section | The built-in Form component exposes no hidden input names. Use an Embed block carrying the guide’s full HTML form |
| Shopify | Online Store → Themes → Edit Code, in `layout/theme.liquid` immediately before `</head>`. The hidden inputs go in `templates/page.contact.liquid` | Shopify names its contact inputs `contact[utm_source]`, which the snippet’s selectors do not match as written |
Wix cannot fill referral_url
Velo has no access to `document.referrer`, so `referral_url` stays empty on Wix unless you build a server-side equivalent with Wix HTTP Functions. The guide states this rather than leaving you to find it.
Shopify needs one edit before it works
The guide’s snippet looks for `input[name="utm_source"]`. Shopify’s contact form names that input `contact[utm_source]`, and the two do not match, so nothing is filled. Edit the snippet’s `querySelectorAll` selectors to the `contact[…]` form, or post the form to an endpoint of your own. The guide says so in the note under its Liquid block.
The eight names the guide’s snippet fills
The snippet matches on the input’s `name` attribute and nothing else. An `id`, a `data-` attribute or a wrapper class is not read, so the name has to be exact.
| Name the input this | What it holds | Where it comes from |
|---|---|---|
| utm_source | Where the visit came from | The address, kept in `sessionStorage` for later pages |
| utm_medium | How it reached them | The address, kept in `sessionStorage` |
| utm_campaign | The campaign | The address, kept in `sessionStorage` |
| utm_term | The keyword bought | The address, kept in `sessionStorage` |
| utm_content | Which link inside the campaign | The address, kept in `sessionStorage` |
| entry_url | The first page of this session | Written once, on the first page the snippet runs on |
| current_url | The page the form is on | Read fresh at fill time, never stored |
| referral_url | The address the visitor arrived from | `document.referrer`, written once beside `entry_url` |
Eight names. The MarqIQ tag fills thirty-four different ones and none of these.
How long the values last
`sessionStorage` is per browser tab and is emptied when that tab closes. A visitor who clicks your advert today and returns tomorrow arrives with nothing stored, so the form submits empty values. The MarqIQ tag keeps most-recent values for 7 days and first-touch values for a year, which is the reason to prefer it.
What comes across, and what MarqIQ writes
- The guide’s own snippet sends nothing to MarqIQ. It fills inputs on your page, and whatever your form posts to receives them.
- MarqIQ writes nothing to your site, your theme or your forms. Every block on the guide screen is yours to paste.
- Taking the MarqIQ tag route instead, submissions reach MarqIQ. They appear on Home, in the Script Capture Quality strip and in the Submissions — last 14 days chart beside it, and in the Form capture check on Setup & diagnostics.
- Neither route counts as a connected tool. The WordPress & CMS card on Integrations reads Not connected and stays that way, and it carries no Sync now button, because there is no account to sync.
What the plan cap does
Your plan caps the submissions MarqIQ counts in a calendar month, measured in UTC. Submissions past the cap are still stored, and marked so that usage reporting stays honest — nothing is thrown away when you have a good month. The cap governs the MarqIQ tag route only, because the guide’s own snippet sends MarqIQ nothing to count.
What this does not unlock
The nine analyses — Source truth, Field discipline, Forecast accuracy, Audience health, Lead scoring, Funnel, Form fills, Email and Automations — read records out of a connected CRM or marketing tool. A tracked website feeds none of them on its own. Connect a CRM or a marketing platform — HubSpot, Salesforce, Pipedrive, Zoho CRM, Microsoft Dynamics, Marketo, Pardot (MCAE) and others — to have something to analyse.
Check that it worked
Open one of your own pages with `?utm_source=test&utm_medium=test` on the end of the address.
Navigate to the page holding your form.
Open your browser’s element inspector on one of the hidden inputs.
Read the input’s value.
A filled input reads `test`. An empty one means the name does not match, or the script is not on that page.
Submit the form with a real email address.
Read the record where the form delivers.
With the guide’s snippet that is your inbox, your CRM or your form plugin’s entry list — not MarqIQ. With the MarqIQ tag it is Script Capture Quality on Home as well.
If it did not work
The hidden inputs stay empty on every page
Why: The snippet is not running. On WordPress the usual cause is a `functions.php` edit on a theme that has since updated, or a paste into a file the active theme does not load.
Fix: View the page source and search for `utm_source`. Finding nothing means the script is absent: paste the block again, into your child theme or through WPCode, and reload.
The five UTM inputs fill and the three URL inputs stay empty
Why: Your platform’s own tag filled the UTM values and you never added the script. WPForms Smart Tags, Gravity Forms `{get:…}` and Elementor `{url_param}` all read query parameters and stop there.
Fix: Add the `functions.php` snippet, or your platform’s head snippet, and leave Default Value empty on `entry_url`, `current_url` and `referral_url`.
Values arrive on the first page and vanish after the visitor clicks through
Why: The snippet keeps values in `sessionStorage`, which is per tab. A visitor who opens a link in a new tab, or returns the next day, starts with nothing.
Fix: Install the MarqIQ tag from Script & Deploy instead. It keeps most-recent values for 7 days and first-touch values for a year.
Contact Form 7 fills the fields but the email shows nothing
Why: Contact Form 7 sends only the tags named in the Mail tab. A filled hidden field that is not in the mail template reaches nobody.
Fix: Open the Mail tab and paste the eight merge tags from the guide’s CF7 Mail tab — tracking field values block into the email body.
Nothing fills on a Shopify contact form
Why: Shopify names its inputs `contact[utm_source]`. The snippet looks for `input[name="utm_source"]`, and the two never match.
Fix: Edit each `querySelectorAll` selector in the snippet to the `contact[…]` form before you paste it into `theme.liquid`, or post the form to an endpoint of your own.
`referral_url` is always empty on Wix
Why: Velo has no access to `document.referrer`. This is a Wix limit, not a fault in the code.
Fix: Leave the field out, or build the equivalent with Wix HTTP Functions. Every other field works as written.
The Squarespace fields are filled and visible to visitors
Why: Squarespace form blocks offer no true hidden field, so the guide has you add ordinary text fields and hide them afterwards.
Fix: Paste the CSS block from the guide into Settings → Advanced → Code Injection → Footer, inside a `<style>` element. Check the Field Name on each field matches the CSS exactly.
A form inside a pop-up or a modal is never filled
Why: The guide’s snippet fills once, when the page has finished loading. A form drawn afterwards has no inputs to fill at that moment, and nothing runs again.
Fix: Install the MarqIQ tag instead. It fills on load, again whenever the page changes, and once more as the form is submitted.
Values are captured although the visitor refused cookies
Why: The guide’s snippet writes to `sessionStorage` the moment it runs and reads no consent signal. Wait for cookie consent governs the MarqIQ tag, not this code.
Fix: Move to the MarqIQ tag and switch on Wait for cookie consent on Script & Deploy, or gate the snippet behind your own banner before you paste it.
The MarqIQ tag is on the site and the hidden inputs are still empty
Why: The eight bare names on the guide screen are not among the thirty-four the MarqIQ tag fills. Both scripts are correct and they speak different names.
Fix: Rename the inputs to the names in Which fields the script fills — `utm_source_most_recent` in place of `utm_source`, `first_utm_source` for the first touch, and so on. Field mapping does not help here: it maps MarqIQ fields onto properties in a connected CRM or marketing platform, and WordPress & CMS has no properties to pick from.
The WordPress & CMS card offers no Connect button
Why: There is nothing to connect. Tools in the Forms & Website group are setup guides, so the card reads View setup guide → by design.
Fix: Open the card and work through your platform’s steps. Nothing is stored in MarqIQ and nothing counts against your plan’s tool allowance.
Next steps
Related articles
Was this article helpful?