{"id":504,"date":"2026-08-06T15:31:26","date_gmt":"2026-08-06T13:31:26","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/?page_id=504"},"modified":"2026-08-06T16:37:06","modified_gmt":"2026-08-06T14:37:06","slug":"utm-campaign-link-builder-strict-linter","status":"publish","type":"page","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/utm-campaign-link-builder-strict-linter\/","title":{"rendered":"UTM Campaign Link Builder &#038; Strict Linter"},"content":{"rendered":"<div id=\"utm-tool-wrapper\" style=\"max-width: 100%; background: #1e293b; color: #f8fafc; padding: 28px; border-radius: 12px; font-family: system-ui, -apple-system, sans-serif; box-shadow: 0 4px 20px rgba(0,0,0,0.3); border: 1px solid #334155;\">\n<p>    <!-- Privacy Notice Banner --><\/p>\n<div style=\"display: flex; align-items: center; gap: 12px; background: rgba(56, 189, 248, 0.08); border: 1px solid rgba(56, 189, 248, 0.2); padding: 12px 16px; border-radius: 8px; margin-bottom: 24px; font-size: 0.85rem; color: #38bdf8; line-height: 1.4;\">\n        <svg style=\"width: 20px; height: 20px; flex-shrink: 0;\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" viewBox=\"0 0 24 24\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z\"><\/path><\/svg><br \/>\n        <span><strong>Privacy Guarantee:<\/strong> No data entered here is stored on my server or transferred anywhere else. Everything runs 100% locally in your browser.<\/span>\n    <\/div>\n<h3 style=\"margin-top: 0; color: #38bdf8; font-size: 1.25rem; border-bottom: 1px solid #334155; padding-bottom: 12px; margin-bottom: 20px;\">UTM Campaign Link Builder &amp; Strict Linter<\/h3>\n<div style=\"margin-bottom: 16px;\">\n        <label style=\"display: block; font-size: 0.85rem; color: #cbd5e1; margin-bottom: 6px;\">Target Landing Page URL *<\/label><br \/>\n        <input type=\"text\" id=\"utm-url\" placeholder=\"https:\/\/lukaswojcik.com\/tutorials\/ga4-bigquery\/\" style=\"width: 100%; padding: 10px; background: #0f172a; border: 1px solid #475569; color: #fff; border-radius: 6px; box-sizing: border-box;\">\n    <\/div>\n<div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px;\">\n<div>\n            <label style=\"display: block; font-size: 0.85rem; color: #cbd5e1; margin-bottom: 6px;\">utm_source *<\/label><br \/>\n            <input type=\"text\" id=\"utm-src\" placeholder=\"google, newsletter, linkedin\" style=\"width: 100%; padding: 10px; background: #0f172a; border: 1px solid #475569; color: #fff; border-radius: 6px; box-sizing: border-box;\">\n        <\/div>\n<div>\n            <label style=\"display: block; font-size: 0.85rem; color: #cbd5e1; margin-bottom: 6px;\">utm_medium *<\/label><br \/>\n            <input type=\"text\" id=\"utm-med\" placeholder=\"cpc, email, social\" style=\"width: 100%; padding: 10px; background: #0f172a; border: 1px solid #475569; color: #fff; border-radius: 6px; box-sizing: border-box;\">\n        <\/div>\n<div>\n            <label style=\"display: block; font-size: 0.85rem; color: #cbd5e1; margin-bottom: 6px;\">utm_campaign *<\/label><br \/>\n            <input type=\"text\" id=\"utm-cmp\" placeholder=\"summer_sale_2026\" style=\"width: 100%; padding: 10px; background: #0f172a; border: 1px solid #475569; color: #fff; border-radius: 6px; box-sizing: border-box;\">\n        <\/div>\n<\/p><\/div>\n<div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px;\">\n<div>\n            <label style=\"display: block; font-size: 0.85rem; color: #cbd5e1; margin-bottom: 6px;\">utm_term (Optional)<\/label><br \/>\n            <input type=\"text\" id=\"utm-trm\" placeholder=\"cctv+tutorial\" style=\"width: 100%; padding: 10px; background: #0f172a; border: 1px solid #475569; color: #fff; border-radius: 6px; box-sizing: border-box;\">\n        <\/div>\n<div>\n            <label style=\"display: block; font-size: 0.85rem; color: #cbd5e1; margin-bottom: 6px;\">utm_content (Optional)<\/label><br \/>\n            <input type=\"text\" id=\"utm-cnt\" placeholder=\"cta_blue_button\" style=\"width: 100%; padding: 10px; background: #0f172a; border: 1px solid #475569; color: #fff; border-radius: 6px; box-sizing: border-box;\">\n        <\/div>\n<\/p><\/div>\n<p>    <!-- Linter Log Card --><\/p>\n<div id=\"utm-linter-card\" style=\"background: rgba(15, 23, 42, 0.6); border: 1px solid #334155; padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 0.85rem; display: none;\">\n<div style=\"font-weight: 600; color: #38bdf8; margin-bottom: 4px;\">Linter Checks &amp; Enforcements Applied:<\/div>\n<ul id=\"utm-linter-list\" style=\"margin: 0; padding-left: 20px; color: #cbd5e1;\"><\/ul>\n<\/p><\/div>\n<p>    <!-- Output Section --><\/p>\n<div>\n<div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;\">\n            <label style=\"font-size: 0.8rem; color: #94a3b8; text-transform: uppercase; font-weight: 600;\">Validated Campaign URL<\/label><br \/>\n            <button onclick=\"copyUtmText('utm-out', this)\" style=\"background: rgba(71, 85, 105, 0.4); border: 1px solid #475569; color: #cbd5e1; padding: 4px 12px; font-size: 0.75rem; border-radius: 4px; cursor: pointer;\">Copy URL<\/button>\n        <\/div>\n<p>        <textarea id=\"utm-out\" readonly=\"\" rows=\"4\" style=\"width: 100%; padding: 12px; background: #0f172a; border: 1px solid #38bdf8; color: #38bdf8; font-family: monospace; font-size: 0.9rem; border-radius: 6px; box-sizing: border-box;\"><\/textarea>\n    <\/div>\n<\/div>\n<p><script>\nfunction buildUtm() {\n    let url = document.getElementById('utm-url').value.trim();\n    const src = document.getElementById('utm-src').value.trim();\n    const med = document.getElementById('utm-med').value.trim();\n    const cmp = document.getElementById('utm-cmp').value.trim();\n    const trm = document.getElementById('utm-trm').value.trim();\n    const cnt = document.getElementById('utm-cnt').value.trim();<\/p>\n<p>    let linterLogs = [];<\/p>\n<p>    \/\/ Linter rule: Check HTTPS\n    if (url && !url.startsWith('http:\/\/') && !url.startsWith('https:\/\/')) {\n        url = 'https:\/\/' + url;\n        linterLogs.push('Added prefix https:\/\/ to Target URL');\n    }<\/p>\n<p>    const cleanParam = (str, label) => {\n        if (!str) return '';\n        let cleaned = str.toLowerCase();\n        if (str !== cleaned) linterLogs.push(`Enforced lowercase on ${label}`);\n        if (cleaned.includes(' ')) {\n            cleaned = cleaned.replace(\/\\s+\/g, '_');\n            linterLogs.push(`Replaced spaces with underscore in ${label}`);\n        }\n        return encodeURIComponent(cleaned);\n    };<\/p>\n<p>    let params = [];\n    if (src) params.push('utm_source=' + cleanParam(src, 'utm_source'));\n    if (med) params.push('utm_medium=' + cleanParam(med, 'utm_medium'));\n    if (cmp) params.push('utm_campaign=' + cleanParam(cmp, 'utm_campaign'));\n    if (trm) params.push('utm_term=' + cleanParam(trm, 'utm_term'));\n    if (cnt) params.push('utm_content=' + cleanParam(cnt, 'utm_content'));<\/p>\n<p>    let finalUrl = url;\n    if (params.length > 0 && url) {\n        finalUrl += (url.includes('?') ? '&' : '?') + params.join('&');\n    }<\/p>\n<p>    document.getElementById('utm-out').value = finalUrl;<\/p>\n<p>    const listEl = document.getElementById('utm-linter-list');\n    const cardEl = document.getElementById('utm-linter-card');\n    listEl.innerHTML = '';\n    if (linterLogs.length > 0) {\n        linterLogs.forEach(log => {\n            let li = document.createElement('li');\n            li.innerText = log;\n            listEl.appendChild(li);\n        });\n        cardEl.style.display = 'block';\n    } else {\n        cardEl.style.display = 'none';\n    }\n}<\/p>\n<p>document.querySelectorAll('#utm-tool-wrapper input').forEach(el => {\n    el.addEventListener('input', buildUtm);\n});<\/p>\n<p>function copyUtmText(id, btn) {\n    const field = document.getElementById(id);\n    navigator.clipboard.writeText(field.value).then(() => {\n        const oldText = btn.innerText;\n        btn.innerText = 'Copied!';\n        btn.style.color = '#38bdf8';\n        setTimeout(() => btn.innerText = oldText, 1500);\n    });\n}\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Generate GA4 tracking campaign URLs with live linting and strict enforcement of lowercase, URL encoding, and underscores.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":38,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template-tool-base.php","meta":{"footnotes":""},"class_list":["post-504","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>UTM Campaign Link Builder &amp; Strict Linter - Lukas Wojcik - Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/utm-campaign-link-builder-strict-linter\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"UTM Campaign Link Builder &amp; Strict Linter - Lukas Wojcik - Blog\" \/>\n<meta property=\"og:description\" content=\"Generate GA4 tracking campaign URLs with live linting and strict enforcement of lowercase, URL encoding, and underscores.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/utm-campaign-link-builder-strict-linter\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-06T14:37:06+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/utm-campaign-link-builder-strict-linter\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/utm-campaign-link-builder-strict-linter\\\/\",\"name\":\"UTM Campaign Link Builder & Strict Linter - Lukas Wojcik - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"datePublished\":\"2026-08-06T13:31:26+00:00\",\"dateModified\":\"2026-08-06T14:37:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/utm-campaign-link-builder-strict-linter\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/utm-campaign-link-builder-strict-linter\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/utm-campaign-link-builder-strict-linter\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Toolbox\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"UTM Campaign Link Builder &#038; Strict Linter\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"luky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"luky\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"UTM Campaign Link Builder & Strict Linter - Lukas Wojcik - Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/utm-campaign-link-builder-strict-linter\/","og_locale":"en_US","og_type":"article","og_title":"UTM Campaign Link Builder & Strict Linter - Lukas Wojcik - Blog","og_description":"Generate GA4 tracking campaign URLs with live linting and strict enforcement of lowercase, URL encoding, and underscores.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/utm-campaign-link-builder-strict-linter\/","og_site_name":"Lukas Wojcik - Blog","article_modified_time":"2026-08-06T14:37:06+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/utm-campaign-link-builder-strict-linter\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/utm-campaign-link-builder-strict-linter\/","name":"UTM Campaign Link Builder & Strict Linter - Lukas Wojcik - Blog","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"datePublished":"2026-08-06T13:31:26+00:00","dateModified":"2026-08-06T14:37:06+00:00","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/utm-campaign-link-builder-strict-linter\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/utm-campaign-link-builder-strict-linter\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/utm-campaign-link-builder-strict-linter\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Toolbox","item":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/"},{"@type":"ListItem","position":3,"name":"UTM Campaign Link Builder &#038; Strict Linter"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"luky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"luky"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=504"}],"version-history":[{"count":1,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/504\/revisions"}],"predecessor-version":[{"id":8947,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/504\/revisions\/8947"}],"up":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/38"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}