How To Use Piwik With PrestaShop
This article describes how to integrate the open-source Piwik analytics platform with PrestaShop.
Using Piwik with PrestaShop
Piwik gathers detailed statistics about visitor traffic to your site. There are several modules available for PrestaShop that provide Piwik integration, but Piwik's own site recommends the Piwik module for PrestaShop.
Before you can use Piwik with PrestaShop, you must first install the Piwik application files. There are two ways to do this:
- If your hosting account includes Softaculous, you can use it to install Piwik.
- If your hosting account does not include Softaculous, or if you want to install the newest version, you can install Piwik manually.
To install and configure the Piwik module for PrestaShop, follow these steps:
- Use your web browser to visit https://github.com/mdurys/piwikanalyticsjs-prestashop.
- Under Downloads, click piwikanalyticsjs.zip, and then save the .zip file on your computer.
- Log in to your PrestaShop site as the administrator.
- On the left-hand menu bar, click Modules and Services.
- Click Add a new module.
, select the .zip file you downloaded in step 2, and then click .
- Under MODULES LIST, locate Piwik Analytics, and then click Install.
- Click . After PrestaShop finishes installing the module, the Piwik Analytics configuration page appears:
- In the Piwik Host text box, type the URL to your Piwik installation.
Do not add http://. For example, if your domain name is example.com, and Piwik is installed in the piwik directory, type example.com/piwik.
- In the Piwik site id text box, type the Piwik ID number for your site.
To obtain the Piwik ID number for your site, follow these steps:
- Log in to Piwik.
- On the top right of the page, click All Websites. The All Websites dashboard page appears.
- In the WEBSITE column, click the name of the website that you want to track.
- In the browser address bar, look for the idSite= string. The number following the idSite= string is the Piwik site ID number. For example, in the following URL the site ID number is 3:
In the Piwik token auth text box, type your Piwik authentication token.
To obtain your Piwik authentication token, follow these steps:
- Log in to Piwik.
- On the top right of the page, click your administrator username.
- On the left menu bar, under Platform, click API.
- Under User authentication, copy the long alphanumeric string. This is your Piwik authentication token. (Do not copy the &token_auth= portion.)
- Under PIWIK ANALYTICS ADVANCED - EDIT PIWIK SITE, in the Ecommerce option box, click YES.
. Piwik is now enabled for PrestaShop. To view site statistics, log in to your Piwik account.
For more information about Piwik, please visit https://piwik.org.