Multiple PiwikPro sites under a single container

We have a website on a single domain but business partners have their own sections on the websites. We’d like to give them access to their own data. However, since there’s no view-level like in old Google Analytics, I’m assuming we have to create a site for every partner section of the website (to keep the accesses separate). For overall data, either a meta site or an overview site that’ll fire everywhere…

First, is there an alternative approach?
Second, is it possible to use a single container for tag management and fire all the analytics tags within that? I looked quite a bit for that but couldn’t find anything.

Thanks.

That resource should be also useful, because there are 2 possible approaches. Best practice one vs multiple tracking codes - #3 by Jarek

Since you cannot fire multiple containers on the same page, my recommendation here would be to add additional properties and install additional custom tags for them within the main container. The trigger would limit the tag to fire only on specific pages. Here’s an example code:

<script type="text/javascript">
    var _ppas = _ppas || [];
    _ppas.push(["trackPageView"]);
    _ppas.push(["enableLinkTracking"]);
    (function() {
        var u = "https://example.piwik.pro/";
        _ppas.push(["setTrackerUrl", u + "ppms.php"]);
        _ppas.push(["setSiteId", "XXX-XXX-XXX-XXX-XXX"]);
        var d = document,
            g = d.createElement("script"),
            s = d.getElementsByTagName("script")[0];
        g.type = "text/javascript";
        g.async = true;
        g.defer = true;
        g.src = u + "ppas.js";
        s.parentNode.insertBefore(g, s);
    })();
</script>

Notes:

  • you replace example.piwik.pro with your domain name
  • you replace XXX-XXX-XXX-XXX-XXX with the proper site id
  • we use _ppas namespace to not interfere with the default tracking for you main site (which uses the _paq namespace

Of course, that’s just one of possible solutions. Keep in mind that if you go with this one, any additional tracking (such as custom events, scroll events, etc.) has to be set up via custom code for those additional properties. All built-in features should work well for the main website.

Thanks for the quick reply Kuba. Sounds like that’ll achieve what we need, albeit a bit more manually.