Redirecting participants at the end of the study

Hi all,

I know this question was already discussed on this forum. But what is the correct way of redirecting participants after the completion of a study? Should we just insert the URL as indicated here:
https://www.psychopy.org/online/onlineParticipants.html

Or should we transform the URL in a line of code as indicated here ?