Page tracking and SEO friendly urls


#1

I’m having a problem in a fairly common setup

I’m using a SEO friendly setup in my site, redirecting all page requests to index.php?page=
Ex: website.com/contacts goes to website.com/index.php?page=contacts
index.php then handles the request, pretty basic, common stuff.

My problem is that i’m tracking pages using javascript on the index.php
That works fine and all the pages do get tracked. Unfortunately ALL page requests also get tracked, including pages that don’t exist.
Ex: website.com/made_up_page
made_up_page gets a hit although it does not even exist.

How do I get around that issue?

Thanks


(Matthieu Aubry) #2

do you mean that 404 pages are tracked and you don’t want to track 404 pages? in this case, do not print out hte piwik code in the pages when these pages are 404


#3

[quote=matt]
do you mean that 404 pages are tracked and you don’t want to track 404 pages? in this case, do not print out hte piwik code in the pages when these pages are 404[/quote]

Hello Matt,

All requests are directed to index.php and the piwik js tracking was on index.php, so that would not work.

Instead, I worked around this issue using the php tracking, and some php verifications.

Thanks for your reply.