• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Problems installing Facebook Pixl
PostPosted: Sun Apr 28, 2019 9:51 am 
Offline
Forum Members
Forum Members

Joined: Mon May 01, 2006 5:24 pm
Posts: 128
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),
Attachment:
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 239 times ]

I get a syntax error when I try to save the template (second screenshot)
Attachment:
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 239 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 -->
<__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', '1503549823290444');
fbq('track', 'PageView');
</__script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1503549823290444&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Problems installing Facebook Pixl
PostPosted: Sun Apr 28, 2019 11:46 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7690
Location: The Netherlands
You have to add {literal} {/literal} around the javascript code.

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

_________________
Image

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return!



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Problems installing Facebook Pixl
PostPosted: Sun Apr 28, 2019 1:59 pm 
Offline
Forum Members
Forum Members

Joined: Mon May 01, 2006 5:24 pm
Posts: 128
Thank you, now I can save it indeed! Gonna try if it's working correctly now, thanks so much :)


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Problems installing Facebook Pixl
PostPosted: Sun Apr 28, 2019 2:14 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Mon Jan 29, 2007 4:47 pm
Posts: 1747
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.

_________________
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).


Code of Conduit | CMSMS Docs
Help Support CMSMS
My developer Page on the Forge | Yet another blog about CMSMS

GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting