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”:
?q=pizza+pie
This will log a site search but not a page view.
If we exclude the query paramter:
?q=
It will log a page view.
Is it possible to get both?
Hi there,
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.
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)
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(['trackPageView']);
_paq.push(['setCustomUrl', location.protocol + '//' + location.host + location.pathname]); // This will return the URL without any parameters
_paq.push(['trackPageView']);