Search for the Article

Component Type Hostname in google tag manager

In Google Tag Manager, the Component Type "Hostname" refers to a part of the URL of the current webpage. It represents the domain name of the website that the user is currently visiting. The hostname does not include the "http://" or "https://" protocol, or any subdirectories or page names that come after the domain name.

Using the "Hostname" Component Type in GTM, you can track or conditionally trigger tags based on the domain name of the website. For example, you could create a tag that fires on all pages of a specific website, or you could exclude certain domains from triggering specific tags. This can be useful for tracking multiple websites or subdomains, or for creating personalized experiences based on the user's current domain.