Piwik recording more Direct Entries than GA

Hi piwik community,

We have been using Piwik side by side with Google Analytics for the past few months and have noticed that Piwik is attributing more visits to direct entry than GA. I have both tracking code be on every page side by side, so there is no environmental difference between the two on our site.

Here is the comparison of visits for yesterday:
Piwik:
Campaigns: 97,068
Direct Entry: 77,523
Search Engines 69,129
Websites: 7,309

Google Analytics:
Paid Search" 147,835
Organic Search: 48,506
Direct: 18,137
Email: 8,507
Referral 2,181

These numbers are incredibly different. We have tried different configurations with piwik, disabling/enabling DNT, changing the value of create_new_visit_when_campaign_changes in config and comparing them both over the weeks and the results are always about the same, with Piwik having a drastically higher direct entry count for visits.

Again these two have the tracking code one after the other.

We also ran a query for all referer_type 1 visits that contain “gclid” or “utm_” in their referer_url for yesterday and resulted with a count of 18,857.

We are not sure what could be wrong, I have seen other posts where redirects are mentioned, but we have both of the tracking code in the same place one after the other in header, and we have checked for redirects.

Any ideas?

1 Like

Turns out we do some 302 redirects afterall.
I tested and when I click visit our site via a google ad, we record my visit as search engine for referer, the url contains the gclid url param, when we go to another page in the site afterwards we do a redirect and remove the url params, but at that point piwik records another visit this time as direct entry, even though I had just made my search engine visit seconds ago.

I understand that the redirect makes us loose the search engine referer url and it becomes the sites on domain, but why a new visit so quickly? Why does it not stick to the current visit I had as search engine?

Hello

Are you using Latest Piwik version? if not please update before running your tests again.

if you still have a problem after updating to latest piwik, please directly create a ticket in our tracker: Issues · matomo-org/piwik · GitHub with your findings/research and we will follow up there.

it could be a bug in Piwik 2.16.0 or earlier if you are not using 2.16.1