By hp9 on
We are testing a marketing campaign that requires that their JavaScript code be added between the end body tag and the end html tag. I have seen this on several sites using their service, and this is where the code has to go. It cannot be in the body section.
For now, we just want this code on one page. Is this possible, and how can it be done?
Thanks.
Comments
You can add the javescript
You can add the javescript using drupal_add_js() something like
or
That'll still be inside the
That'll still be inside the body I'm afraid.
For this, you'll probably have to edit your theme's page.tpl.php file. You can just hard code your script where you want it in there. If you want it just on one page like you said, try something like:
quasi-edit: Wait a minute, can you even put
<script>outside the body? Are you sure you're not supposed to put it JUST BEFORE the closing body tag? That's usually where these types of things go (google analytics, etc)... In which case use nevets' approach above.That worked
Thanks.
That worked great, using $_GET['q'].
According to the marketing company, their code does work after the end body tag.