Closed (fixed)
Project:
Quantcast
Version:
6.x-1.2-beta1
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Aug 2009 at 23:58 UTC
Updated:
20 Mar 2010 at 23:20 UTC
Hi, the quantcast code slotted in well and appears in every page, thanks for your efforts.
At the bottom of each page some characters appear that look like html escape code without the exclamation mark
//-->
in the code they appear right at the end of the body, after noscript and the quantcast gif
<noscript> <img src="http://pixel.quantserve.com/pixel/p-xxxxxxxxxxxxx.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/> </noscript>
//-->
Looking at the javascript in the webdeveloper toolbar I can see that the Jquery inline script is being intersected by the quant.js
Inline Script
<!--//--><![CDATA[//><!--
<!-- Start Quantcast tag -->
<script type="text/javascript">
_qoptions={
qacct:"p-d5kgygRGsIH5E"
};
** Google analytics uses drupal_add_js($script, 'inline', 'footer');
Many thanks for any pointers or solutions
R3
Comments
Comment #1
rup3rt commentedI have solved my problem by placing the quantcast js in the Closure region (I use a canvas subtheme) with
drupal_add_js($script, 'inline', 'closure');Placing it directly into the footer region didn't work.
R3
Comment #2
irakli commentedIt seems like drupal_add_js() is not a good way of embedding this code, at all, since the code itself is HTML and the add_js() wraps it into <Script> tags considering it's just javascript.
I moved everything to hook_footer() and it should work much better now.
Thanks for reporting this.
Comment #3
irakli commented