MarqIQ
Browse all help topics
How to7 min read

Set up UTM tracking in HubSpot or Marketo, end to end

Last updated 8 October 2026Available onFree TrialProBusinessEnterpriseNeedsHubSpotMarketoA token that can create properties, write to forms and create automations. HubSpot needs crm.schemas.contacts.write, forms and automation on the private app. In Marketo the LaunchPoint role needs Read-Write Schema Custom Field and Read-Write Assets.

The guided setup runs the three things attribution needs, in the order they have to happen: create the tracking properties, put them on your forms as hidden fields, then build the automation that locks in first touch. Each step drives the same operation as its standalone page, so you can run it here or one piece at a time. If you only need the forms done, open Hidden form fields instead.

Before you start

Install the tracking script on your website first. The hidden fields this flow adds stay empty until the script is there to fill them.

HubSpot

You need a connected HubSpot and a token with the crm.schemas.contacts.write, forms and automation scopes. Create or edit the private app at app.hubspot.com/l/private-apps, tick those three under Scopes, save, then reconnect HubSpot in MarqIQ. If your portal cannot create private apps, take a service key from app.hubspot.com/l/service-keys instead — a private app is preferred, because its name appears in a record's change history.

Marketo

You need a connected Marketo whose LaunchPoint role carries Read-Write Schema Custom Field for step 1, Read-Write Assets for steps 2 and 3, and Read-Only Lead throughout. Take the Client ID and Client Secret from Admin, Integration, LaunchPoint, View Details, and the Munchkin ID from Admin, Integration, Munchkin. Marketo has no link to open, because its admin screens sit on your own instance's sign-in host.

Plan required

Source tracking setup is a Tool Operation. It is on Pro, Business and Enterprise, and on the free trial. On Starter the page is not in your menu.

Note

Everything this flow makes is created in your own tool through its public API. The properties, the hidden fields and the workflow are yours, visible in your tool, and editable there afterwards. Two things are made that the three steps do not name. In HubSpot, step 1 also creates the UTM Tracking property group that holds the properties. In Marketo, the campaign is placed in a folder named "MarqIQ", because Marketo refuses a campaign created at the workspace root.

Run the three steps

  1. Open Tool Operations in the sidebar, pick your tool, and open Source Tracking Implementation.

    The page itself is headed Source Tracking Implementation. It is the same page.

  2. Choose HubSpot or Marketo at the top of the page.

    Switching tool resets the run. Finish one tool before you start the other.

  3. Read the field list on step 1, Create UTM fields.

    MarqIQ checks its 17 tracking fields against the real property list in your tool. Nine are Most Recent, eight are First Touch. A field counts as present when its API name matches, or when an existing property's label matches once spaces are turned into underscores — so a property labelled "UTM Source Most Recent" is recognised without being renamed. A tick means the property exists or is already mapped. A cross means it is missing.

  4. Click Create N missing fields.

    The fields are created one at a time and the list is re-checked afterwards. Each one prints its own line, so a refusal names the field it applies to. In HubSpot the properties land in a property group called UTM Tracking.

    When nothing is missing the page says "All tracking fields exist — continue to the forms."

  5. Click Next at the foot of the page to reach step 2, Hidden fields on forms.

    MarqIQ lists the forms in your tool. Use the search box to narrow a long list.

    That button reads Skip for now until the step you are on has succeeded. Either way it moves you on.

  6. Tick the forms that should carry the tracking values.

    Include every form that creates a contact, not only the demo form. Footer newsletter boxes and old landing pages are the two that get missed. One run handles at most 50 forms and the rest of a larger selection is dropped without a warning, so tick 50 at a time.

  7. Tick Also add First Touch fields if you want both sets on the form.

    Leave it clear for the normal setup. The Most Recent set is what the script fills. First touch is written by the workflow in step 3.

  8. Click Add hidden fields to N forms.

    If you selected more than 50, come back to step 2 and run it again for the rest.

  9. Read the result under each form name.

    Each row says how many fields were added, how many were already present, and the exact message your tool returned when one failed.

  10. Click Next at the foot of the page to reach step 3, Tracking workflow.

  11. Click Create Source Tracking Workflow.

    In HubSpot this creates a contact workflow named "[MarqIQ] Source Tracking — Copy Most Recent to First Touch". It enrols a contact when UTM Medium (First Touch) is unknown and UTM Medium (Most Recent) is known, then runs eight Edit record actions copying each Most Recent value into its First Touch counterpart. Re-enrolment is off.

  12. Click Open in HubSpot.

    The workflow is created turned off on purpose, so you read the enrolment and the actions before any contact is touched.

    On Marketo the same link reads Open in Marketo. Beside it, Full authoring detail opens First-touch backfill, which shows every call MarqIQ made.

  13. Switch the workflow on in your own tool.

    The workflow copies nothing until you do this.

