XF 1.0 Doubleclick Ad Tags: Header Code Appears At Bottom

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?
 
Have you tried adding it to the page_container_js_head template?
Or the PAGE_CONTAINER template?
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.
 
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.
 
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.
 
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.
 
Top Bottom