> For my understanding, could you explain please what this PHP function does?
> replace('%PROLIFIC_PID%', 'PI03_RV1', 'response');
The replace() command takes care that any furute occurence of "%PROLIFIC_PID%" will be replaced by whatever is stored ('response') in the variable PI03_RV1 at the time, when the replace() command runs.
> directly after the POST/GET variable PROLIFIC_PID (PI03_RV1)?
In case of a POST/GET variable this will work fine, correct.
> The variable now shows as follows in my data set:
{{%PROLIFIC_PID}}
That is ... well ... an improvement. The problem still is that prolific does not replace the placeholder with the prolific ID when it uses the original link. In my opinion you have one percentage sign missing - compared to the last screenshot in the manual that you have posted:
https://researcher-help.prolific.co/hc/en-gb/articles/360009220993
Wrong: {{%PROLIFIC_PID}}
Rright: {{%PROLIFIC_PID%}}