Install the tracking script
One tag on your site records where every visitor came from and carries it into the forms they fill in. This article covers copying the tag, the three ways to get it onto your pages, and how to prove it is running. If the tag is already live and nothing is arriving, read The script is installed but nothing is arriving instead.
Before you start
Permissions required
You need someone who can edit your site's HTML, or who can publish in your tag manager. Rotating the API Key later needs the workspace admin role.
Note
Your API Key is created the first time a screen asks for it, and opening Script & Deploy is enough. There is nothing to request and nothing to generate.
Copy your tag
Open Tracking Script in the sidebar.
It opens Install & deploy. The page itself is headed Script & Deploy.
Find the card headed CDN Install.
Click Copy tag.
You get a single line: a `<script>` tag whose address ends in your API Key. That key identifies your workspace and is meant to be public — it sits in the page source of every site running the tag.
Paste it into your site
The tag goes in the page head, on every page. Put it on the pages people land on as well as the pages that hold forms, or MarqIQ sees the form fill without the visit that led to it.
Paste the tag immediately before the closing `</head>` tag in your site template.
Publish the template.
Load any page of your site.
Search the page source for the tag.
Note
The tag is marked `async`, so it loads alongside the rest of the page rather than holding it up.
Tip
On WordPress, Webflow, Squarespace or Shopify the head is edited in a settings screen rather than a file. Open WordPress & CMS guide in the sidebar for the steps on each platform.
Or deploy it through Google Tag Manager
MarqIQ can write the tag into your container for you. This needs Pro or above, and is included in the Free Trial.
Open Google Tag Manager in the sidebar.
The form takes an Access Token beginning `ya29.`, your GTM Account ID and your Container ID. Generate the access token at developers.google.com/oauthplayground; the Account ID is in Tag Manager under Admin then Account Settings, at tagmanager.google.com. Container ID accepts either the public `GTM-XXXXXX` code or the numeric one.
Click Connect GTM.
Return to Script & Deploy.
Click Deploy to GTM.
MarqIQ creates a Custom HTML tag in the container's first workspace, firing on the All Pages trigger. A second deploy updates that same tag rather than adding another.
Publish the container in Google Tag Manager yourself.
MarqIQ never publishes your container. Until you publish, the tag sits in the workspace and runs on nothing.
Note
The card on Script & Deploy describes it as a "MarqIQ" tag. In Google Tag Manager the tag is named MP Unified Tracking. Search for that name to find it.
The GTM token expires — paste the refresh token too
You generate the access token yourself and it lasts about an hour. Fill in Refresh Token (optional) as well and MarqIQ renews it for you when Google refuses the old one. That needs renewal switched on for your workspace, and the Google Tag Manager screen says whether it is. Where it is not, connect shortly before you deploy and paste a fresh token if a deploy returns a Google error.
Check that it is running
Click the Script URL link under the tag on Script & Deploy.
The file opens in a new tab. Its first line reads `/ MarqIQ tracking · plan: ... /` and names your plan. Anything else is a fault — see the troubleshooting below.
Submit one of your own forms with a real email address.
MarqIQ refuses a malformed address rather than storing it, so type a real one.
Open Home.
Read Script Capture Quality.
Your test appears under Submissions — last 14 days. Before the first submission the card reads No submissions yet.
Open Setup & diagnostics.
Read the Form capture card.
A working install shows Form submissions marked Ready with the count it was measured on.
Changing settings afterwards
MarqIQ builds the script fresh on each request from your field mapping, your URL rules, Wait for cookie consent and Spot form fills made by programs, then caches it for five minutes. A setting you change in MarqIQ reaches your website in about six minutes.
You never re-paste the tag and you never republish your GTM container for a settings change. The only change that needs a new paste is rotating the key.
The API Key
- The key sits in the API Key card on Script & Deploy, with Copy and Rotate beside it.
- Rotate issues a new key and stops the old one working at once, so every site carrying the old tag goes silent until you paste the new one. Script & Deploy asks you to confirm first.
- The Developer setup guide screen shows the same key beside a refresh icon titled Regenerate API key — old key stops working immediately. That one rotates without asking.
- Only a workspace admin can rotate the key. For anyone else the request is refused and the key on screen stays as it was.
Take care
Rotate the key only when it has been leaked, or when you are cutting off an agency's install. Plan the re-paste for the same hour.
If it did not work
The Script URL opens and reads `/ MarqIQ: invalid token /`
Why: The key in the tag is not a key for any workspace. The usual cause is a rotated key with the old tag still on the site, or a partial copy and paste.
Fix: Go back to Script & Deploy, click Copy tag, and replace the whole line on your site. Copy the tag rather than retyping the key.
The Script URL opens and reads that the subscription has expired, the workspace is read-only, or the workspace is suspended
Why: Capture is stopped at MarqIQ's end, not at yours. The script is withheld until the workspace is in good standing again.
Fix: Open Plan & billing. Nothing needs changing on your website — the same tag starts working again once the workspace does.
Deploy to GTM returns an error from Google
Why: The access token has usually run out. A token from Google's OAuth Playground lasts about an hour; MarqIQ renews it from a stored refresh token where renewal is switched on, and the connect screen says whether it is.
Fix: Generate a fresh token, paste it on the Google Tag Manager screen, and deploy again. MarqIQ shows you the message Google returned. If that message is about permission, check the Tag Manager API is enabled on your Google Cloud project, as the Access Token instructions on that screen describe.
The deploy succeeded but the tag is not firing on the site
Why: MarqIQ creates or updates the tag in your GTM workspace and stops there, by design, so that a person approves what goes live.
Fix: Publish the container in Google Tag Manager. The header on Script & Deploy then shows the version and Live in GTM.
The tag is on the page but no submission ever reaches MarqIQ
Why: There are several causes, and the install is only one of them — consent gating, a content security policy, an ad blocker on your test browser, and a cached page all look identical from here.
Fix: Work through The script is installed but nothing is arriving. It takes them in the order that finds the answer fastest.
Submissions arrive but carry no source
Why: The script fills form inputs by name. If your forms carry no input with a name the script recognises, there is nothing for it to write into.
Fix: Read Which fields the script fills, and what to name them, then add the missing inputs. For HubSpot and Marketo forms, Hidden form fields adds them for you.
Next steps
Related articles
Was this article helpful?