![]() |
![]() |
||||||
|
|||||||
| Tags: corruption, google, javascript, tracking |
![]() |
|
|||
|
Hello,
I've installed JavaScripts from Go ogle Analysis for tracking of traffic in all 15 templates of a site, using Dreamweaver CS3. The templates and pages which I create using Dreamweaver work fine. The related site editors are adding content to the pages and/or creating new pages using the same templates in Windows Contributor 4.1. Every time an editor creates or opens a page, Contribute flags a number of errors then corrupts the JavaScripts that are locked in the templates. Thereafter, it throws part of the script at the bottom of the page. It looks like this: " ) ) ; Does anyone have such an experience and if so does any one know of a solution? Thanks. sgk |
| Sponsored Links |
|
|||
|
Hi SGK
CAUTION: I am still waiting for 24hrs to see if the data is being received correctly by Google Analytics having made these code changes on the website pages, so test this out before using. Just found the answer to this at Google Groups > Google Analytics Help today. To quote the post from the forum: "Blogger (and most modern HTML tools) enforce a level of XHTML compliance, which is more than the Google Analytics code complies with (Google messed up the ga.js installation instructions), you will need to cut out all the HTTM/HTTPS auto-detection including the document.write and just use the version you need (http or https, like so)" For HTTP: <script type="text/javascript" src="http://www.google-analytics.com/ ga.js"></script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-XXXX-1"); pageTracker._initData(); pageTracker._trackPageview(); </script> For HTTPS: <script type="text/javascript" src="https://ssl.google-analytics.com/ ga.js"></script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-XXXX-1"); pageTracker._initData(); pageTracker._trackPageview(); </script> ******************** Another post mentioned that Contribute is converting the 'escaped' characters as shown in the example: type="text/javascript%3E%3C/script%3E")); Contribute alters the code to the literal: type="text/javascript/script%3E")); So the code doesn't work and ")); lands on the bottom of the page. The original urchin.js code doesn't have any such escapes so presumably isn't being altered by Contribute in this way. This is possibly the same issue of why the new Google Analytics code isn't working with WordPress Blogger as well but I haven't tested that one out. Hope this helps. Aly |
|
|||
|
There are other fixes as per threads in Google Analytics help forum, here is a
link using the search term "Contribute" http://www.google.com/support/google...contribute&Act ion.Search=Search+Analytics+Help This shows other threads on the topic. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise