{"id":13153,"date":"2026-09-25T07:35:00","date_gmt":"2026-09-25T05:35:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/blog\/?p=13153"},"modified":"2026-10-26T12:11:13","modified_gmt":"2026-10-26T11:11:13","slug":"tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/","title":{"rendered":"Tutorial: Agreeing a GTM Naming Convention and Enforcing It on an Existing Container"},"content":{"rendered":"<p>A consistent naming convention makes a large Google Tag Manager container easier to scan, search and review. Names complement folders, element types and the workspace interface; the first word is not the container&#8217;s only organising mechanism. A useful migration keeps measurement behaviour unchanged while making the purpose of each element clearer.<\/p>\n<h2>A small, explicit convention<\/h2>\n<p>One possible scheme uses three segments for tags and two for triggers and user-defined variables. The convention is a project decision, not a GTM requirement. The following example uses shared English prefixes across language versions so that the same checker can validate every example.<\/p>\n<figure style=\"--cbb-digits:2\" class=\"cbb cbb--wrap cbb--numbers wp-block-code-beautifier-block-code\" data-lang=\"plain\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">Text<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" data-cbb-done=\"Copied\" data-cbb-failed=\"Press Ctrl+C to copy\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\" aria-live=\"polite\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\"><code class=\"cbb-code language-plain\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\">GA4 - Event - add_to_cart\n<\/span><span class=\"cbb-line\">Meta - Event - purchase\n<\/span><span class=\"cbb-line\">Ads - Linker - All pages\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\">CE - add_to_cart\n<\/span><span class=\"cbb-line\">PV - checkout\n<\/span><span class=\"cbb-line\">Click - header_cta\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\">DLV - ecommerce.items\n<\/span><span class=\"cbb-line\">JS - item_list\n<\/span><span class=\"cbb-line\">Const - GA4 measurement ID\n<\/span><span class=\"cbb-line\">LT - country_code<\/span><\/code><\/pre><\/figure>\n<p>Here CE means Custom Event, PV means Page View, DLV means Data Layer Variable and LT means Lookup Table. JS denotes a custom JavaScript variable in this convention. These abbreviations need a documented meaning; GTM does not interpret the prefix as an element type.<\/p>\n<p>The separator is consistently <code> - <\/code>. With an alphabetical name sort, shared prefixes bring related names together. Mixed separators reduce consistency but do not destroy sorting. The final segment should preserve a relevant technical identifier such as <code>add_to_cart<\/code>; an unrelated variable need not contain that event name.<\/p>\n<p>Platform first is useful when work is organised by destination. A site-first convention may fit a multi-site container better, but requires corresponding checker rules. The words in a display name do not select the tag template or change the transmitted event. Legacy names such as \u201cGA4 Config\u201d should not be mistaken for current template names. Google&#8217;s 2026 interface changes also mean that fixed menu assumptions can become outdated.<\/p>\n<figure class=\"lw-diagram\"><img src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/dia-13153-gtmnaming-20261025.png\" width=\"1120\" height=\"580\" loading=\"lazy\" decoding=\"async\" alt=\"Nine illustrative tag names before renaming and grouped by a consistent prefix convention afterwards.\"><figcaption>Names support scanning; folders remain available. Renaming still requires a reference and behaviour check.<\/figcaption><\/figure>\n<h2>An audit that checks more than the prefix<\/h2>\n<p>A full export of the intended workspace provides a baseline. A partial export can omit dependencies and is unsuitable as proof of the complete container state. A ContainerVersion contains more than three arrays; this checker deliberately covers only tags, triggers and user-defined variables.<\/p>\n<p>The Python 3 example below is saved as <code>naming-audit.py<\/code>. A permitted prefix alone is insufficient: <code>GA4 - <\/code> fails because the required segments are missing. The checker reads a UI export with <code>containerVersion<\/code> or a direct API ContainerVersion response. Input errors return exit code 2, naming findings return 1, and a completed naming check without findings returns 0.<\/p>\n<figure style=\"--cbb-digits:2\" class=\"cbb cbb--wrap cbb--numbers wp-block-code-beautifier-block-code\" data-lang=\"python\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">Python<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" data-cbb-done=\"Copied\" data-cbb-failed=\"Press Ctrl+C to copy\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\" aria-live=\"polite\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\"><code class=\"cbb-code language-python\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"><span class=\"cbb-keyword\">import<\/span> json\n<\/span><span class=\"cbb-line\"><span class=\"cbb-keyword\">import<\/span> re\n<\/span><span class=\"cbb-line\"><span class=\"cbb-keyword\">import<\/span> sys\n<\/span><span class=\"cbb-line\"><span class=\"cbb-keyword\">from<\/span> pathlib <span class=\"cbb-keyword\">import<\/span> Path\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\"><span class=\"cbb-comment\"># Project convention, not a Google requirement.<\/span>\n<\/span><span class=\"cbb-line\">PREFIXES = {\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-string\">\"tag\"<\/span>: {<span class=\"cbb-string\">\"GA4\"<\/span>, <span class=\"cbb-string\">\"Google\"<\/span>, <span class=\"cbb-string\">\"Meta\"<\/span>, <span class=\"cbb-string\">\"Ads\"<\/span>, <span class=\"cbb-string\">\"LinkedIn\"<\/span>, <span class=\"cbb-string\">\"TikTok\"<\/span>, <span class=\"cbb-string\">\"Other\"<\/span>},\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-string\">\"trigger\"<\/span>: {<span class=\"cbb-string\">\"CE\"<\/span>, <span class=\"cbb-string\">\"PV\"<\/span>, <span class=\"cbb-string\">\"Click\"<\/span>, <span class=\"cbb-string\">\"Form\"<\/span>, <span class=\"cbb-string\">\"Timer\"<\/span>, <span class=\"cbb-string\">\"Visible\"<\/span>, <span class=\"cbb-string\">\"Other\"<\/span>},\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-string\">\"variable\"<\/span>: {<span class=\"cbb-string\">\"DLV\"<\/span>, <span class=\"cbb-string\">\"JS\"<\/span>, <span class=\"cbb-string\">\"Const\"<\/span>, <span class=\"cbb-string\">\"LT\"<\/span>, <span class=\"cbb-string\">\"URL\"<\/span>, <span class=\"cbb-string\">\"Cookie\"<\/span>, <span class=\"cbb-string\">\"Other\"<\/span>},\n<\/span><span class=\"cbb-line\">}\n<\/span><span class=\"cbb-line\">SEGMENTS = {<span class=\"cbb-string\">\"tag\"<\/span>: <span class=\"cbb-number\">3<\/span>, <span class=\"cbb-string\">\"trigger\"<\/span>: <span class=\"cbb-number\">2<\/span>, <span class=\"cbb-string\">\"variable\"<\/span>: <span class=\"cbb-number\">2<\/span>}\n<\/span><span class=\"cbb-line\">REF = re.<span class=\"cbb-function\">compile<\/span>(<span class=\"cbb-string\">r\"\\{\\{(&#91;^{}&#93;+)\\}\\}\"<\/span>)\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\"><span class=\"cbb-keyword\">def<\/span> <span class=\"cbb-function\">audit<\/span>(document):\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-keyword\">if<\/span> <span class=\"cbb-keyword\">not<\/span> <span class=\"cbb-function\">isinstance<\/span>(document, dict):\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-keyword\">raise<\/span> <span class=\"cbb-function\">ValueError<\/span>(<span class=\"cbb-string\">\"Expected a JSON object\"<\/span>)\n<\/span><span class=\"cbb-line\">    version = document.<span class=\"cbb-function\">get<\/span>(<span class=\"cbb-string\">\"containerVersion\"<\/span>, document)\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-keyword\">if<\/span> <span class=\"cbb-keyword\">not<\/span> <span class=\"cbb-function\">isinstance<\/span>(version, dict) <span class=\"cbb-keyword\">or<\/span> <span class=\"cbb-keyword\">not<\/span> version.<span class=\"cbb-function\">get<\/span>(<span class=\"cbb-string\">\"containerId\"<\/span>):\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-keyword\">raise<\/span> <span class=\"cbb-function\">ValueError<\/span>(<span class=\"cbb-string\">\"Expected a container version with containerId\"<\/span>)\n<\/span><span class=\"cbb-line\">    report = {<span class=\"cbb-string\">\"counts\"<\/span>: {}, <span class=\"cbb-string\">\"violations\"<\/span>: &#91;&#93;, <span class=\"cbb-string\">\"references\"<\/span>: &#91;&#93;}\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-keyword\">for<\/span> kind, allowed <span class=\"cbb-keyword\">in<\/span> PREFIXES.<span class=\"cbb-function\">items<\/span>():\n<\/span><span class=\"cbb-line\">        entities = version.<span class=\"cbb-function\">get<\/span>(kind, &#91;&#93;)\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-keyword\">if<\/span> <span class=\"cbb-keyword\">not<\/span> <span class=\"cbb-function\">isinstance<\/span>(entities, list):\n<\/span><span class=\"cbb-line\">            <span class=\"cbb-keyword\">raise<\/span> <span class=\"cbb-function\">ValueError<\/span>(<span class=\"cbb-string\">f\"{kind}: expected an array\"<\/span>)\n<\/span><span class=\"cbb-line\">        report&#91;<span class=\"cbb-string\">\"counts\"<\/span>&#93;&#91;kind&#93; = <span class=\"cbb-function\">len<\/span>(entities)\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-keyword\">for<\/span> index, entity <span class=\"cbb-keyword\">in<\/span> <span class=\"cbb-function\">enumerate<\/span>(entities):\n<\/span><span class=\"cbb-line\">            <span class=\"cbb-keyword\">if<\/span> <span class=\"cbb-keyword\">not<\/span> <span class=\"cbb-function\">isinstance<\/span>(entity, dict):\n<\/span><span class=\"cbb-line\">                <span class=\"cbb-keyword\">raise<\/span> <span class=\"cbb-function\">ValueError<\/span>(<span class=\"cbb-string\">f\"{kind}&#91;{index}&#93;: expected an object\"<\/span>)\n<\/span><span class=\"cbb-line\">            name = entity.<span class=\"cbb-function\">get<\/span>(<span class=\"cbb-string\">\"name\"<\/span>)\n<\/span><span class=\"cbb-line\">            parts = name.<span class=\"cbb-function\">split<\/span>(<span class=\"cbb-string\">\" - \"<\/span>) <span class=\"cbb-keyword\">if<\/span> <span class=\"cbb-function\">isinstance<\/span>(name, str) <span class=\"cbb-keyword\">else<\/span> &#91;&#93;\n<\/span><span class=\"cbb-line\">            valid = (<span class=\"cbb-function\">len<\/span>(parts) == SEGMENTS&#91;kind&#93;\n<\/span><span class=\"cbb-line\">                     <span class=\"cbb-keyword\">and<\/span> parts&#91;<span class=\"cbb-number\">0<\/span>&#93; <span class=\"cbb-keyword\">in<\/span> allowed\n<\/span><span class=\"cbb-line\">                     <span class=\"cbb-keyword\">and<\/span> <span class=\"cbb-function\">all<\/span>(part <span class=\"cbb-keyword\">and<\/span> part == part.<span class=\"cbb-function\">strip<\/span>()\n<\/span><span class=\"cbb-line\">                             <span class=\"cbb-keyword\">and<\/span> <span class=\"cbb-keyword\">not<\/span> <span class=\"cbb-function\">any<\/span>(<span class=\"cbb-function\">ord<\/span>(c) &lt; <span class=\"cbb-number\">32<\/span> <span class=\"cbb-keyword\">for<\/span> c <span class=\"cbb-keyword\">in<\/span> part)\n<\/span><span class=\"cbb-line\">                             <span class=\"cbb-keyword\">for<\/span> part <span class=\"cbb-keyword\">in<\/span> parts))\n<\/span><span class=\"cbb-line\">            <span class=\"cbb-keyword\">if<\/span> <span class=\"cbb-keyword\">not<\/span> valid:\n<\/span><span class=\"cbb-line\">                report&#91;<span class=\"cbb-string\">\"violations\"<\/span>&#93;.<span class=\"cbb-function\">append<\/span>({\n<\/span><span class=\"cbb-line\">                    <span class=\"cbb-string\">\"kind\"<\/span>: kind, <span class=\"cbb-string\">\"id\"<\/span>: entity.<span class=\"cbb-function\">get<\/span>(kind + <span class=\"cbb-string\">\"Id\"<\/span>),\n<\/span><span class=\"cbb-line\">                    <span class=\"cbb-string\">\"index\"<\/span>: index, <span class=\"cbb-string\">\"name\"<\/span>: name,\n<\/span><span class=\"cbb-line\">                })\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-keyword\">def<\/span> <span class=\"cbb-function\">walk<\/span>(value, path):\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-keyword\">if<\/span> <span class=\"cbb-function\">isinstance<\/span>(value, dict):\n<\/span><span class=\"cbb-line\">            <span class=\"cbb-keyword\">for<\/span> key, child <span class=\"cbb-keyword\">in<\/span> value.<span class=\"cbb-function\">items<\/span>():\n<\/span><span class=\"cbb-line\">                <span class=\"cbb-function\">walk<\/span>(child, path + &#91;key&#93;)\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-keyword\">elif<\/span> <span class=\"cbb-function\">isinstance<\/span>(value, list):\n<\/span><span class=\"cbb-line\">            <span class=\"cbb-keyword\">for<\/span> index, child <span class=\"cbb-keyword\">in<\/span> <span class=\"cbb-function\">enumerate<\/span>(value):\n<\/span><span class=\"cbb-line\">                <span class=\"cbb-function\">walk<\/span>(child, path + &#91;index&#93;)\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-keyword\">elif<\/span> <span class=\"cbb-function\">isinstance<\/span>(value, str):\n<\/span><span class=\"cbb-line\">            <span class=\"cbb-keyword\">for<\/span> <span class=\"cbb-keyword\">match<\/span> <span class=\"cbb-keyword\">in<\/span> REF.<span class=\"cbb-function\">finditer<\/span>(value):\n<\/span><span class=\"cbb-line\">                report&#91;<span class=\"cbb-string\">\"references\"<\/span>&#93;.<span class=\"cbb-function\">append<\/span>({\n<\/span><span class=\"cbb-line\">                    <span class=\"cbb-string\">\"path\"<\/span>: path, <span class=\"cbb-string\">\"kind\"<\/span>: <span class=\"cbb-string\">\"braces\"<\/span>, <span class=\"cbb-string\">\"name\"<\/span>: <span class=\"cbb-keyword\">match<\/span>.<span class=\"cbb-function\">group<\/span>(<span class=\"cbb-number\">1<\/span>)\n<\/span><span class=\"cbb-line\">                })\n<\/span><span class=\"cbb-line\">            <span class=\"cbb-keyword\">if<\/span> path <span class=\"cbb-keyword\">and<\/span> path&#91;<span class=\"cbb-number\">-1<\/span>&#93; == <span class=\"cbb-string\">\"tagName\"<\/span>:\n<\/span><span class=\"cbb-line\">                report&#91;<span class=\"cbb-string\">\"references\"<\/span>&#93;.<span class=\"cbb-function\">append<\/span>({\n<\/span><span class=\"cbb-line\">                    <span class=\"cbb-string\">\"path\"<\/span>: path, <span class=\"cbb-string\">\"kind\"<\/span>: <span class=\"cbb-string\">\"tagName\"<\/span>, <span class=\"cbb-string\">\"name\"<\/span>: value\n<\/span><span class=\"cbb-line\">                })\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-function\">walk<\/span>(version, &#91;&#93;)\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-keyword\">return<\/span> report\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\"><span class=\"cbb-keyword\">def<\/span> <span class=\"cbb-function\">main<\/span>():\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-keyword\">if<\/span> <span class=\"cbb-function\">len<\/span>(sys.argv) != <span class=\"cbb-number\">2<\/span>:\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-function\">print<\/span>(<span class=\"cbb-string\">\"Usage: python3 naming-audit.py export.json\"<\/span>, file=sys.stderr)\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-keyword\">return<\/span> <span class=\"cbb-number\">2<\/span>\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-keyword\">try<\/span>:\n<\/span><span class=\"cbb-line\">        document = json.<span class=\"cbb-function\">loads<\/span>(<span class=\"cbb-function\">Path<\/span>(sys.argv&#91;<span class=\"cbb-number\">1<\/span>&#93;).<span class=\"cbb-function\">read_text<\/span>(encoding=<span class=\"cbb-string\">\"utf-8-sig\"<\/span>))\n<\/span><span class=\"cbb-line\">        report = <span class=\"cbb-function\">audit<\/span>(document)\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-keyword\">except<\/span> (OSError, UnicodeError, ValueError) <span class=\"cbb-keyword\">as<\/span> exc:\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-function\">print<\/span>(<span class=\"cbb-string\">f\"Input error: {exc}\"<\/span>, file=sys.stderr)\n<\/span><span class=\"cbb-line\">        <span class=\"cbb-keyword\">return<\/span> <span class=\"cbb-number\">2<\/span>\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-function\">print<\/span>(json.<span class=\"cbb-function\">dumps<\/span>(report, ensure_ascii=<span class=\"cbb-constant\">False<\/span>, indent=<span class=\"cbb-number\">2<\/span>))\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-keyword\">return<\/span> <span class=\"cbb-number\">1<\/span> <span class=\"cbb-keyword\">if<\/span> report&#91;<span class=\"cbb-string\">\"violations\"<\/span>&#93; <span class=\"cbb-keyword\">else<\/span> <span class=\"cbb-number\">0<\/span>\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\"><span class=\"cbb-keyword\">if<\/span> __name__ == <span class=\"cbb-string\">\"__main__\"<\/span>:\n<\/span><span class=\"cbb-line\">    sys.<span class=\"cbb-function\">exit<\/span>(<span class=\"cbb-function\">main<\/span>())<\/span><\/code><\/pre><\/figure>\n<figure style=\"--cbb-digits:1\" class=\"cbb cbb--wrap wp-block-code-beautifier-block-code\" data-lang=\"bash\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">Shell<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" data-cbb-done=\"Copied\" data-cbb-failed=\"Press Ctrl+C to copy\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\" aria-live=\"polite\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\"><code class=\"cbb-code language-bash\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"><span class=\"cbb-function\">python3<\/span> naming-audit.py <span class=\"cbb-keyword\">export<\/span>.json <span class=\"cbb-operator\">&gt;<\/span> naming-report.json<\/span><\/code><\/pre><\/figure>\n<p>The JSON report contains every naming finding and candidate reference with a structured path showing the exact field in the export. JSON is decoded before scanning, so escaped braces can be found. There is no top-30 cutoff. The scan records <code>{{...}}<\/code> and <code>tagName<\/code> strings; literal braces, notes and dynamically constructed names still require interpretation. This is neither a GTM parser nor proof that every dependency resolves.<\/p>\n<p>The naming check also does not verify whether a \u201cDLV\u201d element really uses the Data Layer Variable type, whether a tag is needed, or whether a campaign works. Those questions belong to the substantive review. An old date, unfamiliar name or paused tag is a review signal, not automatic permission to delete.<\/p>\n<h2>References need a separate check<\/h2>\n<p>Trigger assignments use fields such as <code>firingTriggerId<\/code> and <code>blockingTriggerId<\/code>. That does not make every tag rename consequence-free. Sequencing references in <code>setupTag[].tagName<\/code> and <code>teardownTag[].tagName<\/code> also need inspection in the actual export; the field name alone is not a substitute for checking the represented target. Tag display names can additionally enter monitoring metadata.<\/p>\n<p>Variable references use names in double braces, including Custom HTML and custom JavaScript. A UI rename, an API update and an edited JSON import must not be assumed to update all references identically. The proposed process records a list containing each element\u2019s type, ID, old name and new name, performs the rename in an isolated workspace, then checks the resulting export. Any automatic reference updates need confirmation in that result.<\/p>\n<p>A before\/after reference list is useful but insufficient. An unchanged stale name can still be broken; an intentional difference can be valid. A comparison of what the configuration does must also cover trigger conditions, tag parameters, sequencing, consent settings, pause state and code. A global search-and-replace can modify transmitted values or arbitrary code and is not an appropriate rename method.<\/p>\n<h2>Migration and acceptance<\/h2>\n<ol><li>Baseline: full export, container identity and version or workspace.<\/li><li>Convention: agreed prefixes, segment meanings, exceptions and an ID-based rename mapping.<\/li><li>Scope: renaming separated from deletion and functional changes in a dedicated workspace where available.<\/li><li>Synchronisation: resolved workspace conflicts and repeated comparisons after merged changes.<\/li><li>Acceptance: full export review and Preview tests of affected tags, triggers, variables and sequencing.<\/li><li>Publication record: accepted changes documented in the version description.<\/li><\/ol>\n<p>Preview executes the draft on a connected site; test tags can still send real requests. A test environment and appropriate test destinations avoid confusing the rename test with production measurements. A \u201cfired\u201d status alone is not proof of correct data at the destination. The relevant test includes expected parameter values and network requests.<\/p>\n<p>A separate workspace makes review and rollback easier, but container versions form one history. Restoring an older version can also undo later unrelated changes. The intended rollback therefore needs the same dependency awareness as the forward change.<\/p>\n\n\n<!-- lw-flux-illu 13153-a4 -->\n<figure class=\"lw-illu\"><img src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/illustrationen\/flux-13153-a4.webp\" width=\"1120\" height=\"630\" loading=\"lazy\" decoding=\"async\" alt=\"A harp is restrung string by string, with the old strings laid out for comparison. Likewise, a renaming is switched over step by step, and the result is compared with the old state before sign-off.\"><figcaption>A harp is restrung string by string, with the old strings laid out for comparison. Likewise, a renaming is switched over step by step, and the result is compared with the old state before sign-off.<\/figcaption><\/figure>\n\n\n<div class=\"lw-faq\">\n<h2>Questions and answers<\/h2>\n<h3>Are built-in variables included?<\/h3>\n<p>No. Built-in variables such as Page URL are managed separately from user-defined variables and appear under <code>builtInVariable<\/code> in a version. The naming rules do not rename these standard entries. References to built-in variables may still appear in the report.<\/p>\n<h3>Can the check run automatically?<\/h3>\n<p>The API method <code>accounts.containers.versions.live<\/code> returns the published ContainerVersion directly and accepts the <code>tagmanager.readonly<\/code> scope. API enablement, OAuth authorisation and access to the relevant account\/container are required; a service account is one supported approach. Read access avoids granting unnecessary write capabilities, but exports and credentials still need appropriate handling.<\/p>\n<p>The live version does not include unfinished workspace changes. A workspace audit requires the corresponding entity-list endpoints, including all pagination pages, or a full workspace export. A monthly check is an optional cadence; a check before each release is often more useful for enforcing the convention.<\/p>\n<h3>Where should the convention be documented?<\/h3>\n<p>A maintained team document linked from container notes, plus relevant element and version notes, is easier to govern than an artificial tag that must never fire. Exceptions belong in the same documentation and in the checker configuration. Adding a note tag outside the naming rules would otherwise create a finding in every audit.<\/p>\n<\/div>\n<div class=\"lw-quellen\"><h2>Sources<\/h2><ul><li><a href=\"https:\/\/support.google.com\/tagmanager\/answer\/6231791?hl=en\">Google Tag Manager: Folders<\/a><\/li><li><a href=\"https:\/\/support.google.com\/tagmanager\/answer\/6106997?hl=en\">Google Tag Manager: Container export and import<\/a><\/li><li><a href=\"https:\/\/developers.google.com\/tag-platform\/tag-manager\/api\/reference\/rest\/v2\/accounts.containers.workspaces.tags\">Google Tag Manager API: Tag resource, SetupTag and TeardownTag<\/a><\/li><li><a href=\"https:\/\/support.google.com\/tagmanager\/answer\/6107167?hl=en\">Google Tag Manager: Custom tags<\/a><\/li><li><a href=\"https:\/\/support.google.com\/tagmanager\/answer\/7683362?hl=en\">Google Tag Manager: User-defined variable types for web<\/a><\/li><li><a href=\"https:\/\/support.google.com\/tagmanager\/answer\/7059647?hl=en-PK\">Google Tag Manager: Workspaces<\/a><\/li><li><a href=\"https:\/\/support.google.com\/tagmanager\/answer\/6107056?hl=en\">Google Tag Manager: Preview and debug containers<\/a><\/li><li><a href=\"https:\/\/developers.google.com\/tag-platform\/tag-manager\/api\/reference\/rest\/v2\/accounts.containers.versions\">Google Tag Manager API: ContainerVersion resource<\/a><\/li><li><a href=\"https:\/\/developers.google.com\/tag-platform\/tag-manager\/api\/reference\/rest\/v2\/accounts.containers.versions\/live\">Google Tag Manager API: versions.live<\/a><\/li><li><a href=\"https:\/\/developers.google.com\/tag-platform\/tag-manager\/api\/v2\/authorization\">Google Tag Manager API: Authorization<\/a><\/li><li><a href=\"https:\/\/developers.google.com\/tag-platform\/tag-manager\/api\/reference\/rest\/v2\/accounts.containers\">Google Tag Manager API: Container resource<\/a><\/li><li><a href=\"https:\/\/support.google.com\/tagmanager\/answer\/13543899?hl=en\">Google Tag Manager: Announcement \u2014 Google tag and Tag Manager<\/a><\/li><li><a href=\"https:\/\/support.google.com\/tagmanager\/answer\/17079602?hl=en\">Google Tag Manager: Updates to Google tag and Google Tag Manager, 20 August 2026<\/a><\/li><li><a href=\"https:\/\/developers.google.com\/tag-platform\/tag-manager\/api\/reference\/rest\/v2\/accounts.containers.workspaces.tags\/list\">Google Tag Manager API: tags.list and pagination<\/a><\/li><\/ul><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A consistent naming convention complements GTM folders and makes large containers easier to review. A Python audit checks complete name segments and inventories reference candidates; an ID-based migration, export comparison and functional tests cover the rename itself.<\/p>\n","protected":false},"author":1,"featured_media":29404,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[113],"tags":[91144,91267,91219],"class_list":["post-13153","post","type-post","status-publish","format-standard","hentry","category-tutorials","tag-devops","tag-google-tag-manager","tag-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Tutorial: Agreeing a GTM Naming Convention and Enforcing It on an Existing Container | Lukas Wojcik<\/title>\n<meta name=\"description\" content=\"A prefix scheme that survives three hundred tags, auditing the existing container from its export, and the one rename that breaks references.\" \/>\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\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tutorial: Agreeing a GTM Naming Convention and Enforcing It on an Existing Container | Lukas Wojcik\" \/>\n<meta property=\"og:description\" content=\"A prefix scheme that survives three hundred tags, auditing the existing container from its export, and the one rename that breaks references.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-25T05:35:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-26T11:11:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll-13153-13153.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lukas Wojcik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lukas Wojcik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\\\/\"},\"author\":{\"name\":\"Lukas Wojcik\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"Tutorial: Agreeing a GTM Naming Convention and Enforcing It on an Existing Container\",\"datePublished\":\"2026-09-25T05:35:00+00:00\",\"dateModified\":\"2026-10-26T11:11:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\\\/\"},\"wordCount\":1177,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/flux-voll-13153-13153.png\",\"keywords\":[\"DevOps\",\"Google Tag Manager\",\"Tutorial\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\\\/\",\"name\":\"Tutorial: Agreeing a GTM Naming Convention and Enforcing It on an Existing Container | Lukas Wojcik\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/flux-voll-13153-13153.png\",\"datePublished\":\"2026-09-25T05:35:00+00:00\",\"dateModified\":\"2026-10-26T11:11:13+00:00\",\"description\":\"A prefix scheme that survives three hundred tags, auditing the existing container from its export, and the one rename that breaks references.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/flux-voll-13153-13153.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/flux-voll-13153-13153.png\",\"width\":1200,\"height\":630,\"caption\":\"Tutorial: Agreeing a GTM Naming Convention and Enforcing It on an Existing Container\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-analytics\\\/tutorials\\\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorial: Agreeing a GTM Naming Convention and Enforcing It on an Existing Container\"}]},{\"@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\":\"Lukas Wojcik\",\"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\":\"Lukas Wojcik\"},\"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":"Tutorial: Agreeing a GTM Naming Convention and Enforcing It on an Existing Container | Lukas Wojcik","description":"A prefix scheme that survives three hundred tags, auditing the existing container from its export, and the one rename that breaks references.","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\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/","og_locale":"en_US","og_type":"article","og_title":"Tutorial: Agreeing a GTM Naming Convention and Enforcing It on an Existing Container | Lukas Wojcik","og_description":"A prefix scheme that survives three hundred tags, auditing the existing container from its export, and the one rename that breaks references.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-09-25T05:35:00+00:00","article_modified_time":"2026-10-26T11:11:13+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll-13153-13153.png","type":"image\/png"}],"author":"Lukas Wojcik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lukas Wojcik","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/"},"author":{"name":"Lukas Wojcik","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"Tutorial: Agreeing a GTM Naming Convention and Enforcing It on an Existing Container","datePublished":"2026-09-25T05:35:00+00:00","dateModified":"2026-10-26T11:11:13+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/"},"wordCount":1177,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll-13153-13153.png","keywords":["DevOps","Google Tag Manager","Tutorial"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/","name":"Tutorial: Agreeing a GTM Naming Convention and Enforcing It on an Existing Container | Lukas Wojcik","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll-13153-13153.png","datePublished":"2026-09-25T05:35:00+00:00","dateModified":"2026-10-26T11:11:13+00:00","description":"A prefix scheme that survives three hundred tags, auditing the existing container from its export, and the one rename that breaks references.","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll-13153-13153.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll-13153-13153.png","width":1200,"height":630,"caption":"Tutorial: Agreeing a GTM Naming Convention and Enforcing It on an Existing Container"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-analytics\/tutorials\/tutorial-agreeing-a-gtm-naming-convention-and-enforcing-it-on-an-existing-container\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Tutorial: Agreeing a GTM Naming Convention and Enforcing It on an Existing Container"}]},{"@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":"Lukas Wojcik","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":"Lukas Wojcik"},"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\/posts\/13153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"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=13153"}],"version-history":[{"count":4,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/13153\/revisions"}],"predecessor-version":[{"id":26802,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/13153\/revisions\/26802"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/29404"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=13153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=13153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=13153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}