I simply added the code thing because the script your assistants sent me had a placeholder for it but no actual algorithm to deal with it. You should of course feel free to use your own method, especially if it was specifically designed for MTurk.
Last thing I do is include a confirmation link to Prolific on the last screen of my experiment.
When I was still using MTurk, I used the method I illustrated here: each participant is assigned a unique ID by the two lines from my message above, which gets recorded in their results file (again, using .log) and participants are invited to copy-paste the code on MTurk so I can then match the codes in my results files and those sent to MTurk by the participants and validate their submissions (or reject them if the code they entered on MTurk does not appear in my results file).
The tutorial describes yet another method, which can also be used with MTurk, where participants are invited to type a unique ID on the first page of the experiment (e.g. their MTurk ID).