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

Posted on 2009-02-19
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

    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

    That was it!

    Went to Modify>Templates>Update Pages...

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


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
    When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
    This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
    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…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now