Hello there,
I have integrated Piwik through GTM and everything, including the GA4 based gtag events are working fine. However, there are tons of sessions which inexplicably break and continue in an instant, assigning the wrong source/medium to the order. Let me show you an exact example.
User lands on the website coming from Facebook and starts looking at an item.
After browsing some more, he/she arrives to the cart page. Make note of the time stamps.
For some reason, the session breaks on the login url, and it ends in an abandoned cart event. However, immediately after a new session starts on the same page, but now with a direct entry point. This is where the purchase is completed, completely robbing Facebook from the correct attribution:
This is just one case, there are tons more. The “Start a new session when the referrer changes” option is turned OFF, the “Start a new session when the campaign changes” option was turned ON when this session was recorded. I turned it off now for testing, but it should not have affected the session, since there are no parameters added to the url on the cart page.
What could cause this strange phenomenon? Compared to GA4, the overall revenue is almost an exact match, but the attribution is leaning heavily towards direct in Piwik. If you need further information, I would be happy to provide it.