Adding Facebook tracking pixel to contribution confirmation pages
You can add the code using one of the below method


Use buildform hook to add JS code using region method.
Add pixel code in CRM/Contribute/For/Contribution/ThankYou.extra.tpl in your custom template directory.


Note: Won't be difficult to make it generalized for each contribution page and also have it extended to event registration.