Huge difference between Matomo or GA on piwik pro


I don’t know what I may have missed in the installation but I can’t manage to recover all my visits & my events.

With a simultaneous Matomo & Google Analytics installation I have huge differences.
(For test the best tools)

My configuration is :

GTM tag with trigger on All Pages :

<script type="text/javascript">
(function(window, document, dataLayerName, id) {
window[dataLayerName]=window[dataLayerName]||[],window[dataLayerName].push({start:(new Date).getTime(),event:"stg.start"});var scripts=document.getElementsByTagName('script')[0],tags=document.createElement('script');
function stgCreateCookie(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d="; expires="+e.toUTCString()}document.cookie=a+"="+b+d+"; path=/"}
var isStgDebug=(window.location.href.match("stg_debug")||document.cookie.match("stg_debug"))&&!window.location.href.match("stg_disable_debug");stgCreateCookie("stg_debug",isStgDebug?1:"",isStgDebug?14:-1);
var qP=[];dataLayerName!=="dataLayer"&&qP.push("data_layer_name="+dataLayerName),isStgDebug&&qP.push("stg_debug");var qPString=qP.length>0?("?"+qP.join("&")):"";
!function(a,n,i){a[n]=a[n]||{};for(var c=0;c<i.length;c++)!function(i){a[n][i]=a[n][i]||{},a[n][i].api=a[n][i].api||function(){var a=[],0);"string"==typeof a[0]&&window[dataLayerName].push({event:n+"."+i+":"+a[0],parameters:[],1)})}}(i[c])}(window,"ppms",["tm","cm"]);
})(window, document, 'dataLayer', '1ccd73d4-4fb3-411c-8e9d-f156424c0769');

Piwik PRO Tag manager:
Page viewed on all pages.

Piwik PRO - Events : custom event with {{category}}{{action}}{{label}}

In parallel on my GTM I also send events to Matomo:

_paq.push(['trackEvent', {{DL - VAR - eventCategory}}, {{DL - VAR - eventAction}}, {{Event}}, {{DL - VAR - eventValue}}, {dimension1: {{DL - VAR - eventLabel}},dimension2: {{DL - VAR - utm_campaign}},dimension3: {{Cookie - ClientID GA}}}]);

I don’t really understand what can be a problem because Piwik Pro records 1/4 of my visits.

Please can you help me ?

Thank you :slight_smile:

Hi Bastien,

Please verify if Piwik PRO and Matomo useses _paq.push(). If so, they will interfere with each other. You can find more information in this article.

Also, data layer names have to be unique (the tools can interfere with each other when names are the same). This article might be helpful.


Thank you for you’r response and this article !
They uses _paq.push together.
This is the reason for the problem.
I was able to fix the problem, it seems to work. :muscle: