Why does my Google Analytics code disappear from my Dreamweaver Template when put online?

Posted on 2009-02-19
Medium Priority
Last Modified: 2013-12-25
We have a fairly simple website setup. It uses Dreamweaver templates. We wanted to implement Google Analytics which should be easy enough.

I didn't design the site originally so I'll go through my thought process:

Google Analytics says to put the code before the </body> part of the html code.
If I open up a page, such as contactUs.html for example, there is a large chunk of uneditable code at the beginning and the end. This is the Dreamweaver template and it contains the </body> code.

Thus I close that html file and open up the Dreamweaver template and edit that instead. I then close it and open back up the contactUs.html file and voila, the code is right there where it should be.

Easy right? Well I then upload the files to my web server and I notice that Google Analytics isn't really tracking. Something is amiss. I go to the web page and do a right click>view source and the Google Analytics code is NOT showing up. What the heck?

So I re-download the file and view it again in Dreamweaver and, voila, the code is back.

So it appears something is filtering out the code when it's on the web server, but that the code is still actually sitting in the Template.

Any ideas? Thanks!
Question by:MadGeniusInc
LVL 23

Accepted Solution

Tony McCreath earned 2000 total points
ID: 23690622
Its been years since I touched Dreamweaver

Don't you have to do some sort of template update so all the files using the template pick up the changes

Author Comment

ID: 23692570
That was it!

Went to Modify>Templates>Update Pages...

...and voila! Make sure you have a correct "site" defined.


Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Strategic internal linking is often considered an SEO power technique, especially for content marketing. Do you need to hire an SEO agency to optimize you internal linking? No, this article will help you understand the basics of internal linking and…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses
Course of the Month15 days, 20 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question