Announcement

Collapse
No announcement yet.

CDATA stripping

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CDATA stripping

    Hello

    I hope someone can offer advice on the problem below...

    We are trying to insert a Google Adwords tag into our website coding, and are having problems with CDATA stripping, which comes up as 'Missing CDATA comments'. The CDATA line is showing in Actinic but not if you view the original source of the website.

    An excerpt of what is included in Actinic:
    <script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = digitshavebeenremoved;
    var google_custom_params = window.google_tag_params;
    var google_remarketing_only = true;
    /* ]]> */
    </script>

    When you view the source on the website, both of the lines below have been removed:
    /* <![CDATA[ */
    /* ]]> */

    I don't know how to prevent Actinic stripping the CDATA information.

    Any help would be appreciated. Thank you.

    #2
    Try it without the 2 CDATA related lines. They don't seem necessary.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Leaving out CDATA lines can cause under reporting see: here. The software strips comments a quick fix is turn off Design menu > Design Options > Compact HTML/CGI, however that results in larger page sizes. Or you could look for a solution with custom code.
      Peblaco

      Comment


        #4
        Thank you both for your replies.

        The under reporting is what I'm trying to avoid. I have seen the article and am in touch with Google but I'm not getting anywhere.

        What do you mean by a 'solution with a custom code' please?

        Comment


          #5
          Google's tag assistant just keeps coming up with the below:

          Conversion ID
          1068091378
          <script> tag found.

          <noscript> tag found.

          Error: No HTTP response detected
          more info
          Warning: Missing CDATA comments.
          more info
          Suggestion: Code should be placed directly above the closing <body> tag

          The code is placed directly above the closing body tag so I do not understand the suggestion, and I cannot fix the error or the warning.

          Comment


            #6
            Here's something worth trying.

            Make up a little file (in your Site folder) called trackingcode.js.

            Put the following into said file (changing digitshavebeenremoved as required):
            Code:
            /* <![CDATA[ */
            var google_conversion_id = digitshavebeenremoved;
            var google_custom_params = window.google_tag_params;
            var google_remarketing_only = true;
            /* ]]> */
            Then go to Design / Additional Files and add file trackingcode.js.
            And the code you put into your pages simply becomes:
            Code:
            <script type="text/javascript" src="trackingcode.js"></script>
            I've tried this and the browser executes the JS with the CDATA stuff in place.

            However if Google is doing some trickery like reading / tweaking the page source it may not pick up the included file.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Thank you very much for those suggestions. The quick fix in post 3 did resolve the CDATA comments

              I'm still dealing with the below, but I will go back to Google before troubling you further.

              Error: No HTTP response detected more info
              Suggestion: Code should be placed directly above the closing <body> tag.

              I could be back this afternoon!

              Thank you both.

              Comment


                #8
                Yes I know, but thanks for checking!

                Comment


                  #9
                  Thank you for that suggestion. It is appreciated.

                  I have just heard back from Google, and although the tag assistant mentions the closing </body> tag it is in fact working correctly.

                  The HTTP error persists: Error: No HTTP response detected

                  We now think this error is due to Actinic inserting acatalog/ into the code, shown in pink below.

                  <!-- Google Code for Remarketing Tag -->
                  <!--------------------------------------------------
                  Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. See more information and instructions on how to setup the tag on: http://google.com/ads/remarketingsetup
                  --------------------------------------------------->
                  <script type="text/javascript">
                  /* <![CDATA[ */
                  var google_conversion_id = digitsremoved;
                  var google_custom_params = window.google_tag_params;
                  var google_remarketing_only = true;
                  /* ]]> */
                  </script>
                  <script type="text/javascript" src="acatalog///www.googleadservices.com/pagead/conversion.js">
                  </script>
                  <noscript>
                  <div style="display:inline;">
                  <img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/digitsremoved/?value=0&amp;guid=ON&amp;script=0"/>
                  </div>
                  </noscript>
                  </body>


                  Do you have any thoughts on how to stop this please?

                  Comment


                    #10
                    See fix here.
                    Peblaco

                    Comment


                      #11
                      Thank you for that. Problem solved!

                      Thank you so much to both of you for your help and assistance. It is much appreciated.

                      Comment

                      Working...
                      X