Okay
  Public Ticket #3689540
Meta Pixel Code
Closed

Comments

  •  9
    Shane started the conversation

    Hi guys, 

    When I install the Meta Pixel Code into Custom JS Code, it breaks the site. Is that where I should put it? Or somewhere else? See screenshot.

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

  •  2,958
    Andrew replied

    Hi Shane,

    Thank you for reaching out to us.

    Yes, you should add the CSS in the custom JS boxes in the Salient > General Settings > CSS/JS related.

    3602131094.png

    Try this and let us know how it goes.

    Thanks,

  •  9
    Shane replied

    Which one? Head or After Body Open? I put it in After Body Open and it broke the site.

  •  1,875
    Judith replied

    Hi Shane,

    Thanks for writing back.

    You can add it on the Head instead or you can use the Code Snippets plugin: https://wordpress.org/plugins/code-snippets/

    Please let us know how this goes.