# Bigquery export for metasite or more than 50 properties

**URL:** <https://community.piwik.pro/t/bigquery-export-for-metasite-or-more-than-50-properties/1856>\
**Category:** Reports and working with data\
**Created:** [March 21, 2023, 9:36am UTC](https://community.piwik.pro/t/bigquery-export-for-metasite-or-more-than-50-properties/1856 "2023-03-21T09:36:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![spujade](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/spujade/32/1453_2.png) [@spujade](https://community.piwik.pro/u/spujade)\
**Post date:** [March 21, 2023, 9:36am UTC](https://community.piwik.pro/t/bigquery-export-for-metasite-or-more-than-50-properties/1856/1 "2023-03-21T09:36:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kuba](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/kuba/32/7_2.png) [@kuba](https://community.piwik.pro/u/kuba)\
**Post date:** [March 21, 2023, 1:11pm UTC](https://community.piwik.pro/t/bigquery-export-for-metasite-or-more-than-50-properties/1856/2 "2023-03-21T13:11:06Z")

</div>

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:

```auto
<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.

---

<div class="post-metadata">

**Author:** ![spujade](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/spujade/32/1453_2.png) [@spujade](https://community.piwik.pro/u/spujade)\
**Post date:** [March 21, 2023, 1:25pm UTC](https://community.piwik.pro/t/bigquery-export-for-metasite-or-more-than-50-properties/1856/3 "2023-03-21T13:25:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kuba](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/kuba/32/7_2.png) [@kuba](https://community.piwik.pro/u/kuba)\
**Post date:** [March 21, 2023, 1:31pm UTC](https://community.piwik.pro/t/bigquery-export-for-metasite-or-more-than-50-properties/1856/4 "2023-03-21T13:31:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![spujade](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/spujade/32/1453_2.png) [@spujade](https://community.piwik.pro/u/spujade)\
**Post date:** [March 21, 2023, 3:01pm UTC](https://community.piwik.pro/t/bigquery-export-for-metasite-or-more-than-50-properties/1856/5 "2023-03-21T15:01:04Z")

</div>

Thanks @kuba for the complement  
Kind regards  
Sébastien

---

<div class="post-metadata">

**Author:** ![gonerator](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/gonerator/32/3549_2.png) [@gonerator](https://community.piwik.pro/u/gonerator)\
**Post date:** [March 22, 2023, 6:51pm UTC](https://community.piwik.pro/t/bigquery-export-for-metasite-or-more-than-50-properties/1856/6 "2023-03-22T18:51:19Z")

</div>

@spujade If you can use [cross website tracking](https://help.piwik.pro/support/questions/recognize-visitor-across-domains/), 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.

---

<div class="post-metadata">

**Author:** ![spujade](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/spujade/32/1453_2.png) [@spujade](https://community.piwik.pro/u/spujade)\
**Post date:** [March 23, 2023, 9:16am UTC](https://community.piwik.pro/t/bigquery-export-for-metasite-or-more-than-50-properties/1856/7 "2023-03-23T09:16:16Z")

</div>

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