These are called "On Redirect" hooks, and can be found in the "Hooks" tab of your links:
Clicking the "Add "On Redirect" Hook" button adds a new panel where you can select which hook action you want to add.
For retargeting pixels, I recommend to leave this value to 1000 ms (1 second) - to be sure the visitor gets cookied. Especially for Facebook retargeting, as their pixel is relatively slow to fully load.
The PHP hooks look similar but don't have that display duration option, as there is nothing shown to the visitor when these hooks are executed.
For each link, you can add an unlimited number of hooks.