Adding a Facebook Conversion Pixel Code to the contribution confirmation screen
You could override the Thank-you smarty template. Copy the one from templates/CRM/Contribute/Form/Contribution/ThankYou.tpl. Then you could do something like this:

{if $contributionPageID == 20}

    &lt;script type="text/javascript"&gt;
    {literal}

      function doFacebookStuff(){
      };

    {/literal}
    &lt;/script&gt;
{/if}