Double tracking Piwik Pro

Hello the community, I would like to get a double tracking on my website :

  • A tracking in a property/account with a view of 100% of my tracking with and without consent > which that means than the collection is not based on cookie so less accurate
  • A tracking based on the cookies so on my optin users.

Is it possible to do that with Piwik Pro ? I was thinking to get 2 accounts :

  • One 100% PIwik Pro TMS+data collect
  • One with Piwik Pro triggered by GTM

Do you think that my solution can work ?
I’m a new user of PiwikPro, do not hesitate to correct me if I’m wrong of if you have a better solution.

Thank you for your help

Hi there!

Welcome to our community :smile:

For your case I would recommend to have two sites set up in Piwik PRO (by the way, you don’t need two accounts for that) - one for the 100% tracking and one for the tracking based on cookies. Since you can’t just add two containers to one website, you can use our addTracker method (API — Piwik PRO Analytics Suite 18.0 documentation) in Tag Manager to get the same result. You would also need to set up both sites so they track data accordingly to your expectations. Here are some articles you may find useful:

Other than that, the solution you proposed would work too (you can do it on one Piwik PRO account only - no need to have two), the decision is up to you and your preferences :smile:

Hello @sararekowska

Thank you very push for your help.
Il will try your method and let you know.

All the best

Hello @sararekowska
I tried to use your addTracker method to track the second site.
But with the information you supplied I can’t figure out how.
Where can I create a new JavaScript Tracking Client instance in Tag manager?
Should I created a tag with the script ? Or should I ask to my dev team to implement this script in the pages :
_paq.push([“addTracker”, “https://example.piwik.pro/piwik.php”, “45e07cbf-c8b3-42f3-a6d6-a5a176f623ef”]);
Do you have any documentation for this procedure ?
Thank you very much

Hi,

If you are using Piwik PRO Tag Manager - you need to create a custom code tag and put the snippet you provided (and also define the _paq - which is a command queue):

<script>
var _paq = _paq || [];
_paq.push([“addTracker”, “https://example.piwik.pro/piwik.php”, “45e07cbf-c8b3-42f3-a6d6-a5a176f623ef”]);
</script>

And adjust the trigger conditions and consent settings in the tag :slight_smile:

Hello @sararekowska

When you are written https://example.piwik.pro/piwik.php, in my case it should be https://www.mysite.fr/piwik.php or “https://mysite.fr

To define the _paq method, is it something that should be implement in my code source by my dev team.

Other question : I need to be compliant with french CNIL :

so what is the best way to be compliant :

  • Site 1 : 100% tracking, not based on cookies with no consent type form
  • Site 2 : only for consent, based on cookie with a cookie form
    Eg : if a user does not consent to my banner, it will be count in Site 1 but not in Site 2 ?
    Am I right ?

Thank you for your help