[Resolved] Body tag location

Home Forums Support [Resolved] Body tag location

Home Forums Support Body tag location

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #129618
    Aun Raza

    Hello Tom

    I’m using generatpress on my site linuxpitstop.com, I have signed up for a pop under ad with some ad network. They gave me code to put before the body tag. I can’t locate whats the correct file to place this code. Where is body tag located (i mean in which file) ?

    Thank you!

    Regards
    Aun

    #129623
    Tom
    Lead Developer
    Lead Developer

    Do you have GP Premium or GP Hooks?

    If so, you can place your code in the wp_head hook.

    Let me know 🙂

    #129626
    Aun Raza

    Thanks for prompt response Tom

    I have GP Premium – which file i should be using in this case?

    Regards
    Aun

    #129627
    Tom
    Lead Developer
    Lead Developer

    First, make sure GP Hooks as activated in “Appearance > GeneratePress”.

    Then, go to “Appearance > GP Hooks” and place your code into the wp_head textarea.

    #136318
    meleager

    Hi Tom,

    I will take the liberty to use the already opened “ticket” to add my question.
    Can I place my Google Tag Manager snippet there too? The instructions say to place it immediately after the opening <body> tag. Thanks.

    Best regards,
    Dimitar

    #136332
    bdbrown

    Hi Dimitar. The “Before Header” hook will insert it right after the opening <body> tag.

    #136411
    meleager

    Thank you. Unfortunately placing it there did not do the job. I have placed the Google Analytics tracking code there too and still see ‘Status: Tracking Not Installed’.

    #136417
    Tom
    Lead Developer
    Lead Developer

    I believe both of the above scripts should go in the wp_head hook.

    #210825
    Daniel

    I’ve tried this, but it produces an empty line under the menu bar… is there any other way of including it? Thanks!

    PS. still loving the theme!

    #210881
    Tom
    Lead Developer
    Lead Developer

    What are you adding?

    #210950
    Daniel

    Google call conversion tracking

    #211053
    Tom
    Lead Developer
    Lead Developer

    Adding it to the wp_head hook shouldn’t create any spacing.

    Any examples of the code you’re adding?

    #275267
    Suzanne

    Hi,
    I am having the same issue – putting the code for both my Google Analytics code (currently in my site without issue) and my new Retargeting Pixel code to the wp_head hook is adding a blank line and forcing my header image down.

    See screenshot of site with both codes included in wp_head, red arrow pointing to blank line: https://tinyurl.com/zcqvc6e

    See the code I put in the wp_head hook: https://tinyurl.com/hwxuz7f

    Same blank line occurs if I put the Retargeting Pixel code in Before Header hook

    The instructions for the Retargeting Pixel I received for implementation: The entire HTML pixel code, from , should be placed unaltered directly after the opening <body> tag. **Disclaimer: never edit the code

    Where to put the Retargeting Pixel code so it doesn’t insert a blank line?

    #275342
    Tom
    Lead Developer
    Lead Developer

    Hard to tell without seeing the site, but try adding this to your <img> element: style="display:none;"

    <img style="display:none" ... />

    #275598
    Suzanne

    Thank you, I will contact the marketing company and verify that I can put this in.

Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.