- This topic has 10 replies, 3 voices, and was last updated 5 years, 11 months ago by
Tom.
-
AuthorPosts
-
May 4, 2020 at 12:21 am #1268280
jmpefe78gmail-com
Hola, cuando añado el script del pixel de Facebook en el hook me generar errores al ver la herramienta de w3 validator.
Concretamente muestra errores relacionados con el logo. Si quito el código y lo añado en Google Tag manager no sucede ese error.
Quiero meterlo el hook pero no quiero tener esos errores y no sé porque el pixel de facebook produce errores en el logo.Cual es el problema?
Ahora lo tengo metido en en google tag manager (no quiero tener esos errores)
Gracias
Hello, when I add the Facebook pixel script in the hook I get errors when I see the w3 validator tool.
Specifically, it shows errors related to the logo. If I remove the code and add it in Google Tag manager that error does not happen.
I want to hook it but I don’t want to have those errors and I don’t know why the facebook pixel produces errors in the logo.What is the problem?
Now I have it in google tag manager (I don’t want to have those errors)
Thank you
May 4, 2020 at 4:01 am #1268520David
StaffCustomer SupportHi there,
which Hook are you using to add your Pixel ?
May 4, 2020 at 4:12 am #1268533jmpefe78gmail-com
Lo metí en hook dentro de wp_head para todo el sitio
May 4, 2020 at 5:49 am #1268653David
StaffCustomer SupportCan you share the code here ?
May 4, 2020 at 5:57 am #1268663jmpefe78gmail-com
<!– Facebook Pixel Code –>
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version=’2.0′;
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,’script’,
‘https://connect.facebook.net/en_US/fbevents.js’);
fbq(‘init’, ‘1508982275809635’);
fbq(‘track’, ‘PageView’);
</script>
<noscript><img height=”1″ width=”1″ style=”display:none”
src=”https://www.facebook.com/tr?id=1508982275809635&ev=PageView&noscript=1″
/></noscript>
<!– End Facebook Pixel Code –>May 4, 2020 at 6:28 am #1268718David
StaffCustomer SupportCan you add the Pixel using the Hook element – so i can take a closer look?
May 4, 2020 at 6:50 am #1268756jmpefe78gmail-com
Ya está agregado. Como podrás ver se han generado errores al pasar el validador w3
May 4, 2020 at 11:32 am #1269367jmpefe78gmail-com
¿Cómo se puede arreglar? Si pones el pixel se generan muchos errores en el logo y favicon y si quitas el pixel todo ok
May 4, 2020 at 4:18 pm #1269669Tom
Lead DeveloperLead DeveloperHi there,
It looks like you’ve added the
<noscript><img... /></noscriptHTML intowp_headas well. That code should be added in thewp_open_bodyhook.May 4, 2020 at 4:52 pm #1269700jmpefe78gmail-com
Ok perfecto. Ahora ok pero esa parte no tiene que ir en el head como dice Facebook? Gracias
May 4, 2020 at 4:57 pm #1269701Tom
Lead DeveloperLead DeveloperHTML like
<img>shouldn’t go in the<head>section. If HTML exists in there it won’t pass validation. -
AuthorPosts
- You must be logged in to reply to this topic.