You can do these out of order

The numbered circles at the top are clickable, so you can jump to any step. The forward button reads Skip for now until a step has succeeded and Next once it has. A circle turns green when its step has succeeded, so you can come back and finish a run days later.

What you should see at the end

Step 3 finishes with a panel reading "Source tracking is implemented." That means three separate things are true.

  • The tracking properties exist in your tool.
  • The forms you picked carry them as hidden fields.
  • The workflow that copies Most Recent into First Touch has been created.

Take care

The workflow is created turned off. Until you switch it on in your own tool, first touch is not being written for anybody. Check it before you report on the new fields.

What this does not do

The flow works on HubSpot and Marketo. Those are the two connected tools with a form-write API MarqIQ can use. On Salesforce, Pipedrive, Zoho, Dynamics and the rest you map the fields on the tool's own connection page and add the fields to forms yourself.

On Marketo, step 3 creates the campaign in Marketing Activities with the full configuration written into its description, then tries to author the Smart List trigger and the eight flow steps through Adobe's Marketo MCP. Marketo's public REST API cannot author rules or flow steps, and the MCP beta is allowlisted per Munchkin ID, so unless your instance is enrolled you finish those two pieces by hand. Adobe documents the beta and how to ask for access at experienceleague.adobe.com/en/docs/marketo-developer/marketo/mcp-server — the page shows a live connectivity check and the recipe either way.

It does not fill in contacts you already have. New submissions start carrying values as soon as the forms are updated. The records created before that are handled separately on First-touch backfill.

If it did not work

The page says "Connect HubSpot or Marketo first."

Why: No form-capable tool is connected. The flow writes into HubSpot or Marketo and has nothing to write to.

Fix: Connect HubSpot or Marketo on Connected Tools, then reopen Source tracking setup.

A field line reads "✗ UTM Source (Most Recent): …" in the create log

Why: Your tool refused to create that property. The commonest reason is a token without permission to create properties.

Fix: Read the message after the colon — it is your tool's own wording. For HubSpot, add the crm.schemas.contacts.write scope to the private app, reconnect, then click Create N missing fields again.

A form result says the form was built in HubSpot's new form editor

Why: Forms built in the newer editor run on HubSpot's v4 engine. HubSpot's public API blocks writes to them unless HubSpot has allowlisted your account. Those forms carry a new editor badge in the list before you apply.

Fix: Add the hidden fields by hand in HubSpot's form editor, using the names MarqIQ shows on the field list. The script fills them once they exist. You can also ask HubSpot support for v4 Forms API write access. MarqIQ still records the conversion for that form either way.

Marketo forms show "Fields added as a DRAFT"

Why: Marketo edits land in a draft. MarqIQ asks Marketo to approve the draft after adding the fields, and Marketo declined.

Fix: Open the form in Marketo and approve it. The fields are not live on the form until you do.

Step 3 answers with a 403

Why: The HubSpot private-app token does not carry the Automation scope, so HubSpot refuses to create the workflow.

Fix: In HubSpot go to Settings, Integrations, Private Apps, add the Automation scope, reconnect HubSpot in MarqIQ, then click Create Source Tracking Workflow again.

Step 3 says "Workflow already exists"

Why: A workflow with MarqIQ's name is already in your portal. MarqIQ returns it rather than creating a duplicate.

Fix: Click Open in HubSpot to check it. To replace it with the current definition, open First-touch backfill and use Recreate with corrected filters.

You selected 200 forms and only 50 were changed

Why: One run is capped at 50 forms. The rest of the selection is dropped, not queued.

Fix: Run step 2 again with the next batch. The list shows how many tracking fields each form already carries, so you can skip the forms that are already done.

Next steps

Related articles

Was this article helpful?