Custom JavaScript and Pixel Tracking

You can run custom JavaScript code on a survey, such as loading a pixel for tracking purposes. This can be applied to both Study Screeners and Panel Sign-up forms. 

Important notes

  • The code will execute right after the page loads.
  • If you run JavaScript code, you need to include <script> tags.

Adding JavaScript code

To add custom Javascript or Pixel Tracking to your Panelfox screeners:

  1. Go to the Screener > Screener Settings or Panel Sign-up > Form Settings page
  2. Scroll down to the Custom HTML section of the page, and add your code.
  3. To test this code, go to the Screener Builder tab, and click Preview at the top of the page.
  4. On the new Preview tab, you can open up Developer Tools > Console to inspect code execution.
    1. To verify that your code started executing, you'll see:
    2. If there is an error in your code, you'll see something like this:

Examples loading a script or pixel

To load a script like Google Tag Manager, your code will look something like this:

<!-- Google Tag Manager -->
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
<!-- End Google Tag Manager -->

To load the Facebook pixel:

  <!-- Facebook Pixel Code -->

  fbq('init', '<FB_PIXEL_ID>');
  fbq('track', "PageView");
  <noscript><img height="1" width="1" style="display:none"
  <!-- End Facebook Pixel Code -->
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us