Facebook Pixel Code Error in Header.tpl

Hi
I want to add Facebook Pixel my 2.4.8 OJS website.
I added the code to lib/pkp/templates/common/header.tpl
and tried /templates/common/header.tpl

But i got errors after adding the code into the header part. Error message is while checking the existence of the code with Facebook Pixel Helper Chrome extension is:
“The Facebook pixel code on this page didn’t load, so no information was sent to Facebook…”
My ojs version is 2.4.8.1
Best

Hi @Baris_Kiremitci,

Can you describe the modification you made in more detail?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
What i did as follows

I have the code from facebook pixel

<!-- Facebook Pixel Code -->

2- added this code to
lib/pkp/templates/common /header.tpl

tried to add different sections of header

just before
between {$additionalHeadData} and

You can see code live at www.ejpam.com
Regards
Baris Kiremitci

Hi @Baris_Kiremitci,

That looks like it got garbled in the posting. Can you use the code quote feature when writing your post?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
Sorry for my late reply.

<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s);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', '434648870213373', );
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=434648870213373&ev=PageView&noscript=1"
/></noscript>
<!-- DO NOT MODIFY -->
<!-- End Facebook Pixel Code -->

This is the code.
Best
Baris Kiremitci

Hi @Baris_Kiremitci,

If you’re inserting this code into a template file, you likely need to surround it in {literal} and {/literal} tags. Smarty templates use { and } characters, and will try to interpret them when they show up in the templates without escaping.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
Thank you for valuable your time and help.
It is working now.
Best
Baris Kiremitci