Copy link to clipboard
Copied
Hi,
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>
<script type="text/javascript"
src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<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&guid=ON&script=0"/>
</div>
</noscript>
</cfif>
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.
Thanks!
--Ben
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.
Thanks!
--Ben
Copy link to clipboard
Copied
Can you elaborate on "pukes"? Do you get a ColdFusion error? Does the page load in an unexpected way?
Copy link to clipboard
Copied
Hi Carl,
I get a 500 internal server error:
‹ í” Ê«‹¿ 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.
Copy link to clipboard
Copied
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.
Thanks!
--Ben