homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: DixonJones & mademetop

Website Analytics - Tracking and Logging Forum

PHP template website and Google Analytics code

Msg#: 4415831 posted 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

5+ Year Member

Msg#: 4415831 posted 6:02 am on Feb 11, 2012 (gmt 0)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved