{"id":6421,"date":"2024-06-05T18:39:23","date_gmt":"2024-06-05T18:39:23","guid":{"rendered":"https:\/\/lite14.net\/blog\/?p=6421"},"modified":"2024-06-05T18:39:23","modified_gmt":"2024-06-05T18:39:23","slug":"how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager","status":"publish","type":"post","link":"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/","title":{"rendered":"How to use Regex Tables for Advanced Tag Management in Google Tag Manager"},"content":{"rendered":"<div class=\"flex-1 overflow-hidden\">\n<div class=\"react-scroll-to-bottom--css-rbkfi-79elbk h-full\">\n<div class=\"react-scroll-to-bottom--css-rbkfi-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-19\" 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-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=\"be2fbc84-be67-4474-8eb3-0d4596d88fc6\">\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>Using regex tables in Google Tag Manager (GTM) can significantly enhance your ability to manage tags with advanced conditions and mappings. Regex (regular expressions) allows you to create flexible and powerful patterns for matching data. Here\u2019s a detailed guide on how to use regex tables for advanced tag management in GTM:<\/p>\n<div class=\"flex-1 overflow-hidden\">\n<div class=\"react-scroll-to-bottom--css-jvfve-79elbk h-full\">\n<div class=\"react-scroll-to-bottom--css-jvfve-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-21\" 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-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=\"2bbe1359-3609-4fcc-b6cb-e0e6e211aae8\">\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<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 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\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#_1_Access_Google_Tag_Manager\" >\u00a01. Access Google Tag Manager<\/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\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#_2_Enable_Built-In_Variables\" >\u00a02. Enable Built-In Variables<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#_3_Create_a_Regex_Table_Variable\" >\u00a03. Create a Regex Table Variable<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#Example_Regex_Table_Configuration\" >Example Regex Table Configuration:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#_4_Use_the_Regex_Table_Variable_in_a_Tag\" >\u00a04. Use the Regex Table Variable in a Tag<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#Example_for_Google_Analytics_Tag_GA4\" >Example for Google Analytics Tag (GA4):<\/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\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#_5_Test_Your_Setup\" >\u00a05. Test Your Setup<\/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\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#_6_Publish_Your_Changes\" >\u00a06. Publish Your Changes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#Example_Use_Cases_for_Regex_Tables\" >Example Use Cases for Regex Tables:<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#Use_Case_1_Tracking_Specific_Page_Categories\" >Use Case 1: Tracking Specific Page Categories<\/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\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#Use_Case_2_Custom_Event_Tracking_for_Outbound_Links\" >Use Case 2: Custom Event Tracking for Outbound Links<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#Tips_for_Using_Regex_Tables\" >Tips for Using Regex Tables:<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"_1_Access_Google_Tag_Manager\"><\/span>\u00a01. Access Google Tag Manager<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Sign in to Google Tag Manager:<\/strong>\n<ul>\n<li>Navigate to <a href=\"https:\/\/tagmanager.google.com\" target=\"_new\" rel=\"noreferrer noopener\">Google Tag Manager<\/a> and sign in with your Google account.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Select Your Container:<\/strong>\n<ul>\n<li>Choose the container where you want to implement the regex table or create a new one if you don\u2019t have a container set up yet.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_2_Enable_Built-In_Variables\"><\/span>\u00a02. Enable Built-In Variables<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To work effectively with regex tables, you might need certain built-in variables to be enabled.<\/p>\n<ol>\n<li><strong>Navigate to Variables:<\/strong>\n<ul>\n<li>In the GTM workspace, click on <code>Variables<\/code> in the left-hand menu.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Enable Click Variables:<\/strong>\n<ul>\n<li>Click <code>Configure<\/code> under Built-In Variables.<\/li>\n<li>Ensure variables such as <code>Click URL<\/code>, <code>Click Text<\/code>, <code>Page URL<\/code>, and other relevant variables are checked. These will be used as input values in your regex table.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_3_Create_a_Regex_Table_Variable\"><\/span>\u00a03. Create a Regex Table Variable<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Add a New User-Defined Variable:<\/strong>\n<ul>\n<li>Click on <code>New<\/code> under User-Defined Variables.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Choose Variable Type:<\/strong>\n<ul>\n<li>Click <code>Variable Configuration<\/code>.<\/li>\n<li>Select <code>Lookup Table<\/code>.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Configure the Lookup Table:<\/strong>\n<ul>\n<li>Name your variable (e.g., \u201cAdvanced Regex Lookup Table\u201d).<\/li>\n<\/ul>\n<\/li>\n<li><strong>Define Input Variable:<\/strong>\n<ul>\n<li>Select the input variable (e.g., <code>Page URL<\/code> or <code>Click URL<\/code>).<\/li>\n<\/ul>\n<\/li>\n<li><strong>Add Lookup Table Rows:<\/strong>\n<ul>\n<li>Add rows for each regex pattern you want to use. In the <code>Input<\/code> column, enter your regex patterns. In the <code>Output<\/code> column, enter the values you want to map to.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Enable Regex Matching:<\/strong>\n<ul>\n<li>Check the box that says <code>Enable regex matching<\/code>.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Save the Variable:<\/strong>\n<ul>\n<li>Click <code>Save<\/code> to save your regex table variable.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4><span class=\"ez-toc-section\" id=\"Example_Regex_Table_Configuration\"><\/span>Example Regex Table Configuration:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<table>\n<thead>\n<tr>\n<th>Input (Regex Pattern)<\/th>\n<th>Output<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>^\/products\/.*<\/td>\n<td>Products Page<\/td>\n<\/tr>\n<tr>\n<td>^\/services\/.*<\/td>\n<td>Services Page<\/td>\n<\/tr>\n<tr>\n<td>facebook.com<\/td>\n<td>Social Media<\/td>\n<\/tr>\n<tr>\n<td>twitter.com<\/td>\n<td>Social Media<\/td>\n<\/tr>\n<tr>\n<td>instagram.com<\/td>\n<td>Social Media<\/td>\n<\/tr>\n<tr>\n<td>^(?!.<em>yourdomain.com).<\/em>$<\/td>\n<td>External Link<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><span class=\"ez-toc-section\" id=\"_4_Use_the_Regex_Table_Variable_in_a_Tag\"><\/span>\u00a04. Use the Regex Table Variable in a Tag<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Create or Edit a Tag:<\/strong>\n<ul>\n<li>Navigate to <code>Tags<\/code> in the left-hand menu.<\/li>\n<li>Click on <code>New<\/code> to create a new tag or select an existing tag to edit.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Set Up Tag Configuration:<\/strong>\n<ul>\n<li>Click on <code>Tag Configuration<\/code> and select the type of tag you want to configure (e.g., <code>Google Analytics: GA4 Event<\/code> or <code>Universal Analytics<\/code>).<\/li>\n<\/ul>\n<\/li>\n<li><strong>Use the Regex Table Variable:<\/strong>\n<ul>\n<li>In the tag configuration fields, use the regex table variable. For example, you can set the event category, action, or label to use the regex table variable by selecting it from the variable list.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4><span class=\"ez-toc-section\" id=\"Example_for_Google_Analytics_Tag_GA4\"><\/span>Example for Google Analytics Tag (GA4):<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Event Name:<\/strong> <code>page_category<\/code><\/li>\n<li><strong>Event Parameters:<\/strong>\n<ul>\n<li><code>Parameter Name<\/code>: <code>category_name<\/code>, <code>Value<\/code>: <code>{{Advanced Regex Lookup Table}}<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"_5_Test_Your_Setup\"><\/span>\u00a05. Test Your Setup<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Enter Preview Mode:<\/strong>\n<ul>\n<li>Click <code>Preview<\/code> in the GTM workspace to enter preview mode.<\/li>\n<li>Enter your website\u2019s URL in the prompt to open your site with GTM\u2019s debug pane enabled.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Test the Tags:<\/strong>\n<ul>\n<li>Navigate through your website and perform actions that should trigger your tags.<\/li>\n<li>In the GTM debug pane, check that the regex table variable resolves correctly and that the tag fires with the expected values.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Verify in Google Analytics:<\/strong>\n<ul>\n<li>Go to Google Analytics to verify that the events are being tracked correctly.<\/li>\n<li>For GA4, check the <code>Events<\/code> section under <code>Realtime<\/code>.<\/li>\n<li>For Universal Analytics, go to <code>Real-Time<\/code> &gt; <code>Events<\/code>.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"_6_Publish_Your_Changes\"><\/span>\u00a06. Publish Your Changes<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Submit Your Changes:<\/strong>\n<ul>\n<li>Once you\u2019re satisfied with the setup and have thoroughly tested it, click <code>Submit<\/code> in GTM.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Publish Your Container:<\/strong>\n<ul>\n<li>Add a version name and description, then click <code>Publish<\/code> to make your changes live.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Example_Use_Cases_for_Regex_Tables\"><\/span>Example Use Cases for Regex Tables:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"Use_Case_1_Tracking_Specific_Page_Categories\"><\/span>Use Case 1: Tracking Specific Page Categories<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>You want to track different sections of your site, such as product and service pages.<\/p>\n<ol>\n<li><strong>Regex Patterns:<\/strong>\n<ul>\n<li><code>\/products\/.*<\/code> to match any URL under the products section.<\/li>\n<li><code>\/services\/.*<\/code> to match any URL under the services section.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Outputs:<\/strong>\n<ul>\n<li><code>Products Page<\/code><\/li>\n<li><code>Services Page<\/code><\/li>\n<\/ul>\n<\/li>\n<li><strong>Implementation:<\/strong>\n<ul>\n<li>Use these patterns in your regex table and map them to meaningful names.<\/li>\n<li>In your Google Analytics tag, set the event parameter <code>page_category<\/code> to use the regex table variable.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4><span class=\"ez-toc-section\" id=\"Use_Case_2_Custom_Event_Tracking_for_Outbound_Links\"><\/span>Use Case 2: Custom Event Tracking for Outbound Links<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>You want to differentiate between clicks on social media links and other external links.<\/p>\n<ol>\n<li><strong>Regex Patterns:<\/strong>\n<ul>\n<li><code>facebook\\.com<\/code><\/li>\n<li><code>twitter\\.com<\/code><\/li>\n<li><code>instagram\\.com<\/code><\/li>\n<li><code>^(?!.*yourdomain\\.com).*$<\/code> to match any external link not containing your domain.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Outputs:<\/strong>\n<ul>\n<li><code>Social Media<\/code><\/li>\n<li><code>External Link<\/code><\/li>\n<\/ul>\n<\/li>\n<li><strong>Implementation:<\/strong>\n<ul>\n<li>Use these patterns in your regex table.<\/li>\n<li>In your event tracking tag, set a custom event parameter (e.g., <code>link_type<\/code>) to use the regex table variable.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Tips_for_Using_Regex_Tables\"><\/span>Tips for Using Regex Tables:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><strong>Testing Patterns:<\/strong>\n<ul>\n<li>Use tools like <a href=\"https:\/\/regex101.com\" target=\"_new\" rel=\"noreferrer noopener\">regex101.com<\/a> to test and validate your regex patterns before implementing them in GTM. This can help ensure that your patterns are correct and will match the expected input values.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Complex Mappings:<\/strong>\n<ul>\n<li>If you have complex requirements, consider breaking down your regex patterns into simpler ones and using multiple regex tables. This approach can make your setup easier to manage and debug.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Performance Considerations:<\/strong>\n<ul>\n<li>Ensure your regex patterns are efficient. Poorly optimized patterns can slow down your tracking setup, especially if they are applied to high-traffic variables like <code>Page URL<\/code>.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Documentation:<\/strong>\n<ul>\n<li>Keep good documentation of your regex patterns and what they are intended to match. This will help you and others understand the purpose of each pattern and make maintenance easier.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>By following these detailed steps and tips, you can effectively use regex tables in Google Tag Manager to handle advanced tag management scenarios. This will enable more precise and flexible data collection, allowing you to gain deeper insights into user behavior on your website.<\/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<\/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>Using regex tables in Google Tag Manager (GTM) can significantly enhance your ability to manage tags with advanced conditions and mappings. Regex (regular expressions) allows&#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-6421","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 use Regex Tables for Advanced Tag Management 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\/05\/how-to-use-regex-tables-for-advanced-tag-management-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 use Regex Tables for Advanced Tag Management in Google Tag Manager - Lite14 Tools &amp; Blog\" \/>\n<meta property=\"og:description\" content=\"Using regex tables in Google Tag Manager (GTM) can significantly enhance your ability to manage tags with advanced conditions and mappings. Regex (regular expressions) allows...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/\" \/>\n<meta property=\"og:site_name\" content=\"Lite14 Tools &amp; Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-05T18:39:23+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\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/\"},\"author\":{\"name\":\"admin3\",\"@id\":\"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81\"},\"headline\":\"How to use Regex Tables for Advanced Tag Management in Google Tag Manager\",\"datePublished\":\"2024-06-05T18:39:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/\"},\"wordCount\":843,\"publisher\":{\"@id\":\"https:\/\/lite14.net\/blog\/#organization\"},\"articleSection\":[\"Digital Marketing\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/\",\"url\":\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/\",\"name\":\"How to use Regex Tables for Advanced Tag Management in Google Tag Manager - Lite14 Tools &amp; Blog\",\"isPartOf\":{\"@id\":\"https:\/\/lite14.net\/blog\/#website\"},\"datePublished\":\"2024-06-05T18:39:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/lite14.net\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use Regex Tables for Advanced Tag Management 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 use Regex Tables for Advanced Tag Management 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\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/","og_locale":"en_US","og_type":"article","og_title":"How to use Regex Tables for Advanced Tag Management in Google Tag Manager - Lite14 Tools &amp; Blog","og_description":"Using regex tables in Google Tag Manager (GTM) can significantly enhance your ability to manage tags with advanced conditions and mappings. Regex (regular expressions) allows...","og_url":"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/","og_site_name":"Lite14 Tools &amp; Blog","article_published_time":"2024-06-05T18:39:23+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\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#article","isPartOf":{"@id":"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/"},"author":{"name":"admin3","@id":"https:\/\/lite14.net\/blog\/#\/schema\/person\/3fcb0f4c8bd53264d6447eb6a6d36e81"},"headline":"How to use Regex Tables for Advanced Tag Management in Google Tag Manager","datePublished":"2024-06-05T18:39:23+00:00","mainEntityOfPage":{"@id":"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/"},"wordCount":843,"publisher":{"@id":"https:\/\/lite14.net\/blog\/#organization"},"articleSection":["Digital Marketing"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/","url":"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/","name":"How to use Regex Tables for Advanced Tag Management in Google Tag Manager - Lite14 Tools &amp; Blog","isPartOf":{"@id":"https:\/\/lite14.net\/blog\/#website"},"datePublished":"2024-06-05T18:39:23+00:00","breadcrumb":{"@id":"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/lite14.net\/blog\/2024\/06\/05\/how-to-use-regex-tables-for-advanced-tag-management-in-google-tag-manager\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lite14.net\/blog\/"},{"@type":"ListItem","position":2,"name":"How to use Regex Tables for Advanced Tag Management 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\/6421","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=6421"}],"version-history":[{"count":1,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts\/6421\/revisions"}],"predecessor-version":[{"id":6424,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/posts\/6421\/revisions\/6424"}],"wp:attachment":[{"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/media?parent=6421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/categories?post=6421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lite14.net\/blog\/wp-json\/wp\/v2\/tags?post=6421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}