Bigquery export for metasite or more than 50 properties

Hi the Piwik Pro Team and specially @kuba ,

hope you’re fine.
Here’s my question please.
What would you recommend to do to get the numbers of the metasite but with unique metrics such as deduplicated visitors, pageviews… ?
I looked at the metasite option but unfortunately it aggregates everything.
Our idea is to have a global overview of the audience & its usages & to be able to do cross-domains analysis within the interface or using bigquery export ?
If it’s possible to do it with bigquery, what would you recommend (metasite export doesn’t exist) ? So should you export all your sites datasets and after procceed within bigquery interface or API to the queries to get your data or should i create a site with a double tagging approach (1 property for a digital asset and 1 tag to be depoyed on all digital assets and then export that global site on bigquery) ?
Thanks a lot for your recommendations, best practises and tips.
Kind regards,
Sébastien

Hi. If your main goal i to deduplicate visitors, you should go with the double tagging approach. Setting up tracking should be fairly easy if you decide to use Meta Setup in our Tag Manager. :

Here’s an example tag that could be used to get data in for the additional property:

<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>

Note: we use here an additional command queue (_ppas). We do so to avoid interference with the command queue used by standard properties.

1 Like

Hello @kuba many thanks for your answer.
I’m using Tealium as TMS so i need to check with them how to implement it.
Many thanks for your confirmation about the approach.

Kind regards,
Sébastien

You can implement it as a custom code tag. I don’t think our template supports this additional namespace for command queue.

1 Like

Thanks @kuba for the complement
Kind regards
Sébastien

@spujade If you can use cross website tracking, it sounds like what you want could be achieved by sharing Visitor IDs across those websites (or maybe you have everything in a TLD in which you can put a cookie in). Then in exported data you can do a Distinct Count on those Visitor IDs. Maybe this will be helpful for you.

Hi @gonerator many thanks for your suggestion. Have a lovely day. Kind regards, Sébastien

1 Like