If you're promoting your Alchemer survey via Facebook ads of course you'll want to track the success of this ad. You can do so using the Facebook Pixel.
To do so you'll need to add a JavaScript action to the Thank You page of your survey. We're using the Thank You page as this is what Alchemer uses to determine whether a survey response is complete; you can choose to place the pixel on another page of your survey if you wish.
- To add a JavaScript action to your survey, click the Action button at the bottom of any page in your survey.
- You will see an Add Actions page. Locate the JavaScript Action via the Custom Code section at the bottom of the list.
- Next paste the pixel code in your JavaScript action. There are a couple of portions of the code that will need to be removed. See the highlighted portions of the code below; these must be removed in order for the code to work properly within a survey.
<!-- 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','//connect.facebook.net/en_US/fbevents.js'); fbq('init', '1234567890XXXXXX'); fbq('track', "PageView"); </script> <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1234567890XXXXXX&ev=PageView&noscript=1"></noscript> <!-- End Facebook Pixel Code -->
The performance metrics of your Facebook pixel will be available via Facebook's Events Manager page.
Want the script to run on every page? Paste the script in the Custom Head section found on the Style Tab and selecting HTML/CSS Editor in the bottom right of the style page.