I have placed a query on my website header, basically the way it works is I have a mysqli query on each page pulling it's URL and does:
INSERT INTO analytics (url) VALUES ($url);
Which just updates the table any time a page is loaded.
The problem is - I am seeing insane levels of traffic that are not anywhere even close to the levels reported by google analytics.IE: One page in google analytics is showing 1200 views - and in my table it's showing 4000. I expected a discrepency, but not this much.
Is there a reason for the discrepency? Is there any way to fix the tracking in my query to filter people out?