Discrepencies between Piwik PRO vs UA vs GA4

Hello all,

  • We moved from GTM to Piwik PRO
  • During this move, we launched Piwik PRO analytics and GA4 at the same moment
  • UA tracking moved from GTM to Piwik PRO TMS

As you can see, we observe a very important discrepency between Piwik PRO vs UA & GA4

  • The setup is the same
  • The 3 tags are managed in Piwik PRO TMS
  • The 3 tags trigger is the same
  • The 3 tags consent is the same
  • We change nothing in the website or in the tracking during this period

But, as you can see,

  • the direct traffic has 227% more sessions in Piwik PRO than UA
  • The google organise has 12% more sessions in Piwik PRO than UA (could be acceptable)
  • The google cpc has 38% more sessions
  • The facebook cpc has 347%

How to explain it? Where should I look?
I read this topic Minimizing data discrepancies between Google Analytics and Piwik PRO but we respect all the rules.

Many thanks for your help :slight_smile:

It’s more likely that GA would be blocked by adblocks. But it doesn’t explain the big difference on direct. Do you have maybe server access logs that you could compare for a given day? Let’s start with page views for particular URLs. It should be fairly easy to get a no. of access logs containing given URL and a report showing no. of events for given URL.

In general, we should first get to the point where we have the right numbers and in this case your server / backend would be the way to go. Based on that we can start searching what might be wrong with the implementation.

I’d also try to compare specific segments. Maybe there’s one configuration / some bot, that inflates the results. In Piwik PRO you can check also session logs to see all the details.

Unfortunatelly, the logs analysis was not activated. I did it this morning.
So no point to compare right now.

Hi @kuba ,

Is it possible that the heartbeat ping is the reason of multiple counting ?

No, since pings don’t generate new page views or sessions. You can check that in the tracker debugger.

Hello @kuba ,

That’s weird because since I deactivated the heartbeat ping, I reduced the discrepency:

I check our server logs, unfortunattely, the system we use doesnt’t allow us to filter properly, so no comparison possible.

The direct channel is clearly the issue: what could be the issue? How to fix it?

Many thanks,

It might be caused by a different approach to traffic classification. Google takes into account previous sessions. If the session is from a direct entry but there was a previous session within a timeout period then the traffic source from the previous session is assigned to the current session.

It’s described here in detail: Campaigns and traffic sources - Analytics Help

It’s for GA UA, I didn’t look into GA4.

Piwik PRO doesn’t take into account previous sessions so that’s for sure the cause of discrepancies.

Hello @Jarek ,

Thank you for your answer.

I get your point, but GA4 has been launched at the same time as Piwik: so GA4 has no history to attribute the session to another channel.

Moreover, the total is impacted (34% difference).
Direct & facebook/cpc are impacted.
So I’m not convinced it is an attribution issue.

What is your current consent / cookies / session id configuration? You can check it in the website settings. Are you using both cookie id as well as session id? Based on your screenshot it looks like some of the heartbeats created new sessions.

Maybe you changed something in the config on the 16th of October?

Hello @kuba ,

Here the tag configuration:

And here the site settings

strong text


I’m trying to check if, for some reason, heartbeat requests are sent after the session timeout. I’d create such a segment to check if there are many sessions without even a single page view (for the specified date range including time before and after disabling the heartbeat):

Hello Kuba,

As you can see, the volume is very low:

before/after October 28th

Ok, I’d also try with different thresholds, e.g. less than 1, less than 3, etc. Such big difference in no. of sessions should be clearly visible in the session log. I assume that there are plenty of sessions with just a few events.

Hi @kuba ,

Here the different reports:

As you can see, there is nothing specific…

Indeed. For now I don’t have any other idea than checking the session log for a day with big difference between no. of sessions (like Oct 20th).