Skip to content

Install Statsdot on PrestaShop

Updated October 19, 2026

With the module (recommended)

  1. Download the Statsdot module for PrestaShop.
  2. In the back office, go to Modules > Module Manager > Upload a module and choose the ZIP.
  3. Open Configure: the domain is filled in with your shop's; check it matches the site you added in Statsdot, and save.

The module adds the script to every page of the shop and sends:

  • Add to cart when a product is added, from PrestaShop's own front-office event;
  • Purchase once per order on the confirmation page, with the order total (tax included) and currency, so the dashboard shows revenue per source, channel and campaign.

Options in the module: outbound links and downloads, the order reference as conversion id (off by default, see Revenue) and scroll depth. Then create goals for the events Add to cart and Purchase in your site settings.

By hand, in the theme

If you prefer not to install a module, add the script to your theme.

Add the script

Edit themes/your-theme/templates/_partials/head.tpl. Work on a child theme, so a theme update does not remove the change. Add the tag before the closing {block} of the head:

<script defer data-domain="yoursite.com" src="https://statsdot.com/js/script.js"></script>

Then go to Advanced Parameters > Performance and clear the cache.

Track orders

To count purchases as an event, add this to templates/checkout/order-confirmation.tpl of the same theme, inside the main content block:

<script>
  window.addEventListener('load', function () {
    window.statsdot && window.statsdot.track('Purchase', null, {
      revenue: {$order.totals.total.amount|floatval},
      currency: '{$currency.iso_code|escape:'javascript'}'
    });
  });
</script>

The order total and currency are sent as revenue (add id: '{$order.details.reference|escape:'javascript'}' to ignore reloads and delete test orders for 7 days), so the dashboard shows revenue per source and campaign (see Revenue); the variable names are those of PrestaShop 1.7 and 8 themes, so check them if your theme was heavily customised. Then create a goal for the event Purchase in your site settings. Statsdot never stores the order number: the order confirmation address is stored without its query string.

Add-to-cart buttons can be counted with data-statsdot-event="Add to cart" on the button in your product templates. See Events and goals.