View Full Version : Template issue or php?

11-12-2009, 01:57 PM
Hi Guys,

Iím pulling my hair out..I wonder if you could help me pls.

I have just launched my website which I have just created in DreamweaverÖGreat!
All is well until I try to put the tracking script I for Google Analytics!

I have mostly html pages but a couple of php pages too.

Google says that for html pages you just put the java script in the bottom of the page just before the </body> tag.
It also says if your pages are php, you need to put in an include to an external script in the same place instead of the javaScript.

My pages are generated from templates. So now I have two templates. One for the html with the JavaScript and one with the php include.

Hereís where the problem starts!!

The html version works fine and is being tracked.

When I created a php version now it looks like itís maintaining the template structure (uneditable regions in grey), but you can actually edit all the page.
Itís like the php include at the bottom has broken the template??

Itís very frustrating and I canít find a solution. I know itís a problem but I donít know why.

Surely someone must of come across this if you have dreamweaver template generated pages and are using Google analytics.

Any help gratfully received.


:( :( :(

11-12-2009, 04:08 PM
Not come across this before but would be useful to see some code or for you to give a URL.

11-12-2009, 04:30 PM
I've added the google analytics code straight into a php page with no issues.

11-12-2009, 05:49 PM

did you just add the javascript code at the bottom before the end body tag or did you have to use the "include" and the external file?



11-12-2009, 06:05 PM
You can do either as far as I know. I tend to use the 'includes' method though.

11-12-2009, 07:26 PM
Yep I thought so too. Putting the javascript at the end work perfectly, but when I put the include in, it really screwd up the template!!

I've added the google analytics code straight into a php page with no issues.

Which did you do domedia? Just added the javadirect or the include?



11-12-2009, 08:00 PM
Just the JavaScript