How to add Amabrik to Joomla
Add the Amabrik snippet to a Joomla site by pasting one script into your template head. Step-by-step guide for Joomla 5, works with any template.
Amabrik runs on your Joomla site from a single line of code. There’s no Amabrik extension to install and nothing to maintain. You paste one <script> tag into your template’s <head>, and every widget you turn on in your dashboard shows up on your live site automatically.
This guide covers two ways to add that snippet on Joomla 5: editing your template’s index.php (built into Joomla, no extension needed) and using a free head-code extension. Pick one. You don’t need both.
1. Get your snippet
-
Sign in to your Amabrik dashboard at app.amabrik.com.
-
Open the Install page from the left menu.
-
Copy the snippet shown there. It looks like this, with your own site ID in place of
YOUR_SITE_ID:<script async src="https://cdn.amabrik.com/v1/loader.js" data-site="YOUR_SITE_ID"></script>
Always copy the snippet from your own dashboard so the data-site value is correct. The wrong ID means your widgets won’t load.
Method A: edit your template head (built into Joomla)
This works on any template and needs no extension. You’re adding the snippet to the file that builds the <head> of every page.
-
Sign in to your Joomla administrator area, usually at
yoursite.com/administrator. -
In the top menu, go to System. Under the Templates panel, click Site Templates.
-
In the Template column, click the name of the template your site is currently using (the one marked as default for the Site, with a star).
-
Joomla opens the template editor. In the file list, click index.php to open it for editing.
-
Find the
<head>section. In most Joomla templates the head is built by a line that reads:<jdoc:include type="head" /> -
Paste your Amabrik snippet on a new line directly after that
<jdoc:include type="head" />line and before the closing</head>tag:<jdoc:include type="head" /> <script async src="https://cdn.amabrik.com/v1/loader.js" data-site="YOUR_SITE_ID"></script> </head> -
Click Save (or Save & Close) at the top.
That’s it. Because the snippet sits in the template head, it loads on every page of your site.
Make it survive template updates
Editing index.php directly works, but a template update can replace that file and remove your snippet. To protect it, create a template override copy first: in the same template editor, look for the Copy Template option (under the template’s Options or Manage menu, depending on your version), give the copy a name, set the copy as your site’s default, then edit the copy’s index.php. Updates to the original template won’t touch your copy. If your template is from a third-party maker, check whether it has its own update channel, since a copied template may not receive those updates.
Method B: a head-code extension
Use this if you’d rather not edit template files at all. A small extension injects your snippet into the head for you, and it stays in place when you update or switch templates.
- Download a free head-code extension from the Joomla Extensions Directory. Search the directory for custom code in head. Well-known options include Universal Head and Body Code Insert and HeadTag.
- In your Joomla administrator, go to System > Install > Extensions and upload the extension package, then wait for the success message.
- Go to System > Manage > Plugins, search for the extension you just installed, and open it.
- Set its status to Enabled.
- Find the field for head code (each extension names it slightly differently, for example “Head Code” or “Code for <head>”). Paste your Amabrik snippet there.
- Save.
The snippet now loads in the head on every page, with no template file edited.
2. Save and check it’s live
After saving with either method, confirm the snippet is actually on your site:
- Open your site’s home page in a normal browser tab.
- Right-click anywhere and choose View Page Source (or press Ctrl+U on Windows, Cmd+Option+U on a Mac).
- Use Find (Ctrl+F or Cmd+F) and search for
amabrik. - You should see your snippet with
cdn.amabrik.com/v1/loader.jsand your site ID.
If you find it, the install worked.
3. Turn on widgets in the dashboard
The snippet is the connection. Your widgets are controlled entirely from Amabrik, so you never touch your Joomla site again.
- Back in your Amabrik dashboard, open Widgets.
- Create or enable the widgets you want (banner, cookie consent, popup, forms, and so on).
- Publish. Changes go live on your site within seconds, with no Joomla edit needed.
From here, every future change happens in Amabrik. Your Joomla site already has everything it needs.
Troubleshooting
I added the snippet but nothing shows on my site. First, check the snippet is in the page source (see step 2 above). If it’s there, make sure the widget is published in your Amabrik dashboard and that your site’s domain matches the domain set in Amabrik. Amabrik only serves your config to your own domain, so a mismatch blocks it.
A template update removed my snippet. This happens when you edited the original template’s index.php directly. Re-add the snippet, and this time use a copied template (see “Make it survive template updates”) or Method B, so the next update can’t wipe it.
My change isn’t showing up. Joomla caches pages, and your host or a CDN may cache too. In your administrator, go to System > Clear Cache and clear it, then reload your site in a private or incognito window.
I edited the wrong template. A Joomla site can have several templates installed but only one default for the Site. Edit the template marked as default (the starred one) in System > Site Templates, not an Administrator template.
I can’t find <jdoc:include type=“head” /> in index.php. Some templates build the head differently. As long as you paste the snippet anywhere between <head> and the closing </head> tag, it will load. If the template’s head is hard to read, use Method B instead.
FAQ
Is there an Amabrik extension for Joomla?
You don’t need one. Amabrik is a single script tag, so there’s nothing to install or update on Joomla. Method B uses a generic head-code extension only as a convenient place to hold that one tag.
Will this slow down my site?
The snippet uses the async attribute, so it loads without blocking your page. The browser keeps rendering while the script downloads in the background.
Do I need to add the snippet to every page?
No. The template head and the head-code extension both apply site-wide, so a single paste covers every page.
Which method should I pick?
If you’re comfortable in the template editor, Method A is direct and needs nothing extra. If you’d rather avoid editing files or you change templates often, Method B keeps the snippet in place on its own.
Can I remove Amabrik later?
Yes. Delete the snippet from your template index.php, or disable the head-code extension, save, clear your Joomla cache, and Amabrik is gone. No leftovers.
Last updated June 22, 2026
Want us to install it for you?
Open the Install page in your dashboard and use the Request Installation tab. Our team sets it up for you.