How to Install Google Tag Manager in PrestaShop Without Addon

PrestaShop is an open source free shopping cart software. It’s FREE for just setting up your ecommerce store but when it comes to adding any third-party analytics or marketing tool it doesn’t provide a reliable way to integrate unless you purchase the specific addon.

In this article, I will show you how to install Google Tag Manager in Prestashop without having to install any addon. 

 

How to Install Google Tag Manager in PrestaShop?

There is not any free addon for installing Google Tag Manager in PrestaShop except buying a paid addon. Prestashop also doesn’t give access to website code so we can add Tag Manager code but there is still an alternate way by directly modifying the website code on hosting server.

Changing files in cpanel.

Follow the steps below to install Google Tag Manager in PrestaShop:

Step1: open the cpanel where your website is hosted and navigate to file manager.

Step2: Inside the file manager navigate to public_html >> themes >> warehouse.

Step3: look for header.tpl file and open in edit mode

Step4: add your tag manager container code just after the opening <head> tag enclosed with {literal}{/literal} as shown in the image below.

add google tag manager prestashop

Note: PrestaShop uses Rocket Loader for loading javascript files which can cause problems with tag manager(i.e tag assistant will not display GTM tag, preview mode will not run). To have the Rocket Loader ignore the tag manager script it is necessary to add the attribute to the script like I did in the image above. 

Step5: Once you add the tag manager code, save the file and return to tag manager account and start preview mode to view changes.

Once you have Google Tag Manager installed on your PrestaShop, you can then install Facebook Pixel, ecommerce tracking and add any third party analytics or marketing tag easily without having to rely on addons.  

If you find this guide helpful or have any question related to the topic, you can directly ask us on Twitter.