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.
You might be interested in this:
CiviCRM: Hide Activity Types (com.joinery.hideactivitytypes)
Hide activity types in one or more ways:
Remove the activity type from the "Actions" list on the Activity Summary.
On a per-contact-type basis: activity type will be removed from the "New Activity" list under a contact's Activities tab, based on the ...