CMS Made Simple Forums

Problems installing Facebook Pixl
Page 1 of 1

Author:  Kaylen [ Sun Apr 28, 2019 9:51 am ]
Post subject:  Problems installing Facebook Pixl

I have been trying to install Facebook Pixel but not succeeding and I need help please.

When I add it to the template right above the </head> part where they say to add it (first screenshot),
File comment: Where I add the code in the template
Screenshot 2019-04-28 at 11.37.33.png
Screenshot 2019-04-28 at 11.37.33.png [ 176.44 KiB | Viewed 772 times ]

I get a syntax error when I try to save the template (second screenshot)
File comment: The syntax error I am getting
Screenshot 2019-02-18 at 21.35.18.png
Screenshot 2019-02-18 at 21.35.18.png [ 260.33 KiB | Viewed 772 times ]

I don't know how to fix this and I have tried contacting FB but they are not responding, so I would appreciate it greatly if someone could lend assistance, thank you in advance!

I copy and paste the code directly form the facebook pixel install page...

This is it:
<!-- Facebook Pixel Code -->
s.parentNode.insertBefore(t,s)}(window, document,'script',
fbq('init', '1503549823290444');
fbq('track', 'PageView');
<noscript><img height="1" width="1" style="display:none"
<!-- End Facebook Pixel Code -->

Author:  Rolf [ Sun Apr 28, 2019 11:46 am ]
Post subject:  Re: Problems installing Facebook Pixl

You have to add {literal} {/literal} around the javascript code.

Or add in that code a space before and after the curly brackets.

Author:  Kaylen [ Sun Apr 28, 2019 1:59 pm ]
Post subject:  Re: Problems installing Facebook Pixl

Thank you, now I can save it indeed! Gonna try if it's working correctly now, thanks so much :)

Author:  Jo Morg [ Sun Apr 28, 2019 2:14 pm ]
Post subject:  Re: Problems installing Facebook Pixl

The fact that the javascript code is visible means that there is an error somewhere else in your template. Make sure the code is being inserted right above the </head> tag as stated and that the tags are paired correctly.
Either of Rolf's suggestions work the same, so the error must be somewhere else.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group