Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Add FB pixel support #35

Open
landsman opened this issue Jan 12, 2017 · 0 comments
Open

Add FB pixel support #35

landsman opened this issue Jan 12, 2017 · 0 comments

Comments

@landsman
Copy link

landsman commented Jan 12, 2017

Can you please add support of FB pixel to this file?
https://github.com/BurdaMagazinOrg/infinite-theme/blob/8.x-1.x/templates/embeds/api_fb.html.twig

I don't know how is Tag Manager ready for this but this should be in one solution I think.

<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','//connect.facebook.net/en_US/fbevents.js');

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

(related from #31)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants