Multiple Stores on One Domain


What would be the best way to track 3 different ecommerce stores on a single domain? They’re set up like this:

I want to track the overall traffic for the static pages on, plus the pages visited and orders placed in each store. Should each store get set up as a “website” or is there a better way to do this?

Thank you,

(Matthieu Aubry) #2

Setup each store as a website.

Then you can track also all stores in one fourth website: JavaScript Tracking Client: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3


I read “Multiple Piwik Trackers” but I’m not quite clear on what to do. Using the example, I think I need to do the following:

<script type="text/javascript">

window.piwikAsyncInit = function () {
    try {
        var piwikTracker = Piwik.getTracker("", 1);
        var piwik2 = Piwik.getTracker("", 2);
        var piwik3 = Piwik.getTracker("", 3);
        var piwik4 = Piwik.getTracker("", 4);
    } catch( err ) {}


Is this correct? If so, then where does this get put? Inside the main Piwik Tracking code block or somewhere else?

If this is not correct, then where am I going wrong?




No you need to go to Settings-> Websites, and create separate Website for each of your stores, then embed tracking codes at those stores. visit Manage Websites - Analytics Platform - Matomo for more info.