How to add Amabrik to PrestaShop

Add the Amabrik snippet to a PrestaShop store by pasting one script into your theme head or a head-scripts module. Step-by-step for PrestaShop 8 and 9.

Amabrik runs on your PrestaShop store from a single line of code. There’s no Amabrik module to install and nothing to maintain. You paste one <script> tag into your theme’s <head>, and every widget you turn on in your dashboard shows up on your live store automatically.

This guide covers two ways to add that snippet on PrestaShop 8.x and PrestaShop 9: editing your theme’s head template (built into PrestaShop, no module needed) and using a free head-scripts module. Pick one. You don’t need both.

1. Get your snippet

  1. Sign in to your Amabrik dashboard at app.amabrik.com.

  2. Open the Install page from the left menu.

  3. 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 theme head template (built into PrestaShop)

This works on any theme and needs no module. You’re adding the snippet to the file that builds the <head> of every page. To edit it you need access to your store’s files, either through your host’s File Manager or an FTP/SFTP client.

  1. Connect to your store with FTP/SFTP, or open your host’s File Manager.

  2. Go to the themes folder, then open the folder named after your active theme. The default PrestaShop theme is classic, so the path is often themes/classic. If you use a custom or third-party theme, the folder uses that theme’s name instead.

  3. Open templates/_partials/head.tpl. The full path looks like this:

    themes/classic/templates/_partials/head.tpl
  4. This file builds everything inside the <head>. Near the bottom you’ll see the header hook block, which renders as:

    {block name='hook_header'}
      {$HOOK_HEADER nofilter}
    {/block}
  5. Paste your Amabrik snippet on a new line directly after that {block name='hook_header'} ... {/block} block, so it sits at the very end of the head content:

    {block name='hook_header'}
      {$HOOK_HEADER nofilter}
    {/block}
    
    <script async src="https://cdn.amabrik.com/v1/loader.js" data-site="YOUR_SITE_ID"></script>
  6. Save the file and upload it back to the server (your FTP client does this when you save a remote file).

The closing </head> itself lives in the parent layout file, not in head.tpl. You don’t need to touch it. Adding the snippet at the end of head.tpl places it just before the head closes on every page.

Make it survive theme updates

Editing the classic theme’s files directly works, but updating PrestaShop or the theme can replace head.tpl and remove your snippet. To protect it, work on a child theme or a copy of the theme instead of the original:

  1. Copy your theme’s folder (for example themes/classic) to a new folder with a different name, such as themes/classic-custom.
  2. Open the copied theme’s config/theme.yml and change the name value to a unique name so PrestaShop sees it as a separate theme.
  3. In your PrestaShop admin, go to Design > Theme & Logo, find your copied theme, and click Use this theme.
  4. Edit head.tpl inside the copied theme, not the original. Updates to the original classic theme can’t touch your copy.

If your theme is from a third-party maker, check whether it ships its own child-theme setup or update channel first, since a manual copy may stop receiving the maker’s updates.

Method B: a head-scripts module

Use this if you’d rather not edit theme files at all. A small module injects your snippet into the head for you, and it stays in place when you update or switch themes. PrestaShop has no built-in “Custom Code” admin field for the front-office head, so a module fills that gap.

  1. Get a head-code module that supports your version. On the PrestaShop Addons marketplace, search for custom HTML head tags or custom code, and confirm the listing states it supports PrestaShop 8.x or 9 before you buy or download. Free community modules also exist, but only install ones that name your version.
  2. In your PrestaShop admin, go to Modules > Module Manager, click Upload a module, and upload the module’s ZIP file. Wait for the success message.
  3. Open the module’s configuration page (a Configure button appears next to it in the Module Manager).
  4. Find the field for head code (each module names it slightly differently, for example “Code for the head” or “Header HTML”). Paste your Amabrik snippet there.
  5. If the module lets you choose where the code runs, set it to the <head> or “header” hook so the snippet loads early. Apply it to all pages if asked.
  6. Save.

The snippet now loads in the head on every page, with no theme file edited and nothing to redo after an update.

2. Clear the cache

PrestaShop caches compiled templates, so a fresh theme edit may not show until you clear it.

  1. In your PrestaShop admin, go to Advanced Parameters > Performance.
  2. Click Clear cache at the top right.

If you use a separate page cache, server cache, or a CDN in front of your store, clear those too.

3. Check it’s live

After saving and clearing the cache, confirm the snippet is actually on your store:

  1. Open your store’s home page in a normal browser tab.
  2. Right-click anywhere and choose View Page Source (or press Ctrl+U on Windows, Cmd+Option+U on a Mac).
  3. Use Find (Ctrl+F or Cmd+F) and search for amabrik.
  4. You should see your snippet with cdn.amabrik.com/v1/loader.js and your site ID.

If you find it, the install worked.

4. Turn on widgets in the dashboard

The snippet is the connection. Your widgets are controlled entirely from Amabrik, so you never touch your PrestaShop store again.

  1. Back in your Amabrik dashboard, open Widgets.
  2. Create or enable the widgets you want (banner, cookie consent, popup, forms, and so on).
  3. Publish. Changes go live on your store within seconds, with no PrestaShop edit needed.

From here, every future change happens in Amabrik. Your store already has everything it needs.

Troubleshooting

I added the snippet but nothing shows on my store. First, check the snippet is in the page source (see step 3 above). If it’s there, make sure the widget is published in your Amabrik dashboard and that your store’s domain matches the domain set in Amabrik. Amabrik only serves your config to your own domain, so a mismatch blocks it.

I saved the file but the page source hasn’t changed. PrestaShop is serving a cached template. Go to Advanced Parameters > Performance and click Clear cache, then reload your store in a private or incognito window. If your theme is in debug-off mode, the cache is what’s hiding the edit.

A theme or PrestaShop update removed my snippet. This happens when you edited the original theme’s head.tpl directly. Re-add the snippet, and this time use a copied or child theme (see “Make it survive theme updates”) or Method B, so the next update can’t wipe it.

I can’t reach head.tpl in the admin. PrestaShop doesn’t include a built-in theme file editor in the back office, so you edit head.tpl over FTP/SFTP or through your host’s File Manager. If you don’t have those credentials, ask your host, or use Method B and stay entirely in the admin.

I edited the wrong theme folder. A store can have several themes in the themes directory but only one active. Confirm which theme is active under Design > Theme & Logo, then edit the matching folder under themes/.

FAQ

Is there an Amabrik module for PrestaShop?

You don’t need one. Amabrik is a single script tag, so there’s nothing to install or update on PrestaShop. Method B uses a generic head-code module only as a convenient place to hold that one tag.

Will this slow down my store?

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 theme head template and the head-scripts module both apply store-wide, so a single paste covers every page.

Which method should I pick?

If you’re comfortable with FTP and theme files, Method A is direct and needs nothing extra. If you’d rather avoid editing files or you change themes often, Method B keeps the snippet in place on its own.

Can I remove Amabrik later?

Yes. Delete the snippet from your theme’s head.tpl, or uninstall the head-code module, then clear your PrestaShop 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.

Open Install