1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.0 Doubleclick Ad Tags: Header Code Appears At Bottom

Discussion in 'Troubleshooting and Problems' started by TheBigK, Nov 4, 2011.

  1. TheBigK

    TheBigK Well-Known Member

    As far as I know, the header code is rendered at the bottom of the page - which (I think) makes my doubleclick ad implementation useless.

    Doubleclick requires that a code to be put in the header and it *should* render at the top of page. However, I noticed that in the page source code; the code inserted in 'header' template appears at the bottom of the page and the ad-tag appears above. This prevents the ad from being displayed on pages.

    Can someone help me fix this?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Have you tried adding it to the page_container_js_head template?
    Or the PAGE_CONTAINER template?
     
  3. TheBigK

    TheBigK Well-Known Member

    Tried. Not working :( . It seems that doubleclick header code should output on the top of the ad tags in the page in order to display the ads correctly.
     
  4. soloarquitectura

    soloarquitectura Active Member

    Try google_analytics template.
     
  5. TheBigK

    TheBigK Well-Known Member

    If I insert the doubleclick header code in PAGE_CONTAINER template in 1.1, I get an error message and I can't save anything to it. It seems that the PAGE_CONTAINER rejects all extra code.

    For doubleclick ads to show in pages, I must have the header code rendered *before* the actual advertisement tag in the HTML.
     
  6. TheBigK

    TheBigK Well-Known Member

    Update: I get following error in the popup -

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster@domain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
     
  7. soloarquitectura

    soloarquitectura Active Member

    To us it works well in google_analytics template, by placing the code before the Google Analytics code.
    We are using DFP asynchronous tags.
    Brogan's solution also works fine (page_container_js_head), we have tested it.
     
  8. Andy.N

    Andy.N Well-Known Member

    I put the DFP asyn code in js_head template.
     
  9. Mike

    Mike XenForo Developer Staff Member

    The ISE error is likely caused by mod_security. You can try to uncomment the lines in the .htaccess file related to this. If that does not work, you'll have to contact your host.
     

Share This Page