谷歌分析跟踪php mvc页面浏览量

Im trying to figure out how to track google analytics php mvc page views. I have through htaccess told the server to route all requests through an index.php file in the root. My google anayltics tracking is only recording page views for the root folder (/) .... Obviously makes sense because im routing through the index. My question is how to tell google the actual page url for the content im showing in the index.php file. Can anyone help? Do I need to use google Event tracking codes or is there a better solution for this?

You can do virtual pageviews in GA (without url rewriting or changing anything in your application) by passing a custom pagename and pagepath to the configuration object in a send pageview call:

ga('send', 'pageview', {
  'page': '/my-virtual-url',
  'title': 'my virtual title'
});

"Virtual" means those pages do not have to exist on your server, GA will simply report the values you have passed it, so you could create e.g. a custom path from your query parameters.