No announcement yet.

Google DFP Header Script.

  • Filter
  • Time
  • Show
Clear All
new posts

  • Google DFP Header Script.

    Good day all,

    I just upgraded to VB5 and kind of lost...

    I need to add my Google DFP code right under the <head> tag, but or the life of me I can't file the file to modify.


  • #2
    You shouldn't modify files at all with vBulletin. Doing so will break the software and the HTML code that is output is not stored in any files.

    To do this the proper way, you need to log in to your AdminCP. Go to Styles & Templates -> Style Manager. Click the <<>> button and find the head_include template. You can then paste the code in here and save.

    Another method is:

    Choose your style and select "Add New Template" off the dropdown.

    1) Give it a memorable name like header_google_dfp

    2) Paste your code into the big template box.

    3) Save this at the bottom.

    Now, in the AdminCP go to Hooks & Products -> Manage Hooks.

    1) Click Add New Hook.

    2) Select header_head as the location.

    3) Give it some title.

    4) Enter the template name that you created above in the template name field

    5) Save the Hook at the bottom.

    Now, your code should load properly and you won't have issues when you update vBulletin in the future because a template or file gets overwritten with new code or a template merge goes bad for some off the wall reason.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud customization and demonstration site.
    vBulletin 5 Documentation - Updated every Friday. Report issues here.
    vBulletin 5 API - Full / Mobile
    I am not currently available for vB Messenger Chats.


    • #3
      Thank-you sir, that did the trick!


      Related Topics