Skip to content
Browse all guides

Issue #218 · important

Issue 218

What is this issue?

This issue checks whether canonical URLs contain tracking or marketing parameters (like utm_source, fbclid, or gclid) that should not be part of the canonical version of a page.

A canonical URL passes this check if it:

  • Points to a clean URL without any tracking parameters
  • Contains only the essential URL path and parameters that define the page content

A canonical URL fails if it:

  • Contains UTM parameters (utm_source, utm_medium, utm_campaign, etc.)
  • Contains social media tracking parameters (fbclid, gclid)
  • Contains referral tracking parameters (ref, source)

Example:

  • Passing: <link rel="canonical" href="https://example.com/shoes">
  • Failing: <link rel="canonical" href="https://example.com/shoes?utm_source=facebook&utm_medium=social">

Why does it matter?

Canonical URLs with tracking parameters negatively impact SEO:

  • Duplicate content: Tracking parameters create unique URLs that search engines may index separately from the clean version, causing duplicate content issues.

  • Indexability: URLs with tracking parameters may appear in search results instead of the clean canonical version, confusing users and diluting SEO signals.

  • Crawl budget waste: Search engine crawlers may waste resources crawling and indexing multiple versions of the same page with different tracking parameters.

  • Link equity dilution: Inbound links with tracking parameters may not consolidate properly to the canonical page, reducing ranking potential.

Resolving this issue improves the overall SEO health score by ensuring search engines index the correct, clean version of each page and consolidate all ranking signals to that URL.

How to fix it

  1. Audit all canonical tags on the site. Crawl the entire site and extract canonical URLs from each page. Check each canonical URL for tracking parameters.

  2. Remove tracking parameters from canonical URLs. Ensure the href attribute in the canonical tag contains only the clean, parameter-free URL or only parameters that define the page content (not tracking parameters).

  3. Use clean, absolute URLs in canonical tags. Always use the full absolute URL without any analytics or marketing parameters:

    <link rel="canonical" href="https://example.com/shoes" />
    
  4. Check URL parameters in canonical tags. Be aware that some parameters are legitimate (like ?page=2 for pagination) while others are not. Only remove tracking and marketing parameters.

  5. Verify the fix via re-crawl. After implementing clean canonical URLs, re-crawl the site to confirm that canonical tags no longer contain tracking parameters.

Examples

Example 1: UTM Parameters in Canonical URL

Scenario: A blog post shared on social media with UTM tracking parameters.

Problematic state (failing):

<link
  rel="canonical"
  href="https://example.com/blog/post?utm_source=twitter&utm_medium=social&utm_campaign=spring_sale"
/>

Corrected state (passing):

<link rel="canonical" href="https://example.com/blog/post" />

Example 2: Social Media Tracking Parameter

Scenario: A product page with Facebook click tracking parameter.

Problematic state (failing):

<link
  rel="canonical"
  href="https://example.com/products/shoes?fbclid=IwAR0example"
/>

Corrected state (passing):

<link rel="canonical" href="https://example.com/products/shoes" />

Example 3: Referral Tracking Parameter

Scenario: A landing page with referral source tracking.

Problematic state (failing):

<link
  rel="canonical"
  href="https://example.com/landing?ref=newsletter&source=email"
/>

Corrected state (passing):

<link rel="canonical" href="https://example.com/landing" />

How PixyScan detects this

PixyScan follows a simple detection process to identify canonical URLs with tracking parameters:

  1. HTML parsing: The crawler parses the raw HTML <head> section of each page and locates the first <link rel="canonical"> tag.

  2. Canonical URL extraction: The system extracts the href attribute value from the canonical tag.

  3. URL normalization: The canonical URL is normalized to ensure consistent parsing (resolving relative URLs, normalizing the path).

  4. Parameter analysis: The system parses the query string of the canonical URL and extracts all parameter keys.

  5. Tracking parameter detection: The extracted parameter keys are checked against a list of known tracking and marketing parameters:

    • UTM parameters: utm_source, utm_medium, utm_campaign, utm_term, utm_content
    • Social media parameters: fbclid, gclid
    • Referral parameters: ref, source, from
  6. Issue triggering: An issue is raised if any tracking parameters are found in the canonical URL.

References