Measure

Campaign tracking with Matomo

Newsletter, LinkedIn post or ad: with campaign parameters in the link, Matomo knows where a visit comes from and what it brings. The technology is quickly explained. What really matters is a convention that everyone sticks to.

Matomo recognises on its own whether a visit comes from a search engine, another website or directly. For many channels that is not enough: email programs and apps often pass no origin, a QR code on a poster shows up as a direct visit, and an ad should not count as just any visit from LinkedIn but as exactly this ad. Campaign parameters in the link tell Matomo explicitly where the click comes from.

The parameters in Matomo

A campaign link is a normal link with parameters appended. Only the campaign name is required, the others make the analysis more precise:

Parameter Meaning Example
mtm_campaign Campaign name, required 2026-11_newsletter_matomo-6
mtm_source Source: who delivers the link newsletter, linkedin, google
mtm_medium Medium: the type of channel email, social, cpc, print
mtm_keyword Search term or topic matomo-6
mtm_content Variant or position of the link button-top, teaser-2
mtm_cid Campaign ID from another system 4711
mtm_group Group of several campaigns, Matomo 4 and later autumn-2026
mtm_placement Placement in an ad network, Matomo 4 and later newsfeed

A complete link looks like this:

https://www.example.com/offer/?mtm_campaign=2026-11_newsletter_matomo-6&mtm_source=newsletter&mtm_medium=email&mtm_content=button-top

Matomo also understands the Google Analytics parameters (utm_campaign, utm_source and so on) and the older pk_ parameters. For new links, Matomo recommends the mtm_ prefix. Above all, stick to one family: how Matomo evaluates a link with both utm_ and mtm_ is not documented.

You don’t have to assemble the link by hand. With our URL builder you build it in your browser, and it checks the spelling as you go.

A naming convention that holds

The parameters are quickly explained. Whether campaigns can still be compared a year from now depends on the convention. I recommend these rules:

  • Only lower-case letters, digits and hyphens. No umlauts or accents, no spaces. Matomo converts campaign names and keywords to lower case itself, but don’t rely on that for source and medium.
  • Fixed lists for source and medium. For example newsletter with email, linkedin with social, google with cpc, poster with print. New values are only added by agreement.
  • One pattern for the campaign name. Month, channel and topic has proven useful: 2026-11_newsletter_matomo-6. That keeps campaigns sortable even years later.
  • Variants in mtm_content. Two buttons in the same newsletter are distinguished by content, not by a second campaign name.
  • One person decides on new values. Otherwise newsletter, nl and e-mail will sit side by side within three months.

Typical mistakes

Most problems with campaigns don’t arise in Matomo but in the link itself:

  • Campaign links on your own website. A banner on your home page with campaign parameters sounds harmless. By default, however, Matomo starts a new visit for a campaign link. The real origin is lost and the number of visits goes up. Measure clicks within your website with events.
  • Parameters get lost on the way. Redirects, link shorteners or a page builder sometimes cut them off. Test every link before launch: does the landing page arrive with all parameters?
  • Personal data in the link. Some newsletter tools append email addresses or customer numbers. They belong neither in campaign parameters nor in URLs that Matomo stores. Exclude such parameters in Matomo.
  • Inconsistent values. LinkedIn, linkedin and li are three sources for Matomo. A fixed list prevents this.
  • Two parameter families in the same link. Mixing utm_source and mtm_campaign leads to results that are hard to explain.

Analysing campaigns in Matomo

You find campaigns under Acquisition > Campaigns. Matomo shows names and keywords there with visits, goals and revenue. For reports by source, medium and content you need Matomo’s free plugin Marketing Campaigns Reporting. It ships with recent versions, so check in the plugin administration whether it is activated. It also adds segments for every campaign dimension.

Which campaign gets the conversion? By default, Matomo attributes a goal to the last source that was not a direct visit. If you would rather see the first source, change this in the tracking code or in the Tag Manager’s configuration variable. A model that weights every touchpoint along the way is offered by Matomo as the paid plugin Multi Channel Conversion Attribution.

Two tools from our sister brand help with the analysis:

  • Channel Grouping groups sources and mediums into your own channels, such as newsletter, paid social and partners. That way the report matches how your marketing team plans.
  • Visit Journey shows for every goal, as a flow diagram, which steps came before it in the visit, along with the channel the visit came through. You see what visitors from a campaign do on your website before they convert.

Privacy

The parameters themselves are harmless as long as your convention allows no personal data. Attribution across several visits is more interesting: so that Matomo can still credit a conversion days later to the campaign, it remembers the source for up to six months in the _pk_ref cookie. If you measure without cookies, Matomo recognises returning visitors less often. A campaign then mainly gets the conversions that happen in the same visit.

If you run Matomo in CNIL mode, be aware that according to Matomo the values of utm_ parameters are discarded. The visit still counts as a campaign, but without name and source. One more reason to go with mtm_. Which settings suit your website is described under cookieless & privacy settings.

A convention in a spreadsheet rarely holds for long. Whoever builds a link under time pressure writes from memory, every new agency brings its own spelling, and whether a link works often only shows in the monthly report.

That is what our sister brand built Feinwerk Campaigns for: the convention lives in the link builder, an admin approves new values, and the instant check finds lost parameters, wrong site IDs and expired certificates before the budget runs. With Matomo you also get results per link. How I introduce such a standard with your team and your agencies is described under Introducing campaign governance.

Sources

As of 10 November 2026

FAQ

Frequently asked questions

Should I use utm or mtm parameters?

Matomo understands both. If you only use Matomo, use mtm. If Google Analytics runs in parallel, utm parameters are more practical because both tools read them. Just don't mix the two families in the same link.

Why does my campaign appear in lower case in the report?

Matomo converts campaign names and keywords to lower case when it records them. “Autumn-Sale” and “autumn-sale” therefore end up in the same row. Still, agree that all values are written in lower case, including source and medium.

Why does Matomo count more visits since we use campaign links on our own website?

Because by default a campaign link in an ongoing visit starts a new visit. Campaign links belong on links that lead to your website from outside. Measure clicks within your website with events.

Do I need a plugin for source and medium?

For reports by source, medium and content, yes: Matomo's free plugin Marketing Campaigns Reporting. It ships with recent versions. Check in the plugin administration whether it is activated.

Questions about your setup?

In an intro call we'll look at your situation together.

Book an intro call

Newsletter

Matomo know-how, once a month.

Practical tips on tracking, privacy settings and performance, plus notes on important Matomo updates. No spam, unsubscribe any time.