I checked the code in the dfp_tag.tpl.php is the plane javascript. Which causes problem if scripts are moved to bottom. Which left variables in tpl file undefined and raise errors.

  <script type="text/javascript">
    googletag.cmd.push(function() {
      googletag.display("<?php print $tag->placeholder_id ?>");
    });
  </script>

Add that js in the renderable for dfp_tag function. Checked for Blocks causing problem.

CommentFileSizeAuthor
#2 2642750-1-removing-inline-js.patch951 bytespradeep22saini

Comments

pradeep22saini created an issue. See original summary.

pradeep22saini’s picture

Status: Active » Needs review
StatusFileSize
new951 bytes

Updated the patch to remove inline js and adding that in the renderable array.

bleen’s picture

By definition, add tags need to show up inline. I kow that typically you do not want inline js, but this is the exception based on how ad tags work.

alexpott’s picture

Also there are features that Google's DFP uses that require the JS goes in HEAD - for example the ability to download all the ads in a single request.

vladimiraus’s picture

Status: Needs review » Closed (outdated)

Thank you for your contributions.
Drupal 7 is no longer supported.
Closing issue as outdated.