How can I add Facebook Pixel to the Thank You message?

  • Profile Image
    frostynova
    Asked on June 12, 2017 at 02:22 PM

    I don't see a way to add an HTML block to the Thank You message?

  • Profile Image
    david
    Answered on June 12, 2017 at 03:43 PM

    The Facebook pixel code can be added to the source code of the thank you page.

    Please check the screenshot below on how to add code in form's source code of thank you message:

    The following thread has information on how to properly add the tracking pixel code:

    https://www.jotform.com/answers/740370-Adding-Facebook-Retargeting-Pixel-at-JotForm

  • Profile Image
    frostynova
    Answered on June 12, 2017 at 04:38 PM

    Yes, but the problem is it seems that the code is being stripped. 

     

    For example, here's the code I put in:

     

    <!-- 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', '960864517xxxx', {

    em: 'insert_email_variable'

    });

    fbq('track', 'PageView');

    fbq('track', 'Lead');

    </script>

    <noscript><img height="1" width="1" style="display:none"

    src="https://www.facebook.com/tr?id=960864517298715&ev=PageView&noscript=1"

    /></noscript>

    <!-- DO NOT MODIFY -->

    <!-- End Facebook Pixel Code -->

     

    But then it strips it and makes it: 

     

    <!-- Facebook Pixel Code --><noscript><img height="1" width="1" style="display:none"

    src="https://www.facebook.com/tr?id=960864517xxx&ev=PageView&noscript=1"

    /></noscript><!-- DO NOT MODIFY --> <!-- End Facebook Pixel Code -->

     

    The problem with that is, there should be TWO events going in there. PageView AND Lead. 

     

  • Profile Image
    david
    Answered on June 12, 2017 at 05:34 PM

    Scripts cannot be added to the thank you page or other areas.  The following thread has an example of how to add the pixel without a script:

    https://www.jotform.com/answers/740370-Adding-Facebook-Retargeting-Pixel-at-JotForm