• I want to install a Facebook meta pixel to the web page. Facebook has a plug-in that puts code into the header but it requires a header plugin and I’m afraid that will conflict with twenty twenty two’s own header so I haven’t dared to try it.

    There is also a manual install using html code that should be pasted into the header just below the /head tag. But how do I do that in twenty twenty two?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator jordesign

    (@jordesign)

    Hi @hbhandlar – I can definitely appreciate you wanting to be cautious – plugin conflicts can be tricky when they happen.

    The good news is that a ‘Headers and Footers’ plugin like this one (linked below) is something you can use to add code like that meta pixel – but doesn’t actually affect the display of your site.

    https://www.ads-software.com/plugins/wp-headers-and-footers/

    Part of the confusion is that a plugin like that is used for inserting things into the Head/er code of the site – which is different to the ‘header’ area of your site which contains the logo/menu etc.

    Could you please try out using that plugin and see how you go?

    Thread Starter hbhandlar

    (@hbhandlar)

    I installed the plugin WPCode lite, I think it should be similar.

    But after pasting the code in the header part a warning is displayed. “An alt attribute must be present in <img> elements.”

    This is the line it complains to:
    <noscript><img height=”1″ width=”1″ style=”display:none”

    Installing anything with warnings is scary. Is it possible to remove code that has been installed in case of that it doesn’t work.

    Moderator jordesign

    (@jordesign)

    Hi @hbhandlar – definitely worth checking but about error messages, but the good news is that one isn’t anything too much to worry about.

    “An alt attribute must be present in <img> elements.”

    This is usually very good advice – the ‘alt’ attribute is one that is used to describe images to users who may be site impaired – which is why it is recommended (or required).

    in the instance of that specific image – I’d normally say an ‘alt’ attribute isn’t required, as it is just a placeholder image.

    But what you could do if that error is showing – is change the code for the image from:

    <noscript><img height=”1″ width=”1″ style=”display:none”

    to

    <noscript><img height=”1″ width=”1″ style=”display:none” alt="spacer image"
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to install a meta pixel in twenty twenty two?’ is closed to new replies.