No announcement yet.

Problem when installing Google Tag Manager in vbulletin

  • Filter
  • Time
  • Show
Clear All
new posts

  • [Bug / Issue] Problem when installing Google Tag Manager in vbulletin

    Hellow Friends, i did configuration of Google Tag Manager. aftar that it generated 2 codes, one must put in head tag and the other on in body tag.
    PHP Code:
    Copy the code below and paste it onto every page of your website.

    Paste this code as high in the <headof the page as possible:

    Google Tag Manager -->
    Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    End Google Tag Manager -->

    Additionallypaste this code immediately after the opening <bodytag:
    Google Tag Manager (noscript) -->
    noscript><iframe src=""
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    End Google Tag Manager (noscript) --> 

    I considerd vbulletin configuration, it doesn't have any place to put GTM codes like Google Analytics. how can i install above codes on vbulletin so that Google Tag Manager can detect them?

  • #2
    You can place code in the <head> tag using the headinclude template provided in every style. This template ships empty and is for the specific purpose of putting custom code into the <head> tag.

    For the second set of code, you can either place it is an Ad location or use one of the many template hooks in vBulletin 5. You can display any custom template within a template hook. You probably want to create a custom template and then apply it to the header_after_body_begin hook location under Hooks & Products -> Template Hook Manager -> Add New Hook.

    You can see all template hook locations on the front end if you feel a different location would be better. To do this go to Settings -> Options -> Product/Hook System. Set "Add Hook Name in HTML Comments" to Yes and "Show Hook Links" to one of the Show options. Clicking on one of the red hook locations on the front-end will take you to the AdminCP to create the Hook.
    Last edited by Wayne Luke; Mon 26 Apr '21, 10:24am.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API


    Related Topics