nican VIP
Total posts: 392
18 Май 2016 13:45

Hello, I was wondering if the facebook pixel code will work if I use it with the javascript action.

The thing is Facebook require yout to add their pixel code before the </head> tag, the Emeral javascript action where does render its code instead?

Thank you!

Последние изменения: 26 Май 2016


Sergey
Total posts: 13,748
18 Май 2016 14:02

Action Script parameter insert inside <head>. HTML parameter inside <body>.


nican VIP
Total posts: 392
19 Май 2016 14:42

Thank Sergey, will this work for facebook?

this is a tipical pixel code

<!-- 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', 'xxx');
fbq('track', "PageView");</script>
<noscript><img height="1" width="1" style="display:none" src="/ https://www.facebook.com/tr?id=xxx& ;ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->

I guess the noscript part need to be inserted in the hmlt parameter right?

Thank you


Sergey
Total posts: 13,748
26 Май 2016 15:55

nican I guess the noscript part need to be inserted in the hmlt parameter right?

I guess so.

Работает на Cobalt