I am trying to track a redirect page with google analytics:
I have a page called redirect.php
; when I visit an url like redirect.php?c=12345678
You need to add your Analytics code BEFORE the redirect.
GA works in the browser. Whenever the user visits a page with the GA script - a request from the user to google is sent notifying about the visit. Since you are making a 301 header redirect - no GA script is loaded and therefore google doesn't know the user has been on that page.
Options you have
Of course you could merge the options and have, say a page with meta redirect and the GA code, which redirects to redirect.php script, which in turn redirects with a 301 header, but this is not the best solution.