Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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

1 Answer 1

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.