it will depend how you are using the participant ID.
If for example you are showing a text stimulus that shows the participant ID, you can use a ‘code as argument’ directly in the text field (i.e. enter $expInfo['participant'] and ‘set every repeat’ in the text field). If you are doing something more complex then you add a code component and use the variable there.