{"id":6455,"date":"2024-06-06T15:44:16","date_gmt":"2024-06-06T15:44:16","guid":{"rendered":"https:\/\/lite14.net\/blog\/?p=6455"},"modified":"2024-06-06T15:44:16","modified_gmt":"2024-06-06T15:44:16","slug":"how-to-set-up-and-use-custom-templates-in-google-tag-manager","status":"publish","type":"post","link":"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/","title":{"rendered":"How to set up and Use Custom Templates in Google Tag Manager"},"content":{"rendered":"<div class=\"flex-1 overflow-hidden\">\n<div class=\"react-scroll-to-bottom--css-xgzit-79elbk h-full\">\n<div class=\"react-scroll-to-bottom--css-xgzit-1n7m0yu\">\n<div class=\"flex flex-col text-sm pb-9\">\n<div class=\"w-full text-token-text-primary\" dir=\"auto\" data-testid=\"conversation-turn-55\" data-scroll-anchor=\"true\">\n<div class=\"py-2 juice:py-[18px] px-3 text-base md:px-4 m-auto md:px-5 lg:px-1 xl:px-5\">\n<div class=\"mx-auto flex flex-1 gap-3 text-base juice:gap-4 juice:md:gap-5 juice:lg:gap-6 md:max-w-3xl lg:max-w-[40rem] xl:max-w-[48rem]\">\n<div class=\"group\/conversation-turn relative flex w-full min-w-0 flex-col agent-turn\">\n<div class=\"flex-col gap-1 md:gap-3\">\n<div class=\"flex flex-grow flex-col max-w-full\">\n<div class=\"min-h-[20px] text-message flex flex-col items-start whitespace-pre-wrap break-words [.text-message+&amp;]:mt-5 juice:w-full juice:items-end overflow-x-auto gap-2\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"e7e53c04-ac0f-4c92-8c42-eb4d3c47fcab\">\n<div class=\"flex w-full flex-col gap-1 juice:empty:hidden juice:first:pt-[3px]\">\n<div class=\"markdown prose w-full break-words dark:prose-invert light\">\n<p>Setting up and using custom templates in Google Tag Manager (GTM) allows you to create reusable, standardized tag and variable configurations. Custom templates enhance flexibility, ensure consistency, and simplify tag management, especially for non-standard implementations or third-party tags not natively supported by GTM. Here\u2019s a step-by-step guide on how to set up and use custom templates in GTM.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#_1_Understanding_Custom_Templates\" >\u00a01. Understanding Custom Templates<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#_2_Create_a_Custom_Tag_Template\" >\u00a02. Create a Custom Tag Template<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#21_Create_the_Tag_Template\" >2.1 Create the Tag Template<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#22_Define_Tag_Configuration\" >2.2 Define Tag Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#23_Write_the_Tag_Code\" >2.3 Write the Tag Code<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#24_Save_and_Publish_the_Template\" >2.4 Save and Publish the Template<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#_3_Use_the_Custom_Tag_Template\" >\u00a03. Use the Custom Tag Template<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#_4_Create_a_Custom_Variable_Template\" >\u00a04. Create a Custom Variable Template<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#41_Create_the_Variable_Template\" >4.1 Create the Variable Template<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#42_Define_Variable_Configuration\" >4.2 Define Variable Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#43_Write_the_Variable_Code\" >4.3 Write the Variable Code<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#44_Save_and_Publish_the_Template\" >4.4 Save and Publish the Template<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#_5_Use_the_Custom_Variable_Template\" >\u00a05. Use the Custom Variable Template<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#_6_Testing_and_Debugging\" >\u00a06. Testing and Debugging<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#_7_Maintain_and_Update_Custom_Templates\" >\u00a07. Maintain and Update Custom Templates<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"_1_Understanding_Custom_Templates\"><\/span>\u00a01. Understanding Custom Templates<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Custom templates in GTM come in two types:<\/p>\n<ol>\n<li><strong>Tag Templates<\/strong>: Define custom tags.<\/li>\n<li><strong>Variable Templates<\/strong>: Define custom variables.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_2_Create_a_Custom_Tag_Template\"><\/span>\u00a02. Create a Custom Tag Template<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"21_Create_the_Tag_Template\"><\/span>2.1 Create the Tag Template<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ol>\n<li><strong>Log in to GTM<\/strong>:\n<ul>\n<li>Go to <a href=\"https:\/\/tagmanager.google.com\/\" target=\"_new\" rel=\"noreferrer noopener\">Google Tag Manager<\/a> and log in with your Google account.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Navigate to Templates<\/strong>:\n<ul>\n<li>In your GTM container, click on the <strong>Templates<\/strong> section in the left-hand menu.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Create a New Tag Template<\/strong>:\n<ul>\n<li>Click on <strong>New<\/strong> under the Tag Templates section.<\/li>\n<li>Click on <strong>Create<\/strong> in the template editor.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4><span class=\"ez-toc-section\" id=\"22_Define_Tag_Configuration\"><\/span>2.2 Define Tag Configuration<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ol>\n<li><strong>Add Tag Fields<\/strong>:\n<ul>\n<li>Click on <strong>Add Field<\/strong> and choose the field type based on the information your tag requires (e.g., text, URL, number).<\/li>\n<\/ul>\n<\/li>\n<li><strong>Configure the Fields<\/strong>:\n<ul>\n<li>For each field, provide a name, label, and any necessary validations (e.g., required, URL validation).<\/li>\n<\/ul>\n<\/li>\n<li><strong>Set Default Values<\/strong>:\n<ul>\n<li>Optionally, set default values for fields to streamline tag setup for users.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4><span class=\"ez-toc-section\" id=\"23_Write_the_Tag_Code\"><\/span>2.3 Write the Tag Code<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ol>\n<li><strong>Open the Code Editor<\/strong>:<\/li>\n<\/ol>\n<ul>\n<li>Click on the <strong>Code<\/strong> tab in the template editor.<\/li>\n<li>Use the provided sandboxed JavaScript environment to write the code that will execute when the tag fires.<\/li>\n<li>For example, if creating a custom remarketing tag, include the script to send data to your remarketing endpoint.<\/li>\n<\/ul>\n<p><strong>2.Write JavaScript for the Tag<\/strong>:<\/p>\n<p><strong>3. Test the Code<\/strong>:<\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>Click on <strong>Preview<\/strong> to test your custom tag code in a sandbox environment.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"24_Save_and_Publish_the_Template\"><\/span>2.4 Save and Publish the Template<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ol>\n<li><strong>Save the Template<\/strong>:\n<ul>\n<li>Once your tag configuration and code are complete, click <strong>Save<\/strong>.<\/li>\n<li>Provide a name and description for your custom template.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Publish the Container<\/strong>:\n<ul>\n<li>Click <strong>Submit<\/strong> in GTM, provide a version name and description, and then click <strong>Publish<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_3_Use_the_Custom_Tag_Template\"><\/span>\u00a03. Use the Custom Tag Template<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Create a New Tag Using the Template<\/strong>:\n<ul>\n<li>Go to the <strong>Tags<\/strong> section and click on <strong>New<\/strong>.<\/li>\n<li>Click on <strong>Tag Configuration<\/strong> and select your custom tag template from the list.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Fill in the Required Fields<\/strong>:\n<ul>\n<li>Enter the necessary information in the fields you defined in the template.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Add Trigger<\/strong>:\n<ul>\n<li>Click on <strong>Triggering<\/strong> and select an appropriate trigger for when the tag should fire.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Save and Publish<\/strong>:\n<ul>\n<li>Save the tag configuration.<\/li>\n<li>Submit and publish the container to make the tag live on your website.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_4_Create_a_Custom_Variable_Template\"><\/span>\u00a04. Create a Custom Variable Template<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"41_Create_the_Variable_Template\"><\/span>4.1 Create the Variable Template<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ol>\n<li><strong>Navigate to Templates<\/strong>:\n<ul>\n<li>In the <strong>Templates<\/strong> section, click on <strong>New <\/strong>under Variable Templates.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"min-h-[20px] text-message flex flex-col items-start whitespace-pre-wrap break-words [.text-message+&amp;]:mt-5 juice:w-full juice:items-end overflow-x-auto gap-2\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"3f84367c-564f-423d-8183-ac815eeea829\">\n<div class=\"flex w-full flex-col gap-1 juice:empty:hidden juice:first:pt-[3px]\">\n<div class=\"markdown prose w-full break-words dark:prose-invert light\">\n<ol start=\"2\">\n<li><strong>Create a New Variable Template<\/strong>:\n<ul>\n<li>Click on <strong>Create<\/strong> in the template editor.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4><span class=\"ez-toc-section\" id=\"42_Define_Variable_Configuration\"><\/span>4.2 Define Variable Configuration<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ol>\n<li><strong>Add Variable Fields<\/strong>:\n<ul>\n<li>Click on <strong>Add Field<\/strong> and choose the field type based on the data your variable needs to collect or generate (e.g., text, number, regex).<\/li>\n<\/ul>\n<\/li>\n<li><strong>Configure the Fields<\/strong>:\n<ul>\n<li>Provide a name, label, and any necessary validations for each field.<\/li>\n<li>Set default values if needed to streamline variable setup for users.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4><span class=\"ez-toc-section\" id=\"43_Write_the_Variable_Code\"><\/span>4.3 Write the Variable Code<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ol>\n<li><strong>Open the Code Editor<\/strong>:\n<ul>\n<li>Click on the <strong>Code<\/strong> tab in the template editor.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Write JavaScript for the Variable<\/strong>:\n<ul>\n<li>Use the provided sandboxed JavaScript environment to write the code that will define the variable\u2019s behavior.<\/li>\n<li>For example, if creating a custom variable to extract a value from the URL, write the necessary code:<\/li>\n<\/ul>\n<div class=\"dark bg-gray-950 rounded-md border-[0.5px] border-token-border-medium\">\n<div class=\"flex items-center relative text-token-text-secondary bg-token-main-surface-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md\"><strong>Test the Code<\/strong>:<\/div>\n<\/div>\n<\/li>\n<li>\n<ul>\n<li>Click on <strong>Preview<\/strong> to test your custom variable code in a sandbox environment.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4><span class=\"ez-toc-section\" id=\"44_Save_and_Publish_the_Template\"><\/span>4.4 Save and Publish the Template<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ol>\n<li><strong>Save the Template<\/strong>:\n<ul>\n<li>Once your variable configuration and code are complete, click <strong>Save<\/strong>.<\/li>\n<li>Provide a name and description for your custom template.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Publish the Container<\/strong>:\n<ul>\n<li>Click <strong>Submit<\/strong> in GTM, provide a version name and description, and then click <strong>Publish<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_5_Use_the_Custom_Variable_Template\"><\/span>\u00a05. Use the Custom Variable Template<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Create a New Variable Using the Template<\/strong>:\n<ul>\n<li>Go to the <strong>Variables<\/strong> section and click on <strong>New<\/strong>.<\/li>\n<li>Click on <strong>Variable Configuration<\/strong> and select your custom variable template from the list.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Fill in the Required Fields<\/strong>:\n<ul>\n<li>Enter the necessary information in the fields you defined in the template.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Save the Variable<\/strong>:\n<ul>\n<li>Save the variable configuration.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_6_Testing_and_Debugging\"><\/span>\u00a06. Testing and Debugging<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Enable Preview Mode<\/strong>:\n<ul>\n<li>In GTM, click on <strong>Preview<\/strong> to enable preview mode.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Verify Custom Tags and Variables<\/strong>:\n<ul>\n<li>Open your website in a new tab with the GTM debug console active.<\/li>\n<li>Verify that custom tags fire correctly and custom variables return expected values.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Use Debugging Tools<\/strong>:\n<ul>\n<li>Utilize browser developer tools and GTM\u2019s built-in debugging tools to troubleshoot any issues.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_7_Maintain_and_Update_Custom_Templates\"><\/span>\u00a07. Maintain and Update Custom Templates<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Regular Updates<\/strong>:\n<ul>\n<li>Regularly review and update your custom templates to ensure they remain compatible with any changes to your website or third-party services.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Documentation<\/strong>:\n<ul>\n<li>Keep detailed documentation for each custom template, including its purpose, configuration options, and any known issues.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>By following these steps, you can effectively set up and use custom templates in Google Tag Manager. Custom templates enhance flexibility, streamline tag and variable management, and ensure consistency across your GTM implementation. Regular testing, updating, and documentation will help maintain the effectiveness and reliability of your custom templates.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Setting up and using custom templates in Google Tag Manager (GTM) allows you to create reusable, standardized tag and variable configurations. Custom templates enhance flexibility,&#8230;<\/p>\n","protected":false},"author":210,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[270],"tags":[],"class_list":["post-6455","post","type-post","status-publish","format-standard","hentry","category-digital-marketing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to set up and Use Custom Templates in Google Tag Manager - Lite14 Tools &amp; 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:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to set up and Use Custom Templates in Google Tag Manager - Lite14 Tools &amp; Blog\" \/>\n<meta property=\"og:description\" content=\"Setting up and using custom templates in Google Tag Manager (GTM) allows you to create reusable, standardized tag and variable configurations. Custom templates enhance flexibility,...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/\" \/>\n<meta property=\"og:site_name\" content=\"Lite14 Tools &amp; Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-06T15:44:16+00:00\" \/>\n<meta name=\"author\" content=\"admin3\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin3\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/\"},\"author\":{\"name\":\"admin3\",\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81\"},\"headline\":\"How to set up and Use Custom Templates in Google Tag Manager\",\"datePublished\":\"2024-06-06T15:44:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/\"},\"wordCount\":839,\"publisher\":{\"@id\":\"https:\/\/lite14.net\/blog\/#organization\"},\"articleSection\":[\"Digital Marketing\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/\",\"url\":\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/\",\"name\":\"How to set up and Use Custom Templates in Google Tag Manager - Lite14 Tools &amp; Blog\",\"isPartOf\":{\"@id\":\"https:\/\/lite14.net\/blog\/#website\"},\"datePublished\":\"2024-06-06T15:44:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/lite14.net\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to set up and Use Custom Templates in Google Tag Manager\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/lite14.net\/blog\/#website\",\"url\":\"https:\/\/lite14.net\/blog\/\",\"name\":\"Lite14 Tools &amp; Blog\",\"description\":\"Email Marketing Tools &amp; Digital Marketing Updates\",\"publisher\":{\"@id\":\"https:\/\/lite14.net\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/lite14.net\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/lite14.net\/blog\/#organization\",\"name\":\"Lite14 Tools &amp; Blog\",\"url\":\"https:\/\/lite14.net\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/lite14.net\/blog\/wp-content\/uploads\/2025\/09\/cropped-lite-logo.png\",\"contentUrl\":\"https:\/\/lite14.net\/blog\/wp-content\/uploads\/2025\/09\/cropped-lite-logo.png\",\"width\":191,\"height\":178,\"caption\":\"Lite14 Tools &amp; Blog\"},\"image\":{\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81\",\"name\":\"admin3\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6a47a48d3f454a7aa919c16c5d03a6b63ff4ecdd1d2405bfba02f09414226574?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6a47a48d3f454a7aa919c16c5d03a6b63ff4ecdd1d2405bfba02f09414226574?s=96&d=mm&r=g\",\"caption\":\"admin3\"},\"url\":\"https:\/\/lite14.net\/blog\/author\/adeyemoemmanuel001\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to set up and Use Custom Templates in Google Tag Manager - Lite14 Tools &amp; 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:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/","og_locale":"en_US","og_type":"article","og_title":"How to set up and Use Custom Templates in Google Tag Manager - Lite14 Tools &amp; Blog","og_description":"Setting up and using custom templates in Google Tag Manager (GTM) allows you to create reusable, standardized tag and variable configurations. Custom templates enhance flexibility,...","og_url":"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/","og_site_name":"Lite14 Tools &amp; Blog","article_published_time":"2024-06-06T15:44:16+00:00","author":"admin3","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin3","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#article","isPartOf":{"@id":"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/"},"author":{"name":"admin3","@id":"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81"},"headline":"How to set up and Use Custom Templates in Google Tag Manager","datePublished":"2024-06-06T15:44:16+00:00","mainEntityOfPage":{"@id":"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/"},"wordCount":839,"publisher":{"@id":"https:\/\/lite14.net\/blog\/#organization"},"articleSection":["Digital Marketing"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/","url":"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/","name":"How to set up and Use Custom Templates in Google Tag Manager - Lite14 Tools &amp; Blog","isPartOf":{"@id":"https:\/\/lite14.net\/blog\/#website"},"datePublished":"2024-06-06T15:44:16+00:00","breadcrumb":{"@id":"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/lite14.net\/blog\/2024\/06\/06\/how-to-set-up-and-use-custom-templates-in-google-tag-manager\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lite14.net\/blog\/"},{"@type":"ListItem","position":2,"name":"How to set up and Use Custom Templates in Google Tag Manager"}]},{"@type":"WebSite","@id":"https:\/\/lite14.net\/blog\/#website","url":"https:\/\/lite14.net\/blog\/","name":"Lite14 Tools &amp; Blog","description":"Email Marketing Tools &amp; Digital Marketing Updates","publisher":{"@id":"https:\/\/lite14.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/lite14.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/lite14.net\/blog\/#organization","name":"Lite14 Tools &amp; Blog","url":"https:\/\/lite14.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lite14.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/lite14.net\/blog\/wp-content\/uploads\/2025\/09\/cropped-lite-logo.png","contentUrl":"https:\/\/lite14.net\/blog\/wp-content\/uploads\/2025\/09\/cropped-lite-logo.png","width":191,"height":178,"caption":"Lite14 Tools &amp; Blog"},"image":{"@id":"https:\/\/lite14.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81","name":"admin3","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lite14.net\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6a47a48d3f454a7aa919c16c5d03a6b63ff4ecdd1d2405bfba02f09414226574?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6a47a48d3f454a7aa919c16c5d03a6b63ff4ecdd1d2405bfba02f09414226574?s=96&d=mm&r=g","caption":"admin3"},"url":"https:\/\/lite14.net\/blog\/author\/adeyemoemmanuel001\/"}]}},"_links":{"self":[{"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts\/6455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/users\/210"}],"replies":[{"embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/comments?post=6455"}],"version-history":[{"count":2,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts\/6455\/revisions"}],"predecessor-version":[{"id":6466,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts\/6455\/revisions\/6466"}],"wp:attachment":[{"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/media?parent=6455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/categories?post=6455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/tags?post=6455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}