MarqIQ
Browse all help topics
How to13 min read

Install on WordPress or another CMS

Last updated 25 September 2026Available onStarterFree TrialProBusinessEnterpriseThe catalogue lists WordPress & CMS under Starter, so every plan has it. There is no login, no token and no connection: the card on Integrations reads View setup guide → rather than Connect →, and this tool never uses one of your plan’s connected-tool slots. Your plan caps the form submissions MarqIQ counts in a month — 10,000 on Starter and the trial, 100,000 on Pro, 500,000 on Business.

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 tagThe guide’s own snippet
Where you copy itScript & Deploy, the CDN Install card, Copy tagWordPress & CMS guide, the Universal tracking script panel
What it isOne `<script src=…>` line ending in your API KeyAbout thirty lines of inline JavaScript
Input names it fillsThirty-four, listed in Which fields the script fillsEight, listed further down this page
Reaches MarqIQYes — submissions reach the Script Capture Quality strip on HomeNo. It writes into your form and stops there
Honours Wait for cookie consentYes, and it always honours Global Privacy Control and Do Not TrackNo. It writes to `sessionStorage` on every page load
Refills a form that appears lateYes — on load, whenever the page changes, and again at submitNo. It fills once, when the page has loaded
Settings changes reach the siteIn about six minutes, with no re-pasteNever. 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

  1. Open Tracking Script in the sidebar.

  2. 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.

  3. 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.

  4. 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.

  5. 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`.

  1. 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.

  2. 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.

  3. Save the file.

  4. Load any page of your site.

  5. 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

  1. Open your form in the WPForms builder.

  2. Drag a Hidden Field into the form for each of the five UTM parameters.

  3. Set each field’s Name to the parameter name.

    Use `utm_source`, `utm_medium`, `utm_campaign`, `utm_term` and `utm_content`, spelled exactly.

  4. 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.

  5. 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

  1. Open your form in the Gravity Forms editor.

  2. Add a Hidden field from Advanced Fields for each UTM parameter.

  3. Set each field’s Parameter Name to match the UTM name.

  4. Enter `{get:utm_source}` in Default Value, swapping the key for each field.

  5. 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.

  1. 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.

  2. 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.

  3. Add the `functions.php` snippet.

  4. Open the Mail tab on the form.

  5. 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

  1. Edit your form widget in Elementor.

  2. Add a field per UTM parameter and set its type to Hidden.

  3. Set both ID and Name to the UTM name.

  4. 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.

  5. Add Hidden fields named `entry_url`, `current_url` and `referral_url` with an empty Default Value.

A plain HTML form inside WordPress

  1. Add the `functions.php` snippet.

  2. Copy the block labelled HTML — all 8 hidden fields.

  3. 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.

PlatformWhere the script goesWhat the guide warns about
WebflowProject Settings → Custom Code → Head Code, then publish the siteNo native URL parameter fields. Add a Text Input, set its type to Hidden, and set the Name attribute for all eight
SquarespaceSettings → Developer Tools → Code Injection → HeaderForm 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
WixmasterPage.js, with Dev Mode switched on from the top barStandard Wix forms accept no custom hidden field name. The guide gives Velo code that uses `wix-storage` and matches on Element ID
FramerSite Settings → General → Custom Code, in the End of <head> sectionThe built-in Form component exposes no hidden input names. Use an Embed block carrying the guide’s full HTML form
ShopifyOnline 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 thisWhat it holdsWhere it comes from
utm_sourceWhere the visit came fromThe address, kept in `sessionStorage` for later pages
utm_mediumHow it reached themThe address, kept in `sessionStorage`
utm_campaignThe campaignThe address, kept in `sessionStorage`
utm_termThe keyword boughtThe address, kept in `sessionStorage`
utm_contentWhich link inside the campaignThe address, kept in `sessionStorage`
entry_urlThe first page of this sessionWritten once, on the first page the snippet runs on
current_urlThe page the form is onRead fresh at fill time, never stored
referral_urlThe 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

  1. Open one of your own pages with `?utm_source=test&utm_medium=test` on the end of the address.

  2. Navigate to the page holding your form.

  3. Open your browser’s element inspector on one of the hidden inputs.

  4. 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.

  5. Submit the form with a real email address.

  6. 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?