Skip to main content

Documentation: Tag Manager plugin

Configuration

Joomill Tag Manager adds all your analytics, marketing and site verification tags to your Joomla site from one place. This guide explains every setting in the plugin.

Where to find the settings

In your Joomla administrator, go to System → Manage → Plugins, search for Tag Manager and open System - Joomill Tag Manager. The plugin is enabled automatically when you install it, so you can go straight to its options. The Help button in the toolbar links back to this documentation.

The settings are split across three tabs: Basic (all the built-in services and the site verification tags), YOOtheme Consent (optional consent-gating for YOOtheme Pro 5's Consent Manager, see the separate "YOOtheme Consent Manager" article), and Advanced (three custom code fields).

How it works

  • Fill in only what you need. Every service is independent. A tag is only added when its field is filled in and the value passes a format check. Leave a field empty and nothing is output for it.
  • Front end only. Tags are never injected into the administrator area, only on the public site.
  • Correct placement, automatically. Each snippet is placed where the provider expects it. The Google Tag Manager noscript code is placed directly after the opening <body> tag, and the LinkedIn Insight Tag and the Cloudflare Web Analytics beacon are placed just before the closing </body> tag.
  • Format is validated. Each ID is checked against its expected format (for example GTM-XXXX or G-XXXX) and escaped before output. If you paste a value in the wrong format, nothing is injected for that field. If a tag does not appear on your site, check the format of the value first.
  • Verification versus tracking. Site verification meta tags are always output, including for excluded user groups. The tracking scripts respect the exclude list.

Basic settings

General

Exclude User Groups

Logged-in users in the selected user groups are not tracked. Useful to keep your own visits, and those of administrators and editors, out of your statistics. Site verification meta tags are still output for these users. 

Select one or more Joomla user groups. Leave empty to track everyone.

Google

Google Site Verification

Adds the google-site-verification meta tag so you can verify ownership in Google Search Console.
In Search Console, choose the HTML tag method and copy the value of the content attribute.

Tag Manager ID

Your GTM container ID, format GTM-XXXXXXX. Found in your Google Tag Manager workspace, top of the screen.
Loads your Google Tag Manager container (script in the head, noscript iframe right after <body>). Preconnect hints are added so the container loads faster.

Google Analytics 4 ID Your GA4 Measurement ID, format G-XXXXXXXXXX. Found in Google Analytics under Admin, Data Streams, your web stream.

Note: the Tag Manager ID and the Google Analytics 4 ID are two different things. Use Tag Manager if you manage tags through GTM, or use the GA4 ID to load Google Analytics directly. You can also use both.

Microsoft

Bing Site Verification

Paste only the verification token. In Bing Webmaster Tools, choose the meta tag method and copy the content value.
Adds the msvalidate.01 meta tag to verify your site in Bing Webmaster Tools.

Microsoft Clarity Project ID

Your Clarity Project ID (a short string of letters and digits). Found in your Clarity project under Settings, Overview.
Loads Microsoft Clarity for heatmaps and session recordings.

Microsoft Advertising UET-tag-ID Add the Microsoft Advertising Universal Event Tracking (UET) tag to your site. The UET tag is the foundation for conversion tracking and remarketing audiences in Microsoft Advertising (formerly Bing Ads). 

In Microsoft Advertising, go to Tools > UET tag. Create a tag if you do not have one yet. The Tag ID is a numeric value shown next to the tag (for example 12345678).

Facebook

Facebook Domain Verification Paste only the verification token. In Meta Business Settings, under Brand Safety and Domains, choose the meta tag method and copy the content value.
Adds the facebook-domain-verification meta tag to verify your domain with Meta.
Facebook Pixel ID Your Pixel ID, digits only. Found in Meta Events Manager, under your data source.
Loads the Meta (Facebook) Pixel with a PageView event and a noscript fallback, for ads and conversion tracking.

LinkedIn

LinkedIn Partner ID Your Partner ID, digits only. Found in LinkedIn Campaign Manager under the Insight Tag settings.
Loads the LinkedIn Insight Tag, placed just before the closing </body> tag as LinkedIn recommends, for campaign conversion tracking and audiences.

Pinterest

Pinterest Site Verification Paste only the verification token. In your Pinterest business account, choose the meta tag method when claiming your website and copy the content value.
Adds the p:domain_verify meta tag to claim your website on Pinterest.
Pinterest Tag ID

Enter your Pinterest Tag ID to install the Pinterest base tag (the conversion tag). It registers page visits and is the basis for audience building and conversion measurement in Pinterest Ads.

Where to find it: In Pinterest Ads Manager, go to Ads > Conversions (Conversion settings). The Tag ID is a numeric value shown for your tag (for example 2613570000000).

TikTok

TikTok Site Verification

Use this field to prove to TikTok that you own this domain. Domain verification is required before you can configure web events or claim your domain in TikTok Events Manager / TikTok Ads Manager.

Where to find it: In TikTok Events Manager, go to your domain and choose the verification method "Meta tag". TikTok shows a tag like <meta name="tiktok-developers-site-verification" content="abc123...">. Copy only the value of the content attribute (the part between the quotes) into this field, not the whole tag.

TikTok Pixel ID

Enter your TikTok Pixel ID to install the TikTok base pixel on your site. The pixel registers page views and is the foundation for audience building and ad measurement in TikTok.

Where to find it: In TikTok Events Manager, open (or create) your Pixel. The Pixel ID is the identifier shown for that pixel, a string of letters and numbers such as CABC1D2E3F4G5H6I7J8K.

What the plugin does: It injects the official TikTok base pixel code into the <head> and automatically fires a page view on each page. Logged-in users in a group listed under "Exclude User Groups" are not tracked. Note that this installs the base pixel only; product- and order-level e-commerce events (such as AddToCart or Purchase) are not sent by this plugin and would need a dedicated integration.

Snapchat

Snap Pixel ID

Enter your Snap Pixel ID to install the Snap Pixel on your site. It registers page views and is the basis for audience building and conversion measurement in Snapchat Ads.

Where to find it: In Snapchat Ads Manager, go to Events Manager and open your pixel. The Pixel ID is a UUID, a string of letters, digits and hyphens such as 6abc82ca-4a3a-4391-98ba-0317a8471234.

What the plugin does: it injects the official Snap Pixel base code into the <head> and fires a PAGE_VIEW event on each page. As with the other pixels this is the base pixel only; e-commerce events such as Purchase are not sent.

OpenAI

OpenAI Pixel ID

Enter your OpenAI Pixel ID to install the measurement pixel for ChatGPT Ads on your site. It measures the visits that can be attributed to your ads in ChatGPT.

Where to find it: In ChatGPT Ads Manager, open the Conversions tab and create or open your pixel. The Pixel ID is shown there.

What the plugin does: it injects the official OpenAI pixel into the <head> and initialises it with your Pixel ID. As with the other pixels this is the base pixel only; conversion events (oaiq("measure", ...)) are not sent and would need a dedicated integration.

If your site sends a strict Content-Security-Policy, allow https://bzrcdn.openai.com as a script source, otherwise the browser blocks the pixel.

Leadinfo

Leadinfo ID Your Leadinfo ID, format LI-XXXX. Found in your Leadinfo account under the tracking code or installation settings.
Loads the Leadinfo tracking script, which identifies the companies that visit your site.

HubSpot

HubSpot Portal ID

Your HubSpot Portal ID, also called Hub ID, digits only. Found in HubSpot under Settings > Tracking Code, or as the account number in the URL of your HubSpot account.

Loads the HubSpot tracking code, which powers HubSpot analytics, forms, the chat widget and contact tracking. Anything you enable inside HubSpot itself is loaded by that one script; you do not need to add separate snippets for forms or chat.

Matomo

Matomo Server URL The full URL of your (self-hosted) Matomo install, for example https://stats.example.com.
Both the Matomo Server URL and the Matomo Site ID are required before the tracking code is added.
Matomo Site ID A number. Found in Matomo under Administration, Websites, Manage.
Tells Matomo which website this data belongs to.

Plausible

Plausible Domain The domain exactly as registered in Plausible, for example www.example.com.
Loads Plausible Analytics for the given domain. This is the only required Plausible field.
Plausible Server URL Leave empty to use plausible.io. For a self-hosted instance, enter its URL, for example https://plausible.example.com.
Lets you point to a self-hosted Plausible instance instead of the cloud service.

Yandex

Yandex Metrica Tag Number

Your Yandex Metrica tag number, digits only. Found in Yandex Metrica in the list of your tags, or in the tag settings.

Loads Yandex Metrica with click maps, link tracking and accurate bounce tracking enabled, and adds the noscript fallback pixel. Session recording (Webvisor) is not switched on by this plugin; enable it in Yandex Metrica itself if you want it.

Hotjar

Hotjar Site ID

Your Hotjar Site ID, digits only. Found in Hotjar under Settings > Sites & Organizations, and in the tracking code Hotjar shows you (the hjid value).

Loads Hotjar for heatmaps, session recordings and on-site surveys.

Cloudflare

Cloudflare Web Analytics Token

Your Cloudflare Web Analytics token, 32 hexadecimal characters. Found in the Cloudflare dashboard under Web Analytics, in the JS snippet for your site: it is the value of token inside the data-cf-beacon attribute.

Loads the Cloudflare Web Analytics beacon just before the closing </body> tag, as Cloudflare recommends.

Switch off automatic injection first. If your site runs through Cloudflare's proxy, Cloudflare adds the beacon itself at the edge, after the page has left Joomla. Turn automatic injection off in the Cloudflare dashboard before you fill in this field, otherwise the beacon is loaded twice. Letting the plugin output it is also the only way a consent manager can control it, because a beacon injected at the edge is beyond the reach of any script on your site.

Privacy friendly options. Matomo (self-hosted), Plausible and Cloudflare Web Analytics are the privacy friendly analytics options; the latter two are cookieless. You decide which services to load, so you can run a lightweight or cookieless setup if that suits your site.

Advanced settings: custom code

The Advanced tab has three code editors for anything that is not in the built-in list, such as another tracking snippet, schema markup, an A/B testing script or a chat widget. Your code is inserted exactly as you write it.

Custom Head Code Right before the closing </head> tag.
Custom Body Begin Code Right after the opening <body> tag.
Custom Body End Code Right before the closing </body> tag.
Use with care. The custom code fields are raw and are not validated, so you are responsible for the code you add here. Make sure it is valid HTML or JavaScript, otherwise it can break the front end of your site.

Tips and troubleshooting

  • For verification fields, enter only the token. Do not paste the full <meta> tag, just the value of its content attribute. The plugin builds the meta tag for you.
  • A tag does not appear? Check the format of the value. An ID in the wrong format is ignored on purpose. Also remember that tracking is output on the front end only, not in the administrator.
  • Testing as a logged-in admin? If your own group is in the Exclude User Groups list, you will not see the tracking scripts while logged in. Check in a private window or while logged out.
  • Clear your cache. If you use page caching (Joomla cache or a third-party cache), clear it after changing a setting so the new tags appear.
  • Consent and privacy. Tag Manager outputs the tags you configure. It is not a cookie consent banner, so make sure your privacy policy and consent setup match the services you enable.

Joomill Tag Manager is free and open source (GPL). Need help? Contact me through the contact page.