Skip to content
Sealmetrics

    ↑↓ to move · Enter to open · Esc to close

    Docs menu

    Platform Settings · Tracking & Attribution Settings

    Referrer Mappings

    Learn how to map known referrer domains to specific source, medium, and campaign values so traffic from partners, affiliates, or internal domains is attributed correctly in Sealmetrics.

    Referrer Mappings let you assign a specific source, medium, and campaign to traffic that arrives from a known referrer domain. When a visit comes from a domain you have mapped and the URL carries no UTM parameters, Sealmetrics applies the UTM values you configured automatically.

    This is useful for properly attributing traffic from:

    • Partner sites
    • Affiliates
    • Internal domains
    • Any referrer you want to label with a consistent source/medium

    How It Works

    • When traffic comes from a matched referrer without UTM parameters in the URL, the configured UTM values are applied.
    • Existing UTM parameters in the URL are never overwritten. An explicit utm_source/utm_medium/utm_campaign always wins.
    • When several mappings could match, the one with the highest priority is applied first (priority is a 0–1000 scale).

    How to Set It Up

    Mappings are scoped to an account. Create one with your API key:

    bash
    curl -X POST "https://my.sealmetrics.com/api/v1/referrer-mappings?account_id=YOUR_ACCOUNT_ID" \
      -H "X-API-Key: sm_your_key" \
      -H "Content-Type: application/json" \
      -d '{
        "referrer_pattern": "partner-site.com",
        "match_type": "exact",
        "utm_source": "partner-site",
        "utm_medium": "referral",
        "label": "Partner Site Traffic"
      }'

    All management is done through the API:

    • List mappings (GET /referrer-mappings?account_id=...), optionally including inactive ones
    • Create, update, and delete mappings
    • Deactivate a mapping (is_active: false) without deleting it

    See the Referrer Mappings API reference for every endpoint and example. Creating or modifying mappings requires editor-or-higher (write) permissions.


    Match Types

    The Match Type controls how the referrer domain of an incoming visit is compared against your pattern:

    Match typeBehavior
    ExactMatches the domain exactly
    ContainsThe domain contains the pattern
    Starts withThe domain starts with the pattern
    Ends withThe domain ends with the pattern
    RegexThe domain matches a regular expression

    The referrer pattern is normalized when saved: the protocol (http://, https://) and any path are stripped, and the value is lowercased. Enter just the domain.


    Fields Reference

    A referrer mapping stores the following fields:

    FieldRequiredDefaultNotes
    referrer_patternYes—Domain pattern to match (max 255 chars)
    match_typeNoexactOne of exact, contains, starts_with, ends_with, regex
    utm_sourceYes—Source to apply
    utm_mediumNoreferralMedium to apply
    utm_campaignNoemptyCampaign to apply
    utm_termNoemptyTerm to apply
    utm_contentNoemptyContent to apply
    labelNo—Human-readable label
    descriptionNo—Optional description
    priorityNo0Higher priority mappings are checked first (0–1000)
    is_activeNotrueWhether the mapping is applied