Google Tracking JavaScript Corruption

Ask a Question related to Macromedia Contribute General Discussion, Design and Development.

  1. #1

    Default Google Tracking JavaScript Corruption

    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

    bene Guest

  2. Similar Questions and Discussions

    1. Google Tracking Code gets corrupted
      Happy 2008! I have a client who is using Contribute 4.1 on Vista Business OS to update her website. For some reason when she makes a change to a...
    2. JavaScript Corruption?
      A client of my is using Contribute (Windows) and we have noticed an issue where JavaScript gets corrupted during editing - causing the file size to...
    3. InDesign tracking vs. Quark tracking?
      Hi Anne Marie, I would describe letter, word, and glyph scaling parameters as things the paragraph composer can fuzzy-logic work with. Fuzzy logic...
    4. SQL Index corruption
      I'm not a DBA to use the right words but I guess my sql index is corrupted, can anyone help me how to fix this problem? "coz sometimes its pulling...
    5. google spidering javascript problem
      Hi I have a few sites that i have put a javascript news ticker on http://www.bookbutlinsonline.co.uk/ Google does not seem to spider...
  3. #2

    Default Re: Google Tracking JavaScript Corruption

    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



    PFB_PFB Guest

  4. #3

    Default Re: Google Tracking JavaScript Corruption

    There are other fixes as per threads in Google Analytics help forum, here is a
    link using the search term "Contribute"


    [url]http://www.google.com/support/googleanalytics/bin/search.py?query=contribute&Act[/url]
    ion.Search=Search+Analytics+Help


    This shows other threads on the topic.

    PFB_PFB Guest

  5. #4

    Default Re: Google Tracking JavaScript Corruption

    After 24hrs I confirm the tracking code is good and receiving data. Its a confirmed fix.
    PFB_PFB Guest

  6. #5

    Default Re: Google Tracking JavaScript Corruption

    Hi Aly,

    Thank you very much indeed for your help. I appreciate it.

    sgk
    bene Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139