Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have a universal Footer, include('footer.php'); on my page - will the google analytic's script I just put there be able to track my page views?

share|improve this question
up vote 6 down vote accepted

Google Analytics runs in the browser after the PHP has generated the page's HTML. So if you use a PHP include to include a common footer containing the Google Analytics code it will track the page view for all of those pages.

share|improve this answer
for all those (individual) pages right? That's pretty cool <3 google – Howdy_McGee Sep 1 '11 at 2:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.