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

XF 1.3 Where to place DFP ansynchronous code?

Discussion in 'Styling and Customization Questions' started by sophie1204, Jul 31, 2014.

  1. sophie1204

    sophie1204 Active Member

    I'm adding tags for ads using DFP for Small Business, and I'm not sure in which template to place the ansynchronous code. I found a thread where a few XF 1.0 users had success putting it in either the Google Analytics template or the page_container_js_head. Does this still work? In the Google Analytics template, someone said it needed to go before the Google Analytics code. So would it go before or after this:

    <xen:if is="{$xenOptions.googleAnalyticsWebPropertyId}"><script>

    If I use the page_container_js_head template, where would it go there?

    Or should I put it somewhere else entirely?

    Sorry if this is incredibly stupid and basic. I just have no idea.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You can add it to either of those templates.

    The FAQ in my signature has general guidance on where to add custom js.
  3. sophie1204

    sophie1204 Active Member

    Thank you. So it looks like you're saying I can put it anywhere in the page_container_js_head template? Can or should it be before <script src="{$jQuerySource}"></script>?

Share This Page