We’re having an issue with page tracking on a site.
This site is a search site just like Google.
On this site we have three pages, each page is dedicated to one category such as: “web results”, “documents” and “organizations”.
We would like to know how many visitors each page has. The problem is that piwik doesn’t seem to track page views under “Actions/Pages” if the parameter “q” exists in the query string.
Lets say someone searches for “pizza pie”:
This will log a site search but not a page view.
If we exclude the query paramter:
It will log a page view.
Is it possible to get both?
Thanks in advance!
Well the easiest here would be to have the website. Could you please just indicate us the URL. I guess it is either a # issue or the fact that the pages do not have the tracking code.
That should be quite easy to do.
Yes of course, the site is Sök - Webb
The page view tracking works as normal so long as the q parameter is missing.
Yes that’s weired, probably @Findus23 will have an idea. I have the feeling too that there is something wrong but I cannot know what yet.
It took me a while to understand how you have embedded the tracking script. Unfortunatly I can’t find a difference between the search site you liked and the home page. The tracking request is sent to piwik and returns success (200)
You can try out enabling the debug mode for the tracker and see if an error occurs, but otherwise I am out of ideas.
I didn’t realize that the home page logged both page views and search queries…
When we enabled debug mode the request to piwik time out (we have quite a few sites using piwik). So we couldn’t get any more info from that, but it was a good idea to try.
I’ve also tired to strip the page of all html content, still no success.
What I’m thinking as a workaround is to log page views twice for our search pages.
_paq.push(['setCustomUrl', location.protocol + '//' + location.host + location.pathname]); // This will return the URL without any parameters
That will be good enough. Thanks for your help!