3 Replies Latest reply on Apr 20, 2016 8:51 AM by bconner

    Google ad word tracking code

    bconner Level 1



      I don't use CF too often and forget what little I did know.  I've been asked to insert some javascript into the header section of a CF page per the following:


      <cfif FindNoCase("store.cfm?do=checkout&area=Purchase",cgi.http_referer)>


          <script type="text/javascript">

      /* <![CDATA[ */

      var google_conversion_id = 1070946261;

      var google_conversion_language = "en";

      var google_conversion_format = "3";

      var google_conversion_color = "ffffff";

      var google_conversion_label = "BslPCPb--mQQ1a_V_gM";

      var google_remarketing_only = false;

      /* ]]> */


      <script type="text/javascript"




      <div style="display:inline;">

      <img height="1" width="1" style="border-style:none;" alt=""

      src="//www.googleadservices.com/pagead/conversion/1070946261/?label=BslPCPb--mQQ1a_V_gM&am p;guid=ON&amp;script=0"/>





      When I do, the page immediately pukes in CF 9.  I'm sure there is something I'm overlooking but just can't see it.  Any advice gratefully accepted.





        • 1. Re: Google ad word tracking code
          Carl Von Stetten Adobe Community Professional & MVP

          Can you elaborate on "pukes"?  Do you get a ColdFusion error?  Does the page load in an unexpected way?

          • 2. Re: Google ad word tracking code
            bconner Level 1

            Hi Carl,


            I get a 500 internal server error:


            Server Error



            500 - Internal server error.

            There is a problem with the resource you are looking for, and it cannot be displayed.


               ‹ í” Ê«‹¿ dñË%Ö{Ý‰Ú à$ýÖˆ?Ç?M Ä 4"ïýiOí¶‡HÑ`x9æ/1)/NÚãîHåEÎ# ˆˆF- „oe<áÒ õZ]Ç/8x4Ʊ(-Ä2iõ "D5QzJ› ú ⛨ãî E †œØÉô’?GÑÅåú


            Õ£Ò ‘›é‰èø×Ljì  XE£üQZÄfn´†¾ÈCÄA`5î ²¤1 ÷È ¿y38 „²HªSJëb¨DV·ñ'ìµG¥Ì¨Ä$cfATŸ2ñ`xNÊÕ0X · 2_ c  ÎÉPn ºý ýC „yC


            That's pretty pukey to me.

            • 3. Re: Google ad word tracking code
              bconner Level 1

              Ah geez.  I found it.  A comment prior to this code didn't have all 3 '-' in it in the closing string, which caused a large chunk of code to be commented out.  Sigh.