In Prestashop, there are two ways of installing the Mouseflow tracking code.

Setup

This guide will walk you through the 3 short steps involved in enabling tracking for your PrestaShop site.


A. Use a Module to Insert the Code

You can insert the tracking code on your preferred pages by using a module such as ContentBox, which allows you to insert custom HTML/JavaScript on your site.


Simply install the module and add the tracking code (in source code mode). Hook the module to the block you prefer. If you want to record the entire page, you should insert the tracking code in a block that is shown on every page, such as displayFooter.


B. Insert the Tracking Code in a Template

You can also insert the tracking code directly inside a Prestashop template (.tpl file) by putting the JavaScript inside the {literal}{/literal}tags. For example:

<script type="text/javascript"> 
{literal}
window._mfq = window._mfq || [];
(function() {
var mf = document.createElement("script"); mf.type = "text/javascript"; mf.defer = true;
mf.src = "//cdn.mouseflow.com/projects/your-website-id.js"; document.getElementsByTagName("head")[0].appendChild(mf);
})();
{/literal}
</script>

To track all of the pages on your website, you should add the tracking code to a template file that is called on every page such as footer.tpl.

Test Installation and Activate Tracking

Once you have completed adding the Mouseflow Tracking Code to your site you should refresh one of the pages that the code is on, this will let Mouseflow know that the installation has been made.

To begin recording traffic on your site, you need to activate tracking by clicking the Activate Tracking button from the

Manage My Sites page.
You confirm that you will abide by Mouseflow terms and not collect Personal Identifiable Information (PII) by signing your name and clicking the button.


Tip: If you are not seeing the Activate Recording button (or popup) at this point, please try to visit your site in your browser's Private or Incognito mode, and do some clicking, scrolling and navigating while you're there.


Congratulations! You Made it!

Now go celebrate with your team while the insights pour in.

Once you have activated tracking, Mouseflow will automatically begin recording your visitors. You can check the Recording Status from the Manage My Sites page or you can click the play button to go to your Dashboard.


What's Next?

Once you're done celebrating here are a few next steps to consider.

Did this answer your question?