I see now that the initial referrer is still passed in the query string for each subsequent hit even though these are showing up in Piwik as a few separate visits over two days. Is that correct? Or is this user possibly visiting from the same referring link each time?
However even their initial visit which matches the timestamp in Apache and Piwik is still not showing the referrer. Am I correct in thinking it is the parameter _ref that is supposed to pass this value? Something doesn’t seem right here.
pleaseput here screenshot of your visitor log and extract of your log
most likely there is no bug in piwik or someone else would have reported it
I’d like to understand what’s causing it even if it’s not a bug, so here is an example referral from Twitter.
_url stores the URL that was initially used to find the website. It is kept in the cookie, to allow to credit goals/ecommerce conversions to the initial conversion.
The referrer would be sent in &urlref=
Thanks for explaining that, however I think you meant _ref not _url for the cookie data?
How long does the cookie last by the way?
Also, since the original referrer is known and passed with every hit, it would be brilliant if this info could be shown in Piwik on subsequent, separate visits.
Since at the moment it just shows “Direct Entry” if they have returned via a bookmark etc, perhaps it would be useful to show under that:
Originally from: [the original referrer]
I’m also using Piwik 1.7.1 and experiencing the same problem.
I noticed that sometimes Visitor Log doesn’t display the referer value I see for the same visit in database in the table log_visit > referer_url field
I modified /plugins/Live/templates/visitorLog.tpl adding after the
When refererer url has the same domain we do not count it as referrer as it’s not interesting info
I understand the notion that same domain is not an external referrer, therefore not to be listed in Referrers statistics…
However a same-domain-referrer can occur for various reasons, and it is a useful information stored in database that I prefer to see somewhere, at least in Visitor Log.
I have the same problem as the original poster. Only direct entries shown in the reports, but in my case there is a &urlref= parameter in the logs.Other things suich as browser, screen resolution etc. are recorded, but no referrer and then of course no search engine keywords. Another thing that is missing are the pages in the Actions/Pages report. only “Page URL not defined”. I do get the page title report, however.
This is a log entry (my domain replaced by example.com)
I use Piwik 1.8.2. The site is a Drupal site, with the Piwik code inserted in the template (not using the Piwik module).
Thanks for any advise.
Is there a redirect in place to your piwik.php by any chance? look with Firefoxu, firebug NET panel, to see if doing any redirect before reaching piwik? redirect could change the parameters and lose referrer and page
Thank you for the answer. No redirect, it returns http code 200, and the normal Piwik one-liner in the body. Everything seems to work fine, except these two parameters. There are the ModRewrite entries of a typical Drupal installation, but piwik is excluded from that (otherwise it wouldn’t work at all).
The parameter &urlref= is encoded twice - maybe you have a rule that encodes the content?
Thank you very much, Matt, that was it. There was indeed a redirect which I overlooked before, and that did the double encoding. Everything works fine now.
There is, however, something that looks like a little bug to me.
The site is reacheable via two domains, say example-site.com and examplesite.com. There is this redirect from examplesite to example-site that caused the problem. When I look in Piwik at settings / websites, there is only one, namely example-site.com. That is ok, except when I click on View Tracking Code, there is the code with examplesite.com in it.
I might have installed Piwik by calling the Piwik installation from examplesite.com - This website is for sale! - example site Resources and Information. (I don’t remember), but now nowhere in the settings is any trace of examplesite.com, except in the tracking code, where I can’t get rid of it.
It is not a problem for me any longer, I just modified the tracking code in the Drupal template, but there seems to be some inconsistency within the Piwik settings.
I’m having almost all visitors (99% of them) coming from search engines appear as Direct Entry. Some of them (very few) do appear as organic and show the search keywords.
All visitors coming from referral sites show up correctly.
I can’t figure out what the problem might be.
Piwik was installed automaticaly by Softaculous and i copied the tracking code exactly as it was provided.
I’ve used Piwik in the past with other sites and had no such problems.
The trouble site is top50solar.ro
The tracking code installed is
And i’m accesing piwik at Piwik › Sign in
So no redirects are involved.
I’m using 1.11.1
My situation is very similar to topsolar. Nearly all of my referers show up as Direct Entry. There are only 2 domains so far that actually show up correctly: t.co and newswithtags.com
I posted a link to my site here:
Checking the response headers don’t show any referrer nor does the cookie for Piwik. Apache logs don’t show it as well. I’m fairly new to this, but not sure where where to start looking. I have full control over the domain and server.
Since my last post I’ve only had 5 counted visitors coming from reffering sites and 2 coming from search engines using my domain name as the keyphrase.
This is very strange.
As I’ve told you before, I have installed piwik on many other sites and I’ve never encountered this problem until now.
Yep, same here.
Have you tried checking your request headers or apache logs to see if the referer even shows up there?
i am using the Drupal Piwik plugin and i couldnt get any referrers as well!
all i get is direct entry.
any ways to get this to work?