Welcome to WebmasterWorld Guest from

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

PHP template website and Google Analytics code



12:03 pm on Feb 9, 2012 (gmt 0)

I have a single website (I made it myself) with one header, footer and multiple sites in between (I use php include function). I also created a simple command that dynamically changes pages title depening on the site that is used; thats from the header.php

<meta charset="utf-8" />
<title><?php if (isset($subtitle)) { echo $subtitle; } ?></title>
<link rel="stylesheet" href="css/main.css" type="text/css" />

I just signed up for Google Analytics and I know that I need to add the code they provide just before the </head> tag and I am wondering how is it gonna affect tracking all the pages that I have:


I am gonna be embeding Wordpress into the site, but I am not gonna worry about tracking all the pages there etc, but I would like to have separate data for all the listed above subpages. What is the way to do that? Is it gonna work if I am just gonna add the code to single header.php file now?

Thank you.

azn romeo 4u

6:02 am on Feb 11, 2012 (gmt 0)

10+ Year Member

Put it in the footer. GA doesn't really track individual pages. It shows you the most visited pages, but that's about it.

But maybe you can set "goals" or something if you want to track those pages as if they were some type of conversion.

Featured Threads

Hot Threads This Week

Hot Threads This Month