UTM links to a Magento 2 CMS campaign page. Which URL should be canonical?

2 min read

Four silver address strips with navy and lavender accents point towards one page

A newsletter, social post and ad can lead to the same CMS page with different UTM parameters. Keep the parameters on the inbound campaign links. If all variants display the same content in the same language, set the accessible page’s full URL without campaign parameters as canonical. Google Analytics campaign parameters.

Set the preferred address in the CMS

Save the intended HTTPS address in the CMS page’s Canonical URL field. In the local test, version 1.0.2 included UTM parameters when they were saved as part of the full URL. Set the preferred value explicitly. Kowal Canonical Custom Page. Module documentation.

Compare the responses for four addresses

The local test opened one CMS page through four incoming addresses. Each returned the same content with HTTP 200, no Location header, and one rel="canonical" in the source. The canonical declares a preferred address in HTML and the browser stays on the URL the customer opened.

Four addresses at https://shop.example
EntryPath and queryHTTPCanonical
Base URL/sale200https://shop.example/sale
Newsletter/sale?utm_source=newsletter&utm_medium=email&utm_campaign=winter200https://shop.example/sale
LinkedIn/sale?utm_source=linkedin&utm_medium=social&utm_campaign=winter200https://shop.example/sale
Ad/sale?utm_source=ads&utm_medium=cpc&utm_campaign=winter200https://shop.example/sale

After refreshing the cache, open all four URLs. Check the headers, content, language and the single canonical link in the head. Then open the target and verify that it returns the same content and points to itself. If parameters change the content, assess those URLs separately. Google uses canonical as a signal when choosing a URL. Google Search Central.

For canonical mappings on custom routes, see the earlier CMS guide.

Previous Next

KOWAL.BLOG

Choose your language

Available versions open the corresponding page. More languages are being prepared.

English (UK) Français Deutsch Español Italiano Português Nederlands Svenska Dansk Norsk Suomi Lietuvių Latviešu Eesti Čeština Slovenčina Magyar Română Български Ελληνικά Slovenščina Hrvatski Polski English (US)