We help IT Professionals succeed at work.

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

Medium Priority
548 Views
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!
Comment
Watch Question

Technical SEO Consultant
Commented:
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
That was it!

Went to Modify>Templates>Update Pages...

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

Thanks!!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.