We recently migrated our internal site to new servers. As a part of this, we have new IIS Re-write rules that redirect everyone to one primary URL no matter which URL they hit our site with. Prior to this, whatever URL they came in on, we let them stay there. (This is an Internal Support site that has undergone several changes over the years, however, as the site changed, new DNS was added, still many users insist on using old shortcuts, etc.) We are currently on 1.9.2 as of this afternoon.
The problem is this, starting the day the new rules went into effect, the number of Outlinks went through the roof! I have listed all URL’s in the Piwik Setup so it shoudl know the different URL’s that users come in on, but what’s strange is that the primary URL is being reported as an Outlink, and so a lot of hits are being recorded as outlinks instead of just another page hit.
Not sure if that explanation is sufficient or not…any help you can provide would be appreciated.
Can you check the files in piwik/tmp/cache/* - they should contain the list URL website aliases for the IDSite.php matching file. Otherwise the cache/ folder and try again ?
Not entirely sure what to look for, but it appears to be correct. After getting to the /tmp/cache/tracker folder I did vi 2.php (SiteID of the site in question) and the ‘hosts’ array shows 3 possible url’s, all of which are correct. 0 => shows the correct URL and what our IIS rule is redirecting to. The Array also shows a 1 => and 2 => both of which point to correct URL’s users could hit the site with, but if they come in using those, they get redirected to the URL that correctly shows in 0 => … if that makes sense.
One thing I noticed though, the ‘Tracker’ Diorectory is owned by Apache Apache instead of www-data like everything else, and the permissions are set differently on it as well…not sure if that makes a difference or not but I will change it to match the rest of the Piwik Directory and let you know the results.
Doesn’t appear to have helped anything…Looking at the “Outlinks” tab in Piwik and outlinks to our primary URL are growing as I refresh…
When looking at the MySQL DB, in the piwik_site_url table, it only shows the 2 secondary URL’s, doesn’t list the primary URL that users are getting redirected to. However, when I go into “Settings” in the Piwik App, look at the “Websites” tab, I have all three listed there, and all three show in the /tmp/cache/tracker files as they should. ??
Sorry, also noticed in MySQL in the piwik_site table, not all settings are showing correctly. For example: SiteID 1 shows sitesearch_url and sitesearch_parameters (although not correct) while SiteID2 & 4 show NULL in those fields. Site Search functionality appears to be working on all sites, I am getting stats from each site, just curious that nothing is showing, and it’s not matching what I have in the “Settings” tab in the Piwik App itself…
Don’t know if it’s related to the outlinks issue or not, just trying to provide as much info as possible.
Can you please enable debug as: http://piwik.org/docs/tracking-api/reference/#toc-debugging-the-tracking-api-requests
Then email me the site url + piwik Url + login/pwd + bug descreiption and link to this post? i’ll take a look
I can look at enabling debug as you instructed. Unfortunately, we are behind a firewall, this is an internal support site that we use Piwik to track site activity for. Unfortunately there is no way to get you inside our firewall to review and debug first hand due to the nature of the business we support. If there are log files I can send you or other ways we can troubleshoot that would be greatly appreciated. Thanks!
Debug Mode has been set to true … how do I review the output? Or send it to you?
In the javascipr ttry to add:
before the call to trackPageView()
Doesn’t seem to have worked…outlinks to that domain continue to grow.
It’s all one site, runs on Plone…so Site Setup is where I plug in the Tracking Code for it to be called on every page in the site uniformly. So if I have Piwik setup to look for multiple domains, it shouldn’t matter (technically) if I switch from site1.domainA.ext to site1.domainB.ext as long as both are in the Piwik Settings…correct? Some users have an old favorite saved that points to the old URL, once they hit the site and click to any other spot, the URL changes to the main URL for the rest of visit. I beleive it’s this initial switch from the URL they came in on, to the new URL that is causing the high outlinks reporting.
I am working with our Plone Contractor to change our IIS Re-write rules so everyone is re-directed to the main URL before hitting the site, so that switch doesn’t occur…however…it seems like regardless Piwik should recognize that URL-A and URL-B are the same site based on how I have it setup in the Piwik Settings…is that correct?
OK, correction to my previous post…that snippet of code HAS worked for the most part. The Outlinks being misreported prior to inserting that snippet of code was over 1,000 per day, yesterday it was down to 32 … So we are still getting a few clicks being misreported, or perhaps we have some other issue going on, but nevertheless, it is MUCH better than it was
Now the million dollar question…we have about 2 weeks of numbers that are potentially ‘off’ in terms of total actions I believe. So the question is, if I click from one page to another in the same site, but it records it as an outlink, will that in essence be double-recorded as page hit as well? Trying to figure out if the over-reporting of Outlinks has skewed the total actions over the last couple weeks. If so, is there a way to fix it? Could I run some SQL command against the database to clean these up?
Thanks Matt, really appreciate the help!