# Discrepencies between Piwik PRO vs UA vs GA4

**URL:** <https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168>\
**Category:** Data collection and tags\
**Created:** [October 25, 2022, 2:29pm UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168 "2022-10-25T14:29:36Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![ValPiwik](https://avatars.discourse-cdn.com/v4/letter/v/ecd19e/32.png) [@ValPiwik](https://community.piwik.pro/u/ValPiwik)\
**Post date:** [October 25, 2022, 2:29pm UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/1 "2022-10-25T14:29:36Z")

</div>

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

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/d30a3fc69f180933cecc18c930b53c293f1b3984.png)

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](https://community.piwik.pro/t/minimizing-data-discrepancies-between-google-analytics-and-piwik-pro/68) but we respect all the rules.

Many thanks for your help 🙂

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [October 26, 2022, 8:22am UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/2 "2022-10-26T08:22:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ValPiwik](https://avatars.discourse-cdn.com/v4/letter/v/ecd19e/32.png) [@ValPiwik](https://community.piwik.pro/u/ValPiwik)\
**Post date:** [October 27, 2022, 9:23am UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/3 "2022-10-27T09:23:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ValPiwik](https://avatars.discourse-cdn.com/v4/letter/v/ecd19e/32.png) [@ValPiwik](https://community.piwik.pro/u/ValPiwik)\
**Post date:** [October 28, 2022, 11:00am UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/4 "2022-10-28T11:00:44Z")

</div>

Hi @Admin ,

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

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [October 28, 2022, 2:36pm UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/5 "2022-10-28T14:36:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ValPiwik](https://avatars.discourse-cdn.com/v4/letter/v/ecd19e/32.png) [@ValPiwik](https://community.piwik.pro/u/ValPiwik)\
**Post date:** [November 3, 2022, 11:47am UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/6 "2022-11-03T11:47:08Z")

</div>

Hello @Admin ,

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

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/d46f7f27c4d20ac394f125c5c1654f6118131644.png)

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,

---

<div class="post-metadata">

**Author:** ![Jarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/jarek/32/4408_2.png) [@Jarek](https://community.piwik.pro/u/Jarek)\
**Post date:** [November 3, 2022, 12:07pm UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/7 "2022-11-03T12:07:25Z")

</div>

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.

 ![Screenshot 2022-11-03 at 13.03.49](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/61854912020271e02ececa66d273ef7bbaaad0d7.png)

It’s described here in detail: [Campaigns and traffic sources - Analytics Help](https://support.google.com/analytics/answer/6205762?hl=en#flowchart&zippy=%2Cin-this-article)

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.

---

<div class="post-metadata">

**Author:** ![ValPiwik](https://avatars.discourse-cdn.com/v4/letter/v/ecd19e/32.png) [@ValPiwik](https://community.piwik.pro/u/ValPiwik)\
**Post date:** [November 3, 2022, 12:28pm UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/8 "2022-11-03T12:28:15Z")

</div>

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.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/f9906e9ef9790f306e00a643c9c9cedf0d6624dd.png)  
Moreover, the total is impacted (34% difference).  
Direct & facebook/cpc are impacted.  
So I’m not convinced it is an attribution issue.

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [November 3, 2022, 12:34pm UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/9 "2022-11-03T12:34:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [November 3, 2022, 12:50pm UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/10 "2022-11-03T12:50:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ValPiwik](https://avatars.discourse-cdn.com/v4/letter/v/ecd19e/32.png) [@ValPiwik](https://community.piwik.pro/u/ValPiwik)\
**Post date:** [November 3, 2022, 12:51pm UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/11 "2022-11-03T12:51:38Z")

</div>

Hello @Admin ,

Here the tag configuration:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/243e244c9b2185e8ac381c9931d986f6a345197c.jpeg)

And here the site settings

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/63427d503c799f270bc4e33d706f01fdecd8ad1c.jpeg)  
**strong text**  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/2e4c15d0c472d60dc6bb276694d449564a0a27ec.png)

Kr,

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [November 3, 2022, 1:49pm UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/12 "2022-11-03T13:49:37Z")

</div>

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

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/65ee7d2259c76b8874c01c661f1718ce423e5c6a.png)

---

<div class="post-metadata">

**Author:** ![ValPiwik](https://avatars.discourse-cdn.com/v4/letter/v/ecd19e/32.png) [@ValPiwik](https://community.piwik.pro/u/ValPiwik)\
**Post date:** [November 3, 2022, 3:12pm UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/13 "2022-11-03T15:12:17Z")

</div>

Hello Kuba,

As you can see, the volume is very low:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/1d5381ef774d58f89f39785d1f34b9ecbdb45842.png)

before/after October 28th

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [November 3, 2022, 3:47pm UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/14 "2022-11-03T15:47:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ValPiwik](https://avatars.discourse-cdn.com/v4/letter/v/ecd19e/32.png) [@ValPiwik](https://community.piwik.pro/u/ValPiwik)\
**Post date:** [November 4, 2022, 7:36am UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/15 "2022-11-04T07:36:37Z")

</div>

Hi @Admin ,

Here the different reports:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/0980cd4d5acc0c56aeaf9f6814c616ec52e9e145.png)

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/b4b88f77373d9fa2910226507b26d04567161707.png)

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/d777e2c6c226b39a4a4299b8771d6ce87d498e2c.png)

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/8010af47d42181a4d0caeb6b3b75aa023aaf2556.png)

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/fcd2a9d72c2e9d6396d350a46567f567f2fb9c77.png)

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/decece60244ca98b03fa6e2d0b94a620113dd481.png)

As you can see, there is nothing specific…

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [November 4, 2022, 2:16pm UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/16 "2022-11-04T14:16:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![analyticskeener](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@analyticskeener](https://community.piwik.pro/u/analyticskeener)\
**Post date:** [October 31, 2023, 7:40am UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/17 "2023-10-31T07:40:07Z")

</div>

Hi! Did you ever manage to solve the discrepancies between GA4 and Piwik? I would appreciate greatly your reply! 🙂

---

<div class="post-metadata">

**Author:** ![ValPiwik](https://avatars.discourse-cdn.com/v4/letter/v/ecd19e/32.png) [@ValPiwik](https://community.piwik.pro/u/ValPiwik)\
**Post date:** [January 23, 2024, 12:41pm UTC](https://community.piwik.pro/t/discrepencies-between-piwik-pro-vs-ua-vs-ga4/1168/18 "2024-01-23T12:41:23Z")

</div>

Not really.

Nevertheless, I created a new GA4 property few days ago.  
And, I’m observing better results…

Maybe it is linked to the fact that my first property is using user\_id tracking (badly implemented?)…  
But, I’m also thinking that when I created my first property, at the begining of GA4, the gtag code was not working properly…

So, Piwik Pro stays my source of truth.  
GA4 is a backup (in progress).
