The RegEx table variable applies wildcard patterns to the URL of a site page - when a URL matches one of the patterns, it resolves the variable to a specified clean value. Calling the variable in the Resonate tag on every page load will send through a clean name for every page.
This is the most efficient way to manually map a reasonable number of site sections and pages to easy-to-understand names and have those pass through into Resonate.
We will guide you with the steps below to create custom RegEx tables which will then be entered as RegEx Variables in GTM.
We will use the Resonate Corporate site pages to provide examples on how to create RegEx Table custom variables in Google Tag Manager that map specific URL patterns to clean names.
Resonate Corporate Site
Tier 1 Pages: (Platform, Solutions, Markets, Resources, About, Post-Cookie)
Before deploying to Google Tag Manager, we recommend that you create Regex Tables like the examples in the Regex Table for Tier 1 Navigation and Regex Table for Tier 2 Navigation sections, to define the page URLs, their corresponding Regex pattern, and the Output Name. The Output Name will be the meaningful name for the site page(s) you wish to see in your Resonate ignite platform under your Site Tags. You should create a Regex Table to group all URL pages that you wish to define in a separate category.
Regex Table for Tier 1 Navigation
We will provide the following two examples; please select the appropriate example dependent on your site. As a reminder, it is always valuable to include the Home Page in your Tier 1 Regex Table.
Example1: Our Resonate site does not have a URL path for each of the Tier1 sections (e.g., resonate.com/platforms). Instead, each Tier2 page within a Tier1 section has its own URL path (e.g., resonate.com/how-it-works).
Therefore, the Tier1 Category - Platform will group the URLs of all the Tier 2 pages (Ignite Platform, Our Data, Connected Profiles, U.S. Consumer Study) into the Output Name of Platform. Similarly, the Tier1 Category - Markets will group all Tier 2 pages (Brands, Agencies, Media & Entertainment, Politics & Advocacy) into the Output Name of Markets. The REGEX Variables table is named "REGEX Tier1 Categories".
You may choose a different method of grouping and that would be fine. You would group all the URLs, PATTERNS, and OUTPUT NAME in one table and save it that way in GTM.
We will build out the Regex table, in the example below, only for Tier1 Platform & Marketing sections: in our site we click on the Tier 2 page below the Each section, copy the URL to our table, create the REGEX Pattern, and select the Output Name we wish to see under TAGS in our Resonate ignite Platform. We include the Home page as well to track.
Tier1 Platform (grouping Tier2 URLs)
Tier1 Markets (grouping Tier2 URLs)
REGEX Tier1 Categories
URL |
PATTERN |
OUTPUT NAMES |
https://www.resonate.com/ |
.*resonate\.com\/$ |
Home Page |
https://www.resonate.com/resonate-ignite-platform/ |
.*resonate\.com\/resonate-ignite-platform.* |
Platform |
https://www.resonate.com/how-it-works/ |
.*resonate\.com\/how-it-works.* |
Platform |
https://www.resonate.com/connected-profiles/ |
.*resonate\.com\/connected-profiles.* |
Platform |
https://www.resonate.com/national-consumer-study/ |
.*resonate\.com\/national-consumer-study.* |
Platform |
https://www.resonate.com/markets/brands/ |
.*resonate\.com\/markets\/brands.* |
Markets |
https://www.resonate.com/markets/agencies/ |
.*resonate\.com\/markets\/agencies.* |
Markets |
https://www.resonate.com/markets/media-entertainment/ |
.*resonate\.com\/markets\/media-entertainment.* |
Markets |
https://www.resonate.com/markets/politics-advocacy/ |
.*resonate\.com\/markets\/politics-advocacy.* |
Markets |
Please note that when creating the pattern, the “.*” at the end of the pattern matches the specific pattern to all the URLs that contain this pattern and the “$” operator means end of string in a specific pattern.
Example2: If your site does have a URL path for each Tier1 page, then the following steps should be used to create your Regex Tier1 Categories Example2 table. You may choose a different method of grouping and that would be fine. You would group all the URLs, PATTERNS, and OUTPUT NAME in one table and save it that way in GTM.
We will build out the table, in the example below, by clicking on each Tier1 section in our site, copying the URL to our table, creating the REGEX Pattern, and selecting the Output Name we wish to see under TAGS in our Resonate Platform. We include the Home page as well to track.
Tier1 for All Sections (Example2)
REGEX Tier1 Categories Example2
URL |
PATTERN |
OUTPUT NAMES |
https://www.resonate.com/ |
.*resonate\.com\/$ |
Home Page |
https://www.resonate.com/platform |
.*resonate\.com\/platform.* |
Platform |
https://www.resonate.com/solutions |
.*resonate\.com\/solutions.* |
Solutions |
https://www.resonate.com/markets |
.*resonate\.com\/markets.* |
Markets |
https://www.resonate.com/about |
.*resonate\.com\/about.* |
About Resonate |
https://www.resonate.com/Post-Cookie/ |
.*resonate\.com\/post-cookie.* |
Post Cookies |
Regex Table for Tier 2 Navigation
Next, we will build the Regex Table for the individual Tier2 pages on our site. For this example, we will group our individual Tier 2 pages (only for Platform and Markets sections) in the Regex Tier2 Pages table shown below.
We will build out The secondTier2 table by clicking on each Tier 2 page (under Platform and Markets) in our site, copying the URL to our table, creating the REGEX Pattern, and selecting the Output Name we wish to see under TAGS in our Resonate Platform.
Platform Section: Tier2 Pages
Markets Section: Tier2 Pages
We will build out the Search table by clicking on our search page in our site, copying the URL to our table, creating the REGEX Pattern, and selecting the Output Name we wish to see under TAGS in our Resonate Platform.
REGEX Tier2 Pages
URL |
PATTERN |
OUTPUT NAMES |
https://www.resonate.com/resonate-ignite-platform/ |
.*resonate\.com\/resonate-ignite-platform.* |
Platform - Ignite Platform |
https://www.resonate.com/how-it-works/ |
.*resonate\.com\/how-it-works.* |
Platform - Company Data |
https://www.resonate.com/connected-profiles/ |
.*resonate\.com\/connected-profiles.* |
Platform - Profiles |
https://www.resonate.com/national-consumer-study/ |
.*resonate\.com\/national-consumer-study.* |
Platform - Consumer Study |
https://www.resonate.com/markets/brands/ |
.*resonate\.com\/markets\/brands.* |
Markets -Brands |
https://www.resonate.com/markets/agencies/ |
.*resonate\.com\/markets\/agencies.* |
Markets - Agencies |
https://www.resonate.com/markets/media-entertainment/ |
.*resonate\.com\/markets\/media-entertainment.* |
Markets - Media |
https://www.resonate.com/markets/politics-advocacy/ |
.*resonate\.com\/markets\/politics-advocacy.* |
Markets -Politics |
You may use the above samples as guides and replace with your URLs, tweak the Regex pattern with your page information, and change the Output Name to a name you wish to see under Tags in Resonate. You may choose a different method of grouping more appropriate for your company strategy. You would create a meaningful group with all the URLs, PATTERNs, and OUTPUT NAMEs in one REGEX table and save it that way in GTM. Some sample groupings for sites are Tier1 pages, Tier2 pages, Other Sections (Using Specific Names), Search pages, and Locations.
Comments
0 comments
Please sign in to leave a comment.