-
-
- Submit Updated Articles to Bing and Yandex with IndexNow in Joomla
- Add Published and Modified Date Meta Tags to Joomla
- Add Open Graph and Twitter Card Tags to Joomla
- Auto-Generate Meta Descriptions from Article Text in Joomla
- Add Noindex to Specific Pages in Joomla
- Verify Your Joomla Site with Google Search Console
-
- Add a View as Markdown Link to Joomla Articles
- Display the Last Modified Date in Joomla Articles
- Embed Iframes in Joomla
- Automatically Link Twitter (X) @mentions in Joomla Articles
- Open External Links in a New Tab in Joomla
- Display Estimated Reading Time in Joomla Articles
- Replace Old URLs in Joomla
- Search and Replace in Joomla
-
- Add a Footer Line to the Joomla Administrator
- Show a Staging Banner in the Joomla Administrator
- Remove the "All" Option from Admin List Limits in Joomla
- Add a Cookie Consent Banner to Joomla
- Make the Administrator Navigation Sticky in Joomla
- Add Google Fonts to Joomla
- Add a Facebook Messenger Chat Button to Joomla
- Add a Reading Progress Bar to Joomla
- Add a Custom Scrollbar to Joomla
- Show Confetti on a Thank You Page in Joomla
- Add Smooth Scrolling to Joomla
- Add a Back to Top Button in Joomla
- Add a WhatsApp Chat Button in Joomla
-
- Protect the Administrator with a Secret URL Key in Joomla
- Show a Welcome Message on First Login in Joomla
- Log Out Idle Administrators in Joomla
- Assign New Users to a Different User Group Automatically in Joomla
- Redirect Visitors by Country in Joomla
- Redirect Users After Login by User Group in Joomla
- Block User Registration with Certain Usernames in Joomla
- Block User Registration by Country in Joomla
- Block User Registration by Email Address in Joomla
- Block User Registration by IP Address in Joomla
- Remove the Forgot Password and Username Links in Joomla
- Remove the Generator Meta Tag in Joomla
- Let Users Log In with Their Email Address in Joomla
- Block Traffic by Country in Joomla
- Block Bot Traffic in Joomla
- Block Traffic by IP Address in Joomla
Add Google Analytics to Joomla
Find out where your visitors come from and what they do on your site by adding Google Analytics to Joomla, using one HTML snippet.
Your Joomla site gets visitors every day, but you can't tell where they come from, which pages they read or how long they stay. Google Analytics answers those questions for free, and its tracking code belongs on every page of your site. You can add Google Analytics to Joomla with one HTML snippet in Code Snippets.
Get your Measurement ID
You need a Google Analytics account with a GA4 property for your site.
- Go to Google Analytics and sign in.
- Click Admin, the gear icon in the bottom-left corner.
- Under Data collection and modification, click Data streams.
- Click your website's stream.
- Copy the Measurement ID. It starts with
G-.
The snippet code
This is Google's tracking code. In the Site Header location it lands in the <head> of every page.
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
How to add this snippet
- Install Code Snippets if it isn't installed already.
- Log into your Joomla backend.
- Go to Components → Tassos Code Snippets.
- Click New.
- Enter a title, for example Google Analytics.
- Set Code Type to HTML.
- Set Insertion Method to Auto-Insert Locations.
- Set Location to Site Header.
- Paste the code above into the editor.
- Replace
G-XXXXXXXXXXwith your Measurement ID, in both places. - Click Save & Close.
Check that it works
- Open your site in a normal browser window with no ad blocker.
- In Google Analytics, open Reports → Realtime.
You should see yourself as an active user within a minute. If you don't, check that the snippet is published and that the Measurement ID is right in both places.
To manage all your tags from one place, see Add Google Tag Manager to Joomla. To track sales from your ads, see Add Google Ads Conversion Tracking to Joomla. To learn more about how HTML snippets work, read the HTML snippet docs